diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm/plat-s3c24xx/clock-dclk.c | 2 | ||||
| -rw-r--r-- | arch/ia64/Makefile | 5 | ||||
| -rw-r--r-- | arch/ia64/include/asm/bitops.h | 2 | ||||
| -rw-r--r-- | arch/ia64/include/asm/pgtable.h | 1 | ||||
| -rw-r--r-- | arch/ia64/kernel/ia64_ksyms.c | 4 | ||||
| -rw-r--r-- | arch/ia64/kernel/iosapic.c | 4 | ||||
| -rw-r--r-- | arch/ia64/kernel/pci-dma.c | 5 | ||||
| -rw-r--r-- | arch/ia64/kernel/topology.c | 6 | ||||
| -rw-r--r-- | arch/mn10300/include/asm/pci.h | 1 | ||||
| -rw-r--r-- | arch/powerpc/kernel/dma.c | 6 | ||||
| -rw-r--r-- | arch/powerpc/kernel/perf_counter.c | 8 | ||||
| -rw-r--r-- | arch/x86/kernel/tsc.c | 29 |
12 files changed, 45 insertions, 28 deletions
diff --git a/arch/arm/plat-s3c24xx/clock-dclk.c b/arch/arm/plat-s3c24xx/clock-dclk.c index 5b75a797b5ab..0afb217a775e 100644 --- a/arch/arm/plat-s3c24xx/clock-dclk.c +++ b/arch/arm/plat-s3c24xx/clock-dclk.c | |||
| @@ -129,7 +129,7 @@ static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent) | |||
| 129 | 129 | ||
| 130 | /* calculate the MISCCR setting for the clock */ | 130 | /* calculate the MISCCR setting for the clock */ |
| 131 | 131 | ||
| 132 | if (parent == &clk_xtal) | 132 | if (parent == &clk_mpll) |
| 133 | source = S3C2410_MISCCR_CLK0_MPLL; | 133 | source = S3C2410_MISCCR_CLK0_MPLL; |
| 134 | else if (parent == &clk_upll) | 134 | else if (parent == &clk_upll) |
| 135 | source = S3C2410_MISCCR_CLK0_UPLL; | 135 | source = S3C2410_MISCCR_CLK0_UPLL; |
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index 58a7e46affda..e7cbaa02cd0b 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile | |||
| @@ -41,11 +41,6 @@ $(error Sorry, you need a newer version of the assember, one that is built from | |||
| 41 | ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz) | 41 | ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz) |
| 42 | endif | 42 | endif |
| 43 | 43 | ||
| 44 | ifeq ($(call cc-version),0304) | ||
| 45 | cflags-$(CONFIG_ITANIUM) += -mtune=merced | ||
| 46 | cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley | ||
| 47 | endif | ||
| 48 | |||
| 49 | KBUILD_CFLAGS += $(cflags-y) | 44 | KBUILD_CFLAGS += $(cflags-y) |
| 50 | head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o | 45 | head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o |
| 51 | 46 | ||
diff --git a/arch/ia64/include/asm/bitops.h b/arch/ia64/include/asm/bitops.h index e2ca80037335..57a2787bc9fb 100644 --- a/arch/ia64/include/asm/bitops.h +++ b/arch/ia64/include/asm/bitops.h | |||
| @@ -286,7 +286,7 @@ __test_and_clear_bit(int nr, volatile void * addr) | |||
| 286 | { | 286 | { |
| 287 | __u32 *p = (__u32 *) addr + (nr >> 5); | 287 | __u32 *p = (__u32 *) addr + (nr >> 5); |
| 288 | __u32 m = 1 << (nr & 31); | 288 | __u32 m = 1 << (nr & 31); |
| 289 | int oldbitset = *p & m; | 289 | int oldbitset = (*p & m) != 0; |
| 290 | 290 | ||
| 291 | *p &= ~m; | 291 | *p &= ~m; |
| 292 | return oldbitset; | 292 | return oldbitset; |
diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h index 0a9cc73d35c7..8840a690d1e7 100644 --- a/arch/ia64/include/asm/pgtable.h +++ b/arch/ia64/include/asm/pgtable.h | |||
| @@ -155,7 +155,6 @@ | |||
| 155 | #include <linux/bitops.h> | 155 | #include <linux/bitops.h> |
| 156 | #include <asm/cacheflush.h> | 156 | #include <asm/cacheflush.h> |
| 157 | #include <asm/mmu_context.h> | 157 | #include <asm/mmu_context.h> |
| 158 | #include <asm/processor.h> | ||
| 159 | 158 | ||
| 160 | /* | 159 | /* |
| 161 | * Next come the mappings that determine how mmap() protection bits | 160 | * Next come the mappings that determine how mmap() protection bits |
diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c index 2d311864e359..8ebccb589e1c 100644 --- a/arch/ia64/kernel/ia64_ksyms.c +++ b/arch/ia64/kernel/ia64_ksyms.c | |||
| @@ -21,6 +21,7 @@ EXPORT_SYMBOL(csum_ipv6_magic); | |||
| 21 | 21 | ||
| 22 | #include <asm/page.h> | 22 | #include <asm/page.h> |
| 23 | EXPORT_SYMBOL(clear_page); | 23 | EXPORT_SYMBOL(clear_page); |
| 24 | EXPORT_SYMBOL(copy_page); | ||
| 24 | 25 | ||
| 25 | #ifdef CONFIG_VIRTUAL_MEM_MAP | 26 | #ifdef CONFIG_VIRTUAL_MEM_MAP |
| 26 | #include <linux/bootmem.h> | 27 | #include <linux/bootmem.h> |
| @@ -60,9 +61,6 @@ EXPORT_SYMBOL(__udivdi3); | |||
| 60 | EXPORT_SYMBOL(__moddi3); | 61 | EXPORT_SYMBOL(__moddi3); |
| 61 | EXPORT_SYMBOL(__umoddi3); | 62 | EXPORT_SYMBOL(__umoddi3); |
| 62 | 63 | ||
| 63 | #include <asm/page.h> | ||
| 64 | EXPORT_SYMBOL(copy_page); | ||
| 65 | |||
| 66 | #if defined(CONFIG_MD_RAID456) || defined(CONFIG_MD_RAID456_MODULE) | 64 | #if defined(CONFIG_MD_RAID456) || defined(CONFIG_MD_RAID456_MODULE) |
| 67 | extern void xor_ia64_2(void); | 65 | extern void xor_ia64_2(void); |
| 68 | extern void xor_ia64_3(void); | 66 | extern void xor_ia64_3(void); |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index c48b03f2b61d..dab4d393908c 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
| @@ -1072,6 +1072,10 @@ iosapic_init (unsigned long phys_addr, unsigned int gsi_base) | |||
| 1072 | } | 1072 | } |
| 1073 | 1073 | ||
| 1074 | addr = ioremap(phys_addr, 0); | 1074 | addr = ioremap(phys_addr, 0); |
| 1075 | if (addr == NULL) { | ||
| 1076 | spin_unlock_irqrestore(&iosapic_lock, flags); | ||
| 1077 | return -ENOMEM; | ||
| 1078 | } | ||
| 1075 | ver = iosapic_version(addr); | 1079 | ver = iosapic_version(addr); |
| 1076 | if ((err = iosapic_check_gsi_range(gsi_base, ver))) { | 1080 | if ((err = iosapic_check_gsi_range(gsi_base, ver))) { |
| 1077 | iounmap(addr); | 1081 | iounmap(addr); |
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c index 05695962fe44..f6b1ff0aea76 100644 --- a/arch/ia64/kernel/pci-dma.c +++ b/arch/ia64/kernel/pci-dma.c | |||
| @@ -69,11 +69,6 @@ iommu_dma_init(void) | |||
| 69 | 69 | ||
| 70 | int iommu_dma_supported(struct device *dev, u64 mask) | 70 | int iommu_dma_supported(struct device *dev, u64 mask) |
| 71 | { | 71 | { |
| 72 | struct dma_map_ops *ops = platform_dma_get_ops(dev); | ||
| 73 | |||
| 74 | if (ops->dma_supported) | ||
| 75 | return ops->dma_supported(dev, mask); | ||
| 76 | |||
| 77 | /* Copied from i386. Doesn't make much sense, because it will | 72 | /* Copied from i386. Doesn't make much sense, because it will |
| 78 | only work for pci_alloc_coherent. | 73 | only work for pci_alloc_coherent. |
| 79 | The caller just has to use GFP_DMA in this case. */ | 74 | The caller just has to use GFP_DMA in this case. */ |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index bc80dff1df7a..8f060352e129 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
| @@ -372,6 +372,10 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev) | |||
| 372 | retval = kobject_init_and_add(&all_cpu_cache_info[cpu].kobj, | 372 | retval = kobject_init_and_add(&all_cpu_cache_info[cpu].kobj, |
| 373 | &cache_ktype_percpu_entry, &sys_dev->kobj, | 373 | &cache_ktype_percpu_entry, &sys_dev->kobj, |
| 374 | "%s", "cache"); | 374 | "%s", "cache"); |
| 375 | if (unlikely(retval < 0)) { | ||
| 376 | cpu_cache_sysfs_exit(cpu); | ||
| 377 | return retval; | ||
| 378 | } | ||
| 375 | 379 | ||
| 376 | for (i = 0; i < all_cpu_cache_info[cpu].num_cache_leaves; i++) { | 380 | for (i = 0; i < all_cpu_cache_info[cpu].num_cache_leaves; i++) { |
| 377 | this_object = LEAF_KOBJECT_PTR(cpu,i); | 381 | this_object = LEAF_KOBJECT_PTR(cpu,i); |
| @@ -385,7 +389,7 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev) | |||
| 385 | } | 389 | } |
| 386 | kobject_put(&all_cpu_cache_info[cpu].kobj); | 390 | kobject_put(&all_cpu_cache_info[cpu].kobj); |
| 387 | cpu_cache_sysfs_exit(cpu); | 391 | cpu_cache_sysfs_exit(cpu); |
| 388 | break; | 392 | return retval; |
| 389 | } | 393 | } |
| 390 | kobject_uevent(&(this_object->kobj), KOBJ_ADD); | 394 | kobject_uevent(&(this_object->kobj), KOBJ_ADD); |
| 391 | } | 395 | } |
diff --git a/arch/mn10300/include/asm/pci.h b/arch/mn10300/include/asm/pci.h index 35d2ed6396f6..19aecc90f7a4 100644 --- a/arch/mn10300/include/asm/pci.h +++ b/arch/mn10300/include/asm/pci.h | |||
| @@ -59,7 +59,6 @@ void pcibios_penalize_isa_irq(int irq); | |||
| 59 | #include <linux/slab.h> | 59 | #include <linux/slab.h> |
| 60 | #include <asm/scatterlist.h> | 60 | #include <asm/scatterlist.h> |
| 61 | #include <linux/string.h> | 61 | #include <linux/string.h> |
| 62 | #include <linux/mm.h> | ||
| 63 | #include <asm/io.h> | 62 | #include <asm/io.h> |
| 64 | 63 | ||
| 65 | struct pci_dev; | 64 | struct pci_dev; |
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index 20a60d661ba8..ccf129d47d84 100644 --- a/arch/powerpc/kernel/dma.c +++ b/arch/powerpc/kernel/dma.c | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | #include <linux/device.h> | 8 | #include <linux/device.h> |
| 9 | #include <linux/dma-mapping.h> | 9 | #include <linux/dma-mapping.h> |
| 10 | #include <linux/lmb.h> | ||
| 10 | #include <asm/bug.h> | 11 | #include <asm/bug.h> |
| 11 | #include <asm/abs_addr.h> | 12 | #include <asm/abs_addr.h> |
| 12 | 13 | ||
| @@ -90,11 +91,10 @@ static void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sg, | |||
| 90 | static int dma_direct_dma_supported(struct device *dev, u64 mask) | 91 | static int dma_direct_dma_supported(struct device *dev, u64 mask) |
| 91 | { | 92 | { |
| 92 | #ifdef CONFIG_PPC64 | 93 | #ifdef CONFIG_PPC64 |
| 93 | /* Could be improved to check for memory though it better be | 94 | /* Could be improved so platforms can set the limit in case |
| 94 | * done via some global so platforms can set the limit in case | ||
| 95 | * they have limited DMA windows | 95 | * they have limited DMA windows |
| 96 | */ | 96 | */ |
| 97 | return mask >= DMA_BIT_MASK(32); | 97 | return mask >= (lmb_end_of_DRAM() - 1); |
| 98 | #else | 98 | #else |
| 99 | return 1; | 99 | return 1; |
| 100 | #endif | 100 | #endif |
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c index 809fdf94b95f..70e1f57f7dd8 100644 --- a/arch/powerpc/kernel/perf_counter.c +++ b/arch/powerpc/kernel/perf_counter.c | |||
| @@ -518,6 +518,8 @@ void hw_perf_disable(void) | |||
| 518 | struct cpu_hw_counters *cpuhw; | 518 | struct cpu_hw_counters *cpuhw; |
| 519 | unsigned long flags; | 519 | unsigned long flags; |
| 520 | 520 | ||
| 521 | if (!ppmu) | ||
| 522 | return; | ||
| 521 | local_irq_save(flags); | 523 | local_irq_save(flags); |
| 522 | cpuhw = &__get_cpu_var(cpu_hw_counters); | 524 | cpuhw = &__get_cpu_var(cpu_hw_counters); |
| 523 | 525 | ||
| @@ -572,6 +574,8 @@ void hw_perf_enable(void) | |||
| 572 | int n_lim; | 574 | int n_lim; |
| 573 | int idx; | 575 | int idx; |
| 574 | 576 | ||
| 577 | if (!ppmu) | ||
| 578 | return; | ||
| 575 | local_irq_save(flags); | 579 | local_irq_save(flags); |
| 576 | cpuhw = &__get_cpu_var(cpu_hw_counters); | 580 | cpuhw = &__get_cpu_var(cpu_hw_counters); |
| 577 | if (!cpuhw->disabled) { | 581 | if (!cpuhw->disabled) { |
| @@ -737,6 +741,8 @@ int hw_perf_group_sched_in(struct perf_counter *group_leader, | |||
| 737 | long i, n, n0; | 741 | long i, n, n0; |
| 738 | struct perf_counter *sub; | 742 | struct perf_counter *sub; |
| 739 | 743 | ||
| 744 | if (!ppmu) | ||
| 745 | return 0; | ||
| 740 | cpuhw = &__get_cpu_var(cpu_hw_counters); | 746 | cpuhw = &__get_cpu_var(cpu_hw_counters); |
| 741 | n0 = cpuhw->n_counters; | 747 | n0 = cpuhw->n_counters; |
| 742 | n = collect_events(group_leader, ppmu->n_counter - n0, | 748 | n = collect_events(group_leader, ppmu->n_counter - n0, |
| @@ -1281,6 +1287,8 @@ void hw_perf_counter_setup(int cpu) | |||
| 1281 | { | 1287 | { |
| 1282 | struct cpu_hw_counters *cpuhw = &per_cpu(cpu_hw_counters, cpu); | 1288 | struct cpu_hw_counters *cpuhw = &per_cpu(cpu_hw_counters, cpu); |
| 1283 | 1289 | ||
| 1290 | if (!ppmu) | ||
| 1291 | return; | ||
| 1284 | memset(cpuhw, 0, sizeof(*cpuhw)); | 1292 | memset(cpuhw, 0, sizeof(*cpuhw)); |
| 1285 | cpuhw->mmcr[0] = MMCR0_FC; | 1293 | cpuhw->mmcr[0] = MMCR0_FC; |
| 1286 | } | 1294 | } |
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 6e1a368d21d4..71f4368b357e 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c | |||
| @@ -275,15 +275,20 @@ static unsigned long pit_calibrate_tsc(u32 latch, unsigned long ms, int loopmin) | |||
| 275 | * use the TSC value at the transitions to calculate a pretty | 275 | * use the TSC value at the transitions to calculate a pretty |
| 276 | * good value for the TSC frequencty. | 276 | * good value for the TSC frequencty. |
| 277 | */ | 277 | */ |
| 278 | static inline int pit_verify_msb(unsigned char val) | ||
| 279 | { | ||
| 280 | /* Ignore LSB */ | ||
| 281 | inb(0x42); | ||
| 282 | return inb(0x42) == val; | ||
| 283 | } | ||
| 284 | |||
| 278 | static inline int pit_expect_msb(unsigned char val, u64 *tscp, unsigned long *deltap) | 285 | static inline int pit_expect_msb(unsigned char val, u64 *tscp, unsigned long *deltap) |
| 279 | { | 286 | { |
| 280 | int count; | 287 | int count; |
| 281 | u64 tsc = 0; | 288 | u64 tsc = 0; |
| 282 | 289 | ||
| 283 | for (count = 0; count < 50000; count++) { | 290 | for (count = 0; count < 50000; count++) { |
| 284 | /* Ignore LSB */ | 291 | if (!pit_verify_msb(val)) |
| 285 | inb(0x42); | ||
| 286 | if (inb(0x42) != val) | ||
| 287 | break; | 292 | break; |
| 288 | tsc = get_cycles(); | 293 | tsc = get_cycles(); |
| 289 | } | 294 | } |
| @@ -336,8 +341,7 @@ static unsigned long quick_pit_calibrate(void) | |||
| 336 | * to do that is to just read back the 16-bit counter | 341 | * to do that is to just read back the 16-bit counter |
| 337 | * once from the PIT. | 342 | * once from the PIT. |
| 338 | */ | 343 | */ |
| 339 | inb(0x42); | 344 | pit_verify_msb(0); |
| 340 | inb(0x42); | ||
| 341 | 345 | ||
| 342 | if (pit_expect_msb(0xff, &tsc, &d1)) { | 346 | if (pit_expect_msb(0xff, &tsc, &d1)) { |
| 343 | for (i = 1; i <= MAX_QUICK_PIT_ITERATIONS; i++) { | 347 | for (i = 1; i <= MAX_QUICK_PIT_ITERATIONS; i++) { |
| @@ -348,8 +352,19 @@ static unsigned long quick_pit_calibrate(void) | |||
| 348 | * Iterate until the error is less than 500 ppm | 352 | * Iterate until the error is less than 500 ppm |
| 349 | */ | 353 | */ |
| 350 | delta -= tsc; | 354 | delta -= tsc; |
| 351 | if (d1+d2 < delta >> 11) | 355 | if (d1+d2 >= delta >> 11) |
| 352 | goto success; | 356 | continue; |
| 357 | |||
| 358 | /* | ||
| 359 | * Check the PIT one more time to verify that | ||
| 360 | * all TSC reads were stable wrt the PIT. | ||
| 361 | * | ||
| 362 | * This also guarantees serialization of the | ||
| 363 | * last cycle read ('d2') in pit_expect_msb. | ||
| 364 | */ | ||
| 365 | if (!pit_verify_msb(0xfe - i)) | ||
| 366 | break; | ||
| 367 | goto success; | ||
| 353 | } | 368 | } |
| 354 | } | 369 | } |
| 355 | printk("Fast TSC calibration failed\n"); | 370 | printk("Fast TSC calibration failed\n"); |
