diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-21 21:33:27 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-21 21:33:27 -0400 |
commit | e78a57de94480226f7fc90d0b4837bfc6c99a9e0 (patch) | |
tree | bfe0a664f88b6cb9d284869d615ae2d7fdb7cf63 /include | |
parent | 77501f3cb648e18733509a951ed31eddd7ef2c0b (diff) | |
parent | 452503f993feffe96e8cc9fbff4888b96e2c5e40 (diff) |
Merge branch 'upstream'
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/arch-ixp4xx/entry-macro.S | 9 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/hardware.h | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-pxa/pxa-regs.h | 2 | ||||
-rw-r--r-- | include/asm-arm/locks.h | 4 | ||||
-rw-r--r-- | include/linux/ata.h | 13 | ||||
-rw-r--r-- | include/linux/bootmem.h | 32 | ||||
-rw-r--r-- | include/linux/hugetlb.h | 13 | ||||
-rw-r--r-- | include/linux/libata.h | 39 |
8 files changed, 100 insertions, 14 deletions
diff --git a/include/asm-arm/arch-ixp4xx/entry-macro.S b/include/asm-arm/arch-ixp4xx/entry-macro.S index 455da64832de..323b0bc4a39c 100644 --- a/include/asm-arm/arch-ixp4xx/entry-macro.S +++ b/include/asm-arm/arch-ixp4xx/entry-macro.S | |||
@@ -15,25 +15,26 @@ | |||
15 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET) | 15 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET) |
16 | ldr \irqstat, [\irqstat] @ get interrupts | 16 | ldr \irqstat, [\irqstat] @ get interrupts |
17 | cmp \irqstat, #0 | 17 | cmp \irqstat, #0 |
18 | beq 1001f | 18 | beq 1001f @ upper IRQ? |
19 | clz \irqnr, \irqstat | 19 | clz \irqnr, \irqstat |
20 | mov \base, #31 | 20 | mov \base, #31 |
21 | subs \irqnr, \base, \irqnr | 21 | sub \irqnr, \base, \irqnr |
22 | b 1002f @ lower IRQ being | ||
23 | @ handled | ||
22 | 24 | ||
23 | 1001: | 25 | 1001: |
24 | /* | 26 | /* |
25 | * IXP465 has an upper IRQ status register | 27 | * IXP465 has an upper IRQ status register |
26 | */ | 28 | */ |
27 | #if defined(CONFIG_CPU_IXP46X) | 29 | #if defined(CONFIG_CPU_IXP46X) |
28 | bne 1002f | ||
29 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET) | 30 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET) |
30 | ldr \irqstat, [\irqstat] @ get upper interrupts | 31 | ldr \irqstat, [\irqstat] @ get upper interrupts |
31 | mov \irqnr, #63 | 32 | mov \irqnr, #63 |
32 | clz \irqstat, \irqstat | 33 | clz \irqstat, \irqstat |
33 | cmp \irqstat, #32 | 34 | cmp \irqstat, #32 |
34 | subne \irqnr, \irqnr, \irqstat | 35 | subne \irqnr, \irqnr, \irqstat |
35 | 1002: | ||
36 | #endif | 36 | #endif |
37 | 1002: | ||
37 | .endm | 38 | .endm |
38 | 39 | ||
39 | 40 | ||
diff --git a/include/asm-arm/arch-ixp4xx/hardware.h b/include/asm-arm/arch-ixp4xx/hardware.h index 4ac964b9078a..55d85eea8c1a 100644 --- a/include/asm-arm/arch-ixp4xx/hardware.h +++ b/include/asm-arm/arch-ixp4xx/hardware.h | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | #define pcibios_assign_all_busses() 1 | 28 | #define pcibios_assign_all_busses() 1 |
29 | 29 | ||
30 | #if defined(CONFIG_CPU_IXP465) && !defined(__ASSEMBLY__) | 30 | #if defined(CONFIG_CPU_IXP46X) && !defined(__ASSEMBLY__) |
31 | extern unsigned int processor_id; | 31 | extern unsigned int processor_id; |
32 | #define cpu_is_ixp465() ((processor_id & 0xffffffc0) == 0x69054200) | 32 | #define cpu_is_ixp465() ((processor_id & 0xffffffc0) == 0x69054200) |
33 | #else | 33 | #else |
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index 13fa2deb4ddd..3af7165ab0d7 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -653,7 +653,7 @@ | |||
653 | 653 | ||
654 | #define UDCCS_IO_RFS (1 << 0) /* Receive FIFO service */ | 654 | #define UDCCS_IO_RFS (1 << 0) /* Receive FIFO service */ |
655 | #define UDCCS_IO_RPC (1 << 1) /* Receive packet complete */ | 655 | #define UDCCS_IO_RPC (1 << 1) /* Receive packet complete */ |
656 | #define UDCCS_IO_ROF (1 << 3) /* Receive overflow */ | 656 | #define UDCCS_IO_ROF (1 << 2) /* Receive overflow */ |
657 | #define UDCCS_IO_DME (1 << 3) /* DMA enable */ | 657 | #define UDCCS_IO_DME (1 << 3) /* DMA enable */ |
658 | #define UDCCS_IO_RNE (1 << 6) /* Receive FIFO not empty */ | 658 | #define UDCCS_IO_RNE (1 << 6) /* Receive FIFO not empty */ |
659 | #define UDCCS_IO_RSP (1 << 7) /* Receive short packet */ | 659 | #define UDCCS_IO_RSP (1 << 7) /* Receive short packet */ |
diff --git a/include/asm-arm/locks.h b/include/asm-arm/locks.h index f08dc8447913..852220eecdbc 100644 --- a/include/asm-arm/locks.h +++ b/include/asm-arm/locks.h | |||
@@ -103,7 +103,7 @@ | |||
103 | ({ \ | 103 | ({ \ |
104 | smp_mb(); \ | 104 | smp_mb(); \ |
105 | __asm__ __volatile__( \ | 105 | __asm__ __volatile__( \ |
106 | "@ up_op_read\n" \ | 106 | "@ up_op_write\n" \ |
107 | "1: ldrex lr, [%0]\n" \ | 107 | "1: ldrex lr, [%0]\n" \ |
108 | " adds lr, lr, %1\n" \ | 108 | " adds lr, lr, %1\n" \ |
109 | " strex ip, lr, [%0]\n" \ | 109 | " strex ip, lr, [%0]\n" \ |
@@ -231,7 +231,7 @@ | |||
231 | #define __up_op_write(ptr,wake) \ | 231 | #define __up_op_write(ptr,wake) \ |
232 | ({ \ | 232 | ({ \ |
233 | __asm__ __volatile__( \ | 233 | __asm__ __volatile__( \ |
234 | "@ up_op_read\n" \ | 234 | "@ up_op_write\n" \ |
235 | " mrs ip, cpsr\n" \ | 235 | " mrs ip, cpsr\n" \ |
236 | " orr lr, ip, #128\n" \ | 236 | " orr lr, ip, #128\n" \ |
237 | " msr cpsr_c, lr\n" \ | 237 | " msr cpsr_c, lr\n" \ |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 630908c9378b..33276d1d05d2 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -42,13 +42,18 @@ enum { | |||
42 | ATA_SECT_SIZE = 512, | 42 | ATA_SECT_SIZE = 512, |
43 | 43 | ||
44 | ATA_ID_WORDS = 256, | 44 | ATA_ID_WORDS = 256, |
45 | ATA_ID_PROD_OFS = 27, | ||
46 | ATA_ID_FW_REV_OFS = 23, | ||
47 | ATA_ID_SERNO_OFS = 10, | 45 | ATA_ID_SERNO_OFS = 10, |
48 | ATA_ID_MAJOR_VER = 80, | 46 | ATA_ID_FW_REV_OFS = 23, |
49 | ATA_ID_PIO_MODES = 64, | 47 | ATA_ID_PROD_OFS = 27, |
48 | ATA_ID_OLD_PIO_MODES = 51, | ||
49 | ATA_ID_FIELD_VALID = 53, | ||
50 | ATA_ID_MWDMA_MODES = 63, | 50 | ATA_ID_MWDMA_MODES = 63, |
51 | ATA_ID_PIO_MODES = 64, | ||
52 | ATA_ID_EIDE_DMA_MIN = 65, | ||
53 | ATA_ID_EIDE_PIO = 67, | ||
54 | ATA_ID_EIDE_PIO_IORDY = 68, | ||
51 | ATA_ID_UDMA_MODES = 88, | 55 | ATA_ID_UDMA_MODES = 88, |
56 | ATA_ID_MAJOR_VER = 80, | ||
52 | ATA_ID_PIO4 = (1 << 1), | 57 | ATA_ID_PIO4 = (1 << 1), |
53 | 58 | ||
54 | ATA_PCI_CTL_OFS = 2, | 59 | ATA_PCI_CTL_OFS = 2, |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 82bd8842d11c..3b03b0b868dd 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -43,7 +43,7 @@ typedef struct bootmem_data { | |||
43 | extern unsigned long __init bootmem_bootmap_pages (unsigned long); | 43 | extern unsigned long __init bootmem_bootmap_pages (unsigned long); |
44 | extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend); | 44 | extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend); |
45 | extern void __init free_bootmem (unsigned long addr, unsigned long size); | 45 | extern void __init free_bootmem (unsigned long addr, unsigned long size); |
46 | extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal); | 46 | extern void * __init __alloc_bootmem_limit (unsigned long size, unsigned long align, unsigned long goal, unsigned long limit); |
47 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | 47 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE |
48 | extern void __init reserve_bootmem (unsigned long addr, unsigned long size); | 48 | extern void __init reserve_bootmem (unsigned long addr, unsigned long size); |
49 | #define alloc_bootmem(x) \ | 49 | #define alloc_bootmem(x) \ |
@@ -54,6 +54,16 @@ extern void __init reserve_bootmem (unsigned long addr, unsigned long size); | |||
54 | __alloc_bootmem((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 54 | __alloc_bootmem((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
55 | #define alloc_bootmem_low_pages(x) \ | 55 | #define alloc_bootmem_low_pages(x) \ |
56 | __alloc_bootmem((x), PAGE_SIZE, 0) | 56 | __alloc_bootmem((x), PAGE_SIZE, 0) |
57 | |||
58 | #define alloc_bootmem_limit(x, limit) \ | ||
59 | __alloc_bootmem_limit((x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS), (limit)) | ||
60 | #define alloc_bootmem_low_limit(x, limit) \ | ||
61 | __alloc_bootmem_limit((x), SMP_CACHE_BYTES, 0, (limit)) | ||
62 | #define alloc_bootmem_pages_limit(x, limit) \ | ||
63 | __alloc_bootmem_limit((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS), (limit)) | ||
64 | #define alloc_bootmem_low_pages_limit(x, limit) \ | ||
65 | __alloc_bootmem_limit((x), PAGE_SIZE, 0, (limit)) | ||
66 | |||
57 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ | 67 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ |
58 | extern unsigned long __init free_all_bootmem (void); | 68 | extern unsigned long __init free_all_bootmem (void); |
59 | 69 | ||
@@ -61,7 +71,7 @@ extern unsigned long __init init_bootmem_node (pg_data_t *pgdat, unsigned long f | |||
61 | extern void __init reserve_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, unsigned long size); | 71 | extern void __init reserve_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, unsigned long size); |
62 | extern void __init free_bootmem_node (pg_data_t *pgdat, unsigned long addr, unsigned long size); | 72 | extern void __init free_bootmem_node (pg_data_t *pgdat, unsigned long addr, unsigned long size); |
63 | extern unsigned long __init free_all_bootmem_node (pg_data_t *pgdat); | 73 | extern unsigned long __init free_all_bootmem_node (pg_data_t *pgdat); |
64 | extern void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal); | 74 | extern void * __init __alloc_bootmem_node_limit (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal, unsigned long limit); |
65 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | 75 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE |
66 | #define alloc_bootmem_node(pgdat, x) \ | 76 | #define alloc_bootmem_node(pgdat, x) \ |
67 | __alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 77 | __alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
@@ -69,6 +79,14 @@ extern void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, | |||
69 | __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 79 | __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
70 | #define alloc_bootmem_low_pages_node(pgdat, x) \ | 80 | #define alloc_bootmem_low_pages_node(pgdat, x) \ |
71 | __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0) | 81 | __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0) |
82 | |||
83 | #define alloc_bootmem_node_limit(pgdat, x, limit) \ | ||
84 | __alloc_bootmem_node_limit((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS), (limit)) | ||
85 | #define alloc_bootmem_pages_node_limit(pgdat, x, limit) \ | ||
86 | __alloc_bootmem_node_limit((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS), (limit)) | ||
87 | #define alloc_bootmem_low_pages_node_limit(pgdat, x, limit) \ | ||
88 | __alloc_bootmem_node_limit((pgdat), (x), PAGE_SIZE, 0, (limit)) | ||
89 | |||
72 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ | 90 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ |
73 | 91 | ||
74 | #ifdef CONFIG_HAVE_ARCH_ALLOC_REMAP | 92 | #ifdef CONFIG_HAVE_ARCH_ALLOC_REMAP |
@@ -105,5 +123,15 @@ extern void *__init alloc_large_system_hash(const char *tablename, | |||
105 | #endif | 123 | #endif |
106 | extern int __initdata hashdist; /* Distribute hashes across NUMA nodes? */ | 124 | extern int __initdata hashdist; /* Distribute hashes across NUMA nodes? */ |
107 | 125 | ||
126 | static inline void *__alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal) | ||
127 | { | ||
128 | return __alloc_bootmem_limit(size, align, goal, 0); | ||
129 | } | ||
130 | |||
131 | static inline void *__alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, | ||
132 | unsigned long goal) | ||
133 | { | ||
134 | return __alloc_bootmem_node_limit(pgdat, size, align, goal, 0); | ||
135 | } | ||
108 | 136 | ||
109 | #endif /* _LINUX_BOOTMEM_H */ | 137 | #endif /* _LINUX_BOOTMEM_H */ |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index e670b0d13fe0..42cb7d70f9ac 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -155,11 +155,24 @@ static inline void set_file_hugepages(struct file *file) | |||
155 | { | 155 | { |
156 | file->f_op = &hugetlbfs_file_operations; | 156 | file->f_op = &hugetlbfs_file_operations; |
157 | } | 157 | } |
158 | |||
159 | static inline int valid_hugetlb_file_off(struct vm_area_struct *vma, | ||
160 | unsigned long address) | ||
161 | { | ||
162 | struct inode *inode = vma->vm_file->f_dentry->d_inode; | ||
163 | loff_t file_off = address - vma->vm_start; | ||
164 | |||
165 | file_off += (vma->vm_pgoff << PAGE_SHIFT); | ||
166 | |||
167 | return (file_off < inode->i_size); | ||
168 | } | ||
169 | |||
158 | #else /* !CONFIG_HUGETLBFS */ | 170 | #else /* !CONFIG_HUGETLBFS */ |
159 | 171 | ||
160 | #define is_file_hugepages(file) 0 | 172 | #define is_file_hugepages(file) 0 |
161 | #define set_file_hugepages(file) BUG() | 173 | #define set_file_hugepages(file) BUG() |
162 | #define hugetlb_zero_setup(size) ERR_PTR(-ENOSYS) | 174 | #define hugetlb_zero_setup(size) ERR_PTR(-ENOSYS) |
175 | #define valid_hugetlb_file_off(vma, address) 0 | ||
163 | 176 | ||
164 | #endif /* !CONFIG_HUGETLBFS */ | 177 | #endif /* !CONFIG_HUGETLBFS */ |
165 | 178 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index 0261c55f3483..0e214f8c8f9f 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -388,6 +388,19 @@ struct ata_port_info { | |||
388 | struct ata_port_operations *port_ops; | 388 | struct ata_port_operations *port_ops; |
389 | }; | 389 | }; |
390 | 390 | ||
391 | struct ata_timing { | ||
392 | unsigned short mode; /* ATA mode */ | ||
393 | unsigned short setup; /* t1 */ | ||
394 | unsigned short act8b; /* t2 for 8-bit I/O */ | ||
395 | unsigned short rec8b; /* t2i for 8-bit I/O */ | ||
396 | unsigned short cyc8b; /* t0 for 8-bit I/O */ | ||
397 | unsigned short active; /* t2 or tD */ | ||
398 | unsigned short recover; /* t2i or tK */ | ||
399 | unsigned short cycle; /* t0 */ | ||
400 | unsigned short udma; /* t2CYCTYP/2 */ | ||
401 | }; | ||
402 | |||
403 | #define FIT(v,vmin,vmax) max_t(short,min_t(short,v,vmax),vmin) | ||
391 | 404 | ||
392 | extern void ata_port_probe(struct ata_port *); | 405 | extern void ata_port_probe(struct ata_port *); |
393 | extern void __sata_phy_reset(struct ata_port *ap); | 406 | extern void __sata_phy_reset(struct ata_port *ap); |
@@ -451,6 +464,32 @@ extern int ata_std_bios_param(struct scsi_device *sdev, | |||
451 | sector_t capacity, int geom[]); | 464 | sector_t capacity, int geom[]); |
452 | extern int ata_scsi_slave_config(struct scsi_device *sdev); | 465 | extern int ata_scsi_slave_config(struct scsi_device *sdev); |
453 | 466 | ||
467 | /* | ||
468 | * Timing helpers | ||
469 | */ | ||
470 | extern int ata_timing_compute(struct ata_device *, unsigned short, | ||
471 | struct ata_timing *, int, int); | ||
472 | extern void ata_timing_merge(const struct ata_timing *, | ||
473 | const struct ata_timing *, struct ata_timing *, | ||
474 | unsigned int); | ||
475 | |||
476 | enum { | ||
477 | ATA_TIMING_SETUP = (1 << 0), | ||
478 | ATA_TIMING_ACT8B = (1 << 1), | ||
479 | ATA_TIMING_REC8B = (1 << 2), | ||
480 | ATA_TIMING_CYC8B = (1 << 3), | ||
481 | ATA_TIMING_8BIT = ATA_TIMING_ACT8B | ATA_TIMING_REC8B | | ||
482 | ATA_TIMING_CYC8B, | ||
483 | ATA_TIMING_ACTIVE = (1 << 4), | ||
484 | ATA_TIMING_RECOVER = (1 << 5), | ||
485 | ATA_TIMING_CYCLE = (1 << 6), | ||
486 | ATA_TIMING_UDMA = (1 << 7), | ||
487 | ATA_TIMING_ALL = ATA_TIMING_SETUP | ATA_TIMING_ACT8B | | ||
488 | ATA_TIMING_REC8B | ATA_TIMING_CYC8B | | ||
489 | ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER | | ||
490 | ATA_TIMING_CYCLE | ATA_TIMING_UDMA, | ||
491 | }; | ||
492 | |||
454 | 493 | ||
455 | #ifdef CONFIG_PCI | 494 | #ifdef CONFIG_PCI |
456 | struct pci_bits { | 495 | struct pci_bits { |