diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-15 15:56:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-15 15:56:12 -0500 |
commit | 647df5189fecb2c2fa811421a3f28bf9034e3a70 (patch) | |
tree | f3fac52eedac2bb74a760a798ea8c397e2878553 | |
parent | cbbc49877d44408c4d0decf77c3c141732bbc679 (diff) | |
parent | 175add1981e53d22caba8f42d5f924a4de507b6c (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] SN specific version of dma_get_required_mask()
[IA64] generic_defconfig: Enable SATA_VITESSE
[IA64] dump stack on kernel unaligned warnings
[IA64] Turn on CONFIG_HAVE_UNSTABLE_CLOCK
[IA64] Update to use account_{steal,idle}_ticks
-rw-r--r-- | Documentation/DMA-API.txt | 9 | ||||
-rw-r--r-- | arch/ia64/Kconfig | 1 | ||||
-rw-r--r-- | arch/ia64/configs/generic_defconfig | 2 | ||||
-rw-r--r-- | arch/ia64/include/asm/dma-mapping.h | 2 | ||||
-rw-r--r-- | arch/ia64/include/asm/machvec.h | 7 | ||||
-rw-r--r-- | arch/ia64/include/asm/machvec_init.h | 1 | ||||
-rw-r--r-- | arch/ia64/include/asm/machvec_sn2.h | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/unaligned.c | 6 | ||||
-rw-r--r-- | arch/ia64/pci/pci.c | 27 | ||||
-rw-r--r-- | arch/ia64/sn/pci/pci_dma.c | 6 | ||||
-rw-r--r-- | arch/ia64/xen/time.c | 4 | ||||
-rw-r--r-- | kernel/sysctl.c | 9 |
12 files changed, 67 insertions, 9 deletions
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index b462bb149543..52441694fe03 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt | |||
@@ -170,16 +170,15 @@ Returns: 0 if successful and a negative error if not. | |||
170 | u64 | 170 | u64 |
171 | dma_get_required_mask(struct device *dev) | 171 | dma_get_required_mask(struct device *dev) |
172 | 172 | ||
173 | After setting the mask with dma_set_mask(), this API returns the | 173 | This API returns the mask that the platform requires to |
174 | actual mask (within that already set) that the platform actually | 174 | operate efficiently. Usually this means the returned mask |
175 | requires to operate efficiently. Usually this means the returned mask | ||
176 | is the minimum required to cover all of memory. Examining the | 175 | is the minimum required to cover all of memory. Examining the |
177 | required mask gives drivers with variable descriptor sizes the | 176 | required mask gives drivers with variable descriptor sizes the |
178 | opportunity to use smaller descriptors as necessary. | 177 | opportunity to use smaller descriptors as necessary. |
179 | 178 | ||
180 | Requesting the required mask does not alter the current mask. If you | 179 | Requesting the required mask does not alter the current mask. If you |
181 | wish to take advantage of it, you should issue another dma_set_mask() | 180 | wish to take advantage of it, you should issue a dma_set_mask() |
182 | call to lower the mask again. | 181 | call to set the mask to the value returned. |
183 | 182 | ||
184 | 183 | ||
185 | Part Id - Streaming DMA mappings | 184 | Part Id - Streaming DMA mappings |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 3d31636cbafb..6183aeccecf1 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -17,6 +17,7 @@ config IA64 | |||
17 | select ACPI if (!IA64_HP_SIM) | 17 | select ACPI if (!IA64_HP_SIM) |
18 | select PM if (!IA64_HP_SIM) | 18 | select PM if (!IA64_HP_SIM) |
19 | select ARCH_SUPPORTS_MSI | 19 | select ARCH_SUPPORTS_MSI |
20 | select HAVE_UNSTABLE_SCHED_CLOCK | ||
20 | select HAVE_IDE | 21 | select HAVE_IDE |
21 | select HAVE_OPROFILE | 22 | select HAVE_OPROFILE |
22 | select HAVE_KPROBES | 23 | select HAVE_KPROBES |
diff --git a/arch/ia64/configs/generic_defconfig b/arch/ia64/configs/generic_defconfig index 27eb67604c53..a109db30ce55 100644 --- a/arch/ia64/configs/generic_defconfig +++ b/arch/ia64/configs/generic_defconfig | |||
@@ -578,7 +578,7 @@ CONFIG_ATA_PIIX=y | |||
578 | # CONFIG_SATA_SIS is not set | 578 | # CONFIG_SATA_SIS is not set |
579 | # CONFIG_SATA_ULI is not set | 579 | # CONFIG_SATA_ULI is not set |
580 | # CONFIG_SATA_VIA is not set | 580 | # CONFIG_SATA_VIA is not set |
581 | # CONFIG_SATA_VITESSE is not set | 581 | CONFIG_SATA_VITESSE=y |
582 | # CONFIG_SATA_INIC162X is not set | 582 | # CONFIG_SATA_INIC162X is not set |
583 | # CONFIG_PATA_ACPI is not set | 583 | # CONFIG_PATA_ACPI is not set |
584 | # CONFIG_PATA_ALI is not set | 584 | # CONFIG_PATA_ALI is not set |
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h index bbab7e2b0fc9..1f912d927585 100644 --- a/arch/ia64/include/asm/dma-mapping.h +++ b/arch/ia64/include/asm/dma-mapping.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #include <linux/scatterlist.h> | 9 | #include <linux/scatterlist.h> |
10 | #include <asm/swiotlb.h> | 10 | #include <asm/swiotlb.h> |
11 | 11 | ||
12 | #define ARCH_HAS_DMA_GET_REQUIRED_MASK | ||
13 | |||
12 | struct dma_mapping_ops { | 14 | struct dma_mapping_ops { |
13 | int (*mapping_error)(struct device *dev, | 15 | int (*mapping_error)(struct device *dev, |
14 | dma_addr_t dma_addr); | 16 | dma_addr_t dma_addr); |
diff --git a/arch/ia64/include/asm/machvec.h b/arch/ia64/include/asm/machvec.h index 59c17e446683..fe87b2121707 100644 --- a/arch/ia64/include/asm/machvec.h +++ b/arch/ia64/include/asm/machvec.h | |||
@@ -62,6 +62,7 @@ typedef dma_addr_t ia64_mv_dma_map_single_attrs (struct device *, void *, size_t | |||
62 | typedef void ia64_mv_dma_unmap_single_attrs (struct device *, dma_addr_t, size_t, int, struct dma_attrs *); | 62 | typedef void ia64_mv_dma_unmap_single_attrs (struct device *, dma_addr_t, size_t, int, struct dma_attrs *); |
63 | typedef int ia64_mv_dma_map_sg_attrs (struct device *, struct scatterlist *, int, int, struct dma_attrs *); | 63 | typedef int ia64_mv_dma_map_sg_attrs (struct device *, struct scatterlist *, int, int, struct dma_attrs *); |
64 | typedef void ia64_mv_dma_unmap_sg_attrs (struct device *, struct scatterlist *, int, int, struct dma_attrs *); | 64 | typedef void ia64_mv_dma_unmap_sg_attrs (struct device *, struct scatterlist *, int, int, struct dma_attrs *); |
65 | typedef u64 ia64_mv_dma_get_required_mask (struct device *); | ||
65 | 66 | ||
66 | /* | 67 | /* |
67 | * WARNING: The legacy I/O space is _architected_. Platforms are | 68 | * WARNING: The legacy I/O space is _architected_. Platforms are |
@@ -159,6 +160,7 @@ extern void machvec_tlb_migrate_finish (struct mm_struct *); | |||
159 | # define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device | 160 | # define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device |
160 | # define platform_dma_mapping_error ia64_mv.dma_mapping_error | 161 | # define platform_dma_mapping_error ia64_mv.dma_mapping_error |
161 | # define platform_dma_supported ia64_mv.dma_supported | 162 | # define platform_dma_supported ia64_mv.dma_supported |
163 | # define platform_dma_get_required_mask ia64_mv.dma_get_required_mask | ||
162 | # define platform_irq_to_vector ia64_mv.irq_to_vector | 164 | # define platform_irq_to_vector ia64_mv.irq_to_vector |
163 | # define platform_local_vector_to_irq ia64_mv.local_vector_to_irq | 165 | # define platform_local_vector_to_irq ia64_mv.local_vector_to_irq |
164 | # define platform_pci_get_legacy_mem ia64_mv.pci_get_legacy_mem | 166 | # define platform_pci_get_legacy_mem ia64_mv.pci_get_legacy_mem |
@@ -213,6 +215,7 @@ struct ia64_machine_vector { | |||
213 | ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device; | 215 | ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device; |
214 | ia64_mv_dma_mapping_error *dma_mapping_error; | 216 | ia64_mv_dma_mapping_error *dma_mapping_error; |
215 | ia64_mv_dma_supported *dma_supported; | 217 | ia64_mv_dma_supported *dma_supported; |
218 | ia64_mv_dma_get_required_mask *dma_get_required_mask; | ||
216 | ia64_mv_irq_to_vector *irq_to_vector; | 219 | ia64_mv_irq_to_vector *irq_to_vector; |
217 | ia64_mv_local_vector_to_irq *local_vector_to_irq; | 220 | ia64_mv_local_vector_to_irq *local_vector_to_irq; |
218 | ia64_mv_pci_get_legacy_mem_t *pci_get_legacy_mem; | 221 | ia64_mv_pci_get_legacy_mem_t *pci_get_legacy_mem; |
@@ -263,6 +266,7 @@ struct ia64_machine_vector { | |||
263 | platform_dma_sync_sg_for_device, \ | 266 | platform_dma_sync_sg_for_device, \ |
264 | platform_dma_mapping_error, \ | 267 | platform_dma_mapping_error, \ |
265 | platform_dma_supported, \ | 268 | platform_dma_supported, \ |
269 | platform_dma_get_required_mask, \ | ||
266 | platform_irq_to_vector, \ | 270 | platform_irq_to_vector, \ |
267 | platform_local_vector_to_irq, \ | 271 | platform_local_vector_to_irq, \ |
268 | platform_pci_get_legacy_mem, \ | 272 | platform_pci_get_legacy_mem, \ |
@@ -366,6 +370,9 @@ extern void machvec_init_from_cmdline(const char *cmdline); | |||
366 | #ifndef platform_dma_supported | 370 | #ifndef platform_dma_supported |
367 | # define platform_dma_supported swiotlb_dma_supported | 371 | # define platform_dma_supported swiotlb_dma_supported |
368 | #endif | 372 | #endif |
373 | #ifndef platform_dma_get_required_mask | ||
374 | # define platform_dma_get_required_mask ia64_dma_get_required_mask | ||
375 | #endif | ||
369 | #ifndef platform_irq_to_vector | 376 | #ifndef platform_irq_to_vector |
370 | # define platform_irq_to_vector __ia64_irq_to_vector | 377 | # define platform_irq_to_vector __ia64_irq_to_vector |
371 | #endif | 378 | #endif |
diff --git a/arch/ia64/include/asm/machvec_init.h b/arch/ia64/include/asm/machvec_init.h index ef964b286842..37a469849ab9 100644 --- a/arch/ia64/include/asm/machvec_init.h +++ b/arch/ia64/include/asm/machvec_init.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | extern ia64_mv_send_ipi_t ia64_send_ipi; | 4 | extern ia64_mv_send_ipi_t ia64_send_ipi; |
5 | extern ia64_mv_global_tlb_purge_t ia64_global_tlb_purge; | 5 | extern ia64_mv_global_tlb_purge_t ia64_global_tlb_purge; |
6 | extern ia64_mv_dma_get_required_mask ia64_dma_get_required_mask; | ||
6 | extern ia64_mv_irq_to_vector __ia64_irq_to_vector; | 7 | extern ia64_mv_irq_to_vector __ia64_irq_to_vector; |
7 | extern ia64_mv_local_vector_to_irq __ia64_local_vector_to_irq; | 8 | extern ia64_mv_local_vector_to_irq __ia64_local_vector_to_irq; |
8 | extern ia64_mv_pci_get_legacy_mem_t ia64_pci_get_legacy_mem; | 9 | extern ia64_mv_pci_get_legacy_mem_t ia64_pci_get_legacy_mem; |
diff --git a/arch/ia64/include/asm/machvec_sn2.h b/arch/ia64/include/asm/machvec_sn2.h index 781308ea7b88..f1a6e0d6dfa5 100644 --- a/arch/ia64/include/asm/machvec_sn2.h +++ b/arch/ia64/include/asm/machvec_sn2.h | |||
@@ -67,6 +67,7 @@ extern ia64_mv_dma_sync_single_for_device sn_dma_sync_single_for_device; | |||
67 | extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device; | 67 | extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device; |
68 | extern ia64_mv_dma_mapping_error sn_dma_mapping_error; | 68 | extern ia64_mv_dma_mapping_error sn_dma_mapping_error; |
69 | extern ia64_mv_dma_supported sn_dma_supported; | 69 | extern ia64_mv_dma_supported sn_dma_supported; |
70 | extern ia64_mv_dma_get_required_mask sn_dma_get_required_mask; | ||
70 | extern ia64_mv_migrate_t sn_migrate; | 71 | extern ia64_mv_migrate_t sn_migrate; |
71 | extern ia64_mv_kernel_launch_event_t sn_kernel_launch_event; | 72 | extern ia64_mv_kernel_launch_event_t sn_kernel_launch_event; |
72 | extern ia64_mv_setup_msi_irq_t sn_setup_msi_irq; | 73 | extern ia64_mv_setup_msi_irq_t sn_setup_msi_irq; |
@@ -123,6 +124,7 @@ extern ia64_mv_pci_fixup_bus_t sn_pci_fixup_bus; | |||
123 | #define platform_dma_sync_sg_for_device sn_dma_sync_sg_for_device | 124 | #define platform_dma_sync_sg_for_device sn_dma_sync_sg_for_device |
124 | #define platform_dma_mapping_error sn_dma_mapping_error | 125 | #define platform_dma_mapping_error sn_dma_mapping_error |
125 | #define platform_dma_supported sn_dma_supported | 126 | #define platform_dma_supported sn_dma_supported |
127 | #define platform_dma_get_required_mask sn_dma_get_required_mask | ||
126 | #define platform_migrate sn_migrate | 128 | #define platform_migrate sn_migrate |
127 | #define platform_kernel_launch_event sn_kernel_launch_event | 129 | #define platform_kernel_launch_event sn_kernel_launch_event |
128 | #ifdef CONFIG_PCI_MSI | 130 | #ifdef CONFIG_PCI_MSI |
diff --git a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c index ff0e7c10faa7..6db08599ebbc 100644 --- a/arch/ia64/kernel/unaligned.c +++ b/arch/ia64/kernel/unaligned.c | |||
@@ -59,6 +59,7 @@ dump (const char *str, void *vp, size_t len) | |||
59 | * (i.e. don't allow attacker to fill up logs with unaligned accesses). | 59 | * (i.e. don't allow attacker to fill up logs with unaligned accesses). |
60 | */ | 60 | */ |
61 | int no_unaligned_warning; | 61 | int no_unaligned_warning; |
62 | int unaligned_dump_stack; | ||
62 | static int noprint_warning; | 63 | static int noprint_warning; |
63 | 64 | ||
64 | /* | 65 | /* |
@@ -1371,9 +1372,12 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs) | |||
1371 | } | 1372 | } |
1372 | } | 1373 | } |
1373 | } else { | 1374 | } else { |
1374 | if (within_logging_rate_limit()) | 1375 | if (within_logging_rate_limit()) { |
1375 | printk(KERN_WARNING "kernel unaligned access to 0x%016lx, ip=0x%016lx\n", | 1376 | printk(KERN_WARNING "kernel unaligned access to 0x%016lx, ip=0x%016lx\n", |
1376 | ifa, regs->cr_iip + ipsr->ri); | 1377 | ifa, regs->cr_iip + ipsr->ri); |
1378 | if (unaligned_dump_stack) | ||
1379 | dump_stack(); | ||
1380 | } | ||
1377 | set_fs(KERNEL_DS); | 1381 | set_fs(KERNEL_DS); |
1378 | } | 1382 | } |
1379 | 1383 | ||
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 211fcfd115f9..61f1af5c23c1 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
22 | #include <linux/bootmem.h> | ||
22 | 23 | ||
23 | #include <asm/machvec.h> | 24 | #include <asm/machvec.h> |
24 | #include <asm/page.h> | 25 | #include <asm/page.h> |
@@ -748,6 +749,32 @@ static void __init set_pci_cacheline_size(void) | |||
748 | pci_cache_line_size = (1 << cci.pcci_line_size) / 4; | 749 | pci_cache_line_size = (1 << cci.pcci_line_size) / 4; |
749 | } | 750 | } |
750 | 751 | ||
752 | u64 ia64_dma_get_required_mask(struct device *dev) | ||
753 | { | ||
754 | u32 low_totalram = ((max_pfn - 1) << PAGE_SHIFT); | ||
755 | u32 high_totalram = ((max_pfn - 1) >> (32 - PAGE_SHIFT)); | ||
756 | u64 mask; | ||
757 | |||
758 | if (!high_totalram) { | ||
759 | /* convert to mask just covering totalram */ | ||
760 | low_totalram = (1 << (fls(low_totalram) - 1)); | ||
761 | low_totalram += low_totalram - 1; | ||
762 | mask = low_totalram; | ||
763 | } else { | ||
764 | high_totalram = (1 << (fls(high_totalram) - 1)); | ||
765 | high_totalram += high_totalram - 1; | ||
766 | mask = (((u64)high_totalram) << 32) + 0xffffffff; | ||
767 | } | ||
768 | return mask; | ||
769 | } | ||
770 | EXPORT_SYMBOL_GPL(ia64_dma_get_required_mask); | ||
771 | |||
772 | u64 dma_get_required_mask(struct device *dev) | ||
773 | { | ||
774 | return platform_dma_get_required_mask(dev); | ||
775 | } | ||
776 | EXPORT_SYMBOL_GPL(dma_get_required_mask); | ||
777 | |||
751 | static int __init pcibios_init(void) | 778 | static int __init pcibios_init(void) |
752 | { | 779 | { |
753 | set_pci_cacheline_size(); | 780 | set_pci_cacheline_size(); |
diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c index 53ebb6484495..863f5017baae 100644 --- a/arch/ia64/sn/pci/pci_dma.c +++ b/arch/ia64/sn/pci/pci_dma.c | |||
@@ -356,6 +356,12 @@ int sn_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | |||
356 | } | 356 | } |
357 | EXPORT_SYMBOL(sn_dma_mapping_error); | 357 | EXPORT_SYMBOL(sn_dma_mapping_error); |
358 | 358 | ||
359 | u64 sn_dma_get_required_mask(struct device *dev) | ||
360 | { | ||
361 | return DMA_64BIT_MASK; | ||
362 | } | ||
363 | EXPORT_SYMBOL_GPL(sn_dma_get_required_mask); | ||
364 | |||
359 | char *sn_pci_get_legacy_mem(struct pci_bus *bus) | 365 | char *sn_pci_get_legacy_mem(struct pci_bus *bus) |
360 | { | 366 | { |
361 | if (!SN_PCIBUS_BUSSOFT(bus)) | 367 | if (!SN_PCIBUS_BUSSOFT(bus)) |
diff --git a/arch/ia64/xen/time.c b/arch/ia64/xen/time.c index d15a94c330fb..68d6204c3f16 100644 --- a/arch/ia64/xen/time.c +++ b/arch/ia64/xen/time.c | |||
@@ -129,8 +129,8 @@ consider_steal_time(unsigned long new_itm) | |||
129 | blocked = stolentick; | 129 | blocked = stolentick; |
130 | 130 | ||
131 | if (stolen > 0 || blocked > 0) { | 131 | if (stolen > 0 || blocked > 0) { |
132 | account_steal_time(NULL, jiffies_to_cputime(stolen)); | 132 | account_steal_ticks(stolen); |
133 | account_steal_time(idle_task(cpu), jiffies_to_cputime(blocked)); | 133 | account_idle_ticks(blocked); |
134 | run_local_timers(); | 134 | run_local_timers(); |
135 | 135 | ||
136 | if (rcu_pending(cpu)) | 136 | if (rcu_pending(cpu)) |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 3e38b74b6124..368d1638ee78 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -144,6 +144,7 @@ extern int acct_parm[]; | |||
144 | 144 | ||
145 | #ifdef CONFIG_IA64 | 145 | #ifdef CONFIG_IA64 |
146 | extern int no_unaligned_warning; | 146 | extern int no_unaligned_warning; |
147 | extern int unaligned_dump_stack; | ||
147 | #endif | 148 | #endif |
148 | 149 | ||
149 | #ifdef CONFIG_RT_MUTEXES | 150 | #ifdef CONFIG_RT_MUTEXES |
@@ -781,6 +782,14 @@ static struct ctl_table kern_table[] = { | |||
781 | .mode = 0644, | 782 | .mode = 0644, |
782 | .proc_handler = &proc_dointvec, | 783 | .proc_handler = &proc_dointvec, |
783 | }, | 784 | }, |
785 | { | ||
786 | .ctl_name = CTL_UNNUMBERED, | ||
787 | .procname = "unaligned-dump-stack", | ||
788 | .data = &unaligned_dump_stack, | ||
789 | .maxlen = sizeof (int), | ||
790 | .mode = 0644, | ||
791 | .proc_handler = &proc_dointvec, | ||
792 | }, | ||
784 | #endif | 793 | #endif |
785 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 794 | #ifdef CONFIG_DETECT_SOFTLOCKUP |
786 | { | 795 | { |