diff options
author | Tejun Heo <tj@kernel.org> | 2009-08-14 01:41:02 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-08-14 01:45:31 -0400 |
commit | 384be2b18a5f9475eab9ca2bdfa95cc1a04ef59c (patch) | |
tree | 04c93f391a1b65c8bf8d7ba8643c07d26c26590a /arch/blackfin/kernel | |
parent | a76761b621bcd8336065c4fe3a74f046858bc34c (diff) | |
parent | 142d44b0dd6741a64a7bdbe029110e7c1dcf1d23 (diff) |
Merge branch 'percpu-for-linus' into percpu-for-next
Conflicts:
arch/sparc/kernel/smp_64.c
arch/x86/kernel/cpu/perf_counter.c
arch/x86/kernel/setup_percpu.c
drivers/cpufreq/cpufreq_ondemand.c
mm/percpu.c
Conflicts in core and arch percpu codes are mostly from commit
ed78e1e078dd44249f88b1dd8c76dafb39567161 which substituted many
num_possible_cpus() with nr_cpu_ids. As for-next branch has moved all
the first chunk allocators into mm/percpu.c, the changes are moved
from arch code to mm/percpu.c.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r-- | arch/blackfin/kernel/bfin_dma_5xx.c | 29 | ||||
-rw-r--r-- | arch/blackfin/kernel/bfin_gpio.c | 6 | ||||
-rw-r--r-- | arch/blackfin/kernel/cplb-nompu/cplbinit.c | 23 | ||||
-rw-r--r-- | arch/blackfin/kernel/process.c | 14 | ||||
-rw-r--r-- | arch/blackfin/kernel/ptrace.c | 1 | ||||
-rw-r--r-- | arch/blackfin/kernel/setup.c | 85 | ||||
-rw-r--r-- | arch/blackfin/kernel/sys_bfin.c | 1 | ||||
-rw-r--r-- | arch/blackfin/kernel/traps.c | 43 |
8 files changed, 103 insertions, 99 deletions
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index e0bf8cc0690..9f9b8281665 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c | |||
@@ -253,32 +253,31 @@ void __init early_dma_memcpy(void *pdst, const void *psrc, size_t size) | |||
253 | BUG_ON(src % 4); | 253 | BUG_ON(src % 4); |
254 | BUG_ON(size % 4); | 254 | BUG_ON(size % 4); |
255 | 255 | ||
256 | /* Force a sync in case a previous config reset on this channel | ||
257 | * occurred. This is needed so subsequent writes to DMA registers | ||
258 | * are not spuriously lost/corrupted. | ||
259 | */ | ||
260 | __builtin_bfin_ssync(); | ||
261 | |||
262 | src_ch = 0; | 256 | src_ch = 0; |
263 | /* Find an avalible memDMA channel */ | 257 | /* Find an avalible memDMA channel */ |
264 | while (1) { | 258 | while (1) { |
265 | if (!src_ch || src_ch == (struct dma_register *)MDMA_S1_NEXT_DESC_PTR) { | 259 | if (src_ch == (struct dma_register *)MDMA_S0_NEXT_DESC_PTR) { |
266 | dst_ch = (struct dma_register *)MDMA_D0_NEXT_DESC_PTR; | ||
267 | src_ch = (struct dma_register *)MDMA_S0_NEXT_DESC_PTR; | ||
268 | } else { | ||
269 | dst_ch = (struct dma_register *)MDMA_D1_NEXT_DESC_PTR; | 260 | dst_ch = (struct dma_register *)MDMA_D1_NEXT_DESC_PTR; |
270 | src_ch = (struct dma_register *)MDMA_S1_NEXT_DESC_PTR; | 261 | src_ch = (struct dma_register *)MDMA_S1_NEXT_DESC_PTR; |
262 | } else { | ||
263 | dst_ch = (struct dma_register *)MDMA_D0_NEXT_DESC_PTR; | ||
264 | src_ch = (struct dma_register *)MDMA_S0_NEXT_DESC_PTR; | ||
271 | } | 265 | } |
272 | 266 | ||
273 | if (!bfin_read16(&src_ch->cfg)) { | 267 | if (!bfin_read16(&src_ch->cfg)) |
268 | break; | ||
269 | else if (bfin_read16(&dst_ch->irq_status) & DMA_DONE) { | ||
270 | bfin_write16(&src_ch->cfg, 0); | ||
274 | break; | 271 | break; |
275 | } else { | ||
276 | if (bfin_read16(&src_ch->irq_status) & DMA_DONE) | ||
277 | bfin_write16(&src_ch->cfg, 0); | ||
278 | } | 272 | } |
279 | |||
280 | } | 273 | } |
281 | 274 | ||
275 | /* Force a sync in case a previous config reset on this channel | ||
276 | * occurred. This is needed so subsequent writes to DMA registers | ||
277 | * are not spuriously lost/corrupted. | ||
278 | */ | ||
279 | __builtin_bfin_ssync(); | ||
280 | |||
282 | /* Destination */ | 281 | /* Destination */ |
283 | bfin_write32(&dst_ch->start_addr, dst); | 282 | bfin_write32(&dst_ch->start_addr, dst); |
284 | bfin_write16(&dst_ch->x_count, size >> 2); | 283 | bfin_write16(&dst_ch->x_count, size >> 2); |
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index beffa00a93c..6b944627137 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
@@ -686,14 +686,12 @@ void bfin_gpio_pm_hibernate_restore(void) | |||
686 | *port_fer[bank] = gpio_bank_saved[bank].fer; | 686 | *port_fer[bank] = gpio_bank_saved[bank].fer; |
687 | #endif | 687 | #endif |
688 | gpio_array[bank]->inen = gpio_bank_saved[bank].inen; | 688 | gpio_array[bank]->inen = gpio_bank_saved[bank].inen; |
689 | gpio_array[bank]->data_set = gpio_bank_saved[bank].data | ||
690 | & gpio_bank_saved[bank].dir; | ||
689 | gpio_array[bank]->dir = gpio_bank_saved[bank].dir; | 691 | gpio_array[bank]->dir = gpio_bank_saved[bank].dir; |
690 | gpio_array[bank]->polar = gpio_bank_saved[bank].polar; | 692 | gpio_array[bank]->polar = gpio_bank_saved[bank].polar; |
691 | gpio_array[bank]->edge = gpio_bank_saved[bank].edge; | 693 | gpio_array[bank]->edge = gpio_bank_saved[bank].edge; |
692 | gpio_array[bank]->both = gpio_bank_saved[bank].both; | 694 | gpio_array[bank]->both = gpio_bank_saved[bank].both; |
693 | |||
694 | gpio_array[bank]->data_set = gpio_bank_saved[bank].data | ||
695 | | gpio_bank_saved[bank].dir; | ||
696 | |||
697 | gpio_array[bank]->maska = gpio_bank_saved[bank].maska; | 695 | gpio_array[bank]->maska = gpio_bank_saved[bank].maska; |
698 | } | 696 | } |
699 | AWA_DUMMY_READ(maska); | 697 | AWA_DUMMY_READ(maska); |
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c index d6c067782e6..685f160a5a3 100644 --- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c +++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c | |||
@@ -72,13 +72,24 @@ void __init generate_cplb_tables_cpu(unsigned int cpu) | |||
72 | } | 72 | } |
73 | 73 | ||
74 | /* Cover L1 memory. One 4M area for code and data each is enough. */ | 74 | /* Cover L1 memory. One 4M area for code and data each is enough. */ |
75 | if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) { | 75 | if (cpu == 0) { |
76 | d_tbl[i_d].addr = L1_DATA_A_START; | 76 | if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) { |
77 | d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB; | 77 | d_tbl[i_d].addr = L1_DATA_A_START; |
78 | d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB; | ||
79 | } | ||
80 | i_tbl[i_i].addr = L1_CODE_START; | ||
81 | i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB; | ||
78 | } | 82 | } |
79 | i_tbl[i_i].addr = L1_CODE_START; | 83 | #ifdef CONFIG_SMP |
80 | i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB; | 84 | else { |
81 | 85 | if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) { | |
86 | d_tbl[i_d].addr = COREB_L1_DATA_A_START; | ||
87 | d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB; | ||
88 | } | ||
89 | i_tbl[i_i].addr = COREB_L1_CODE_START; | ||
90 | i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB; | ||
91 | } | ||
92 | #endif | ||
82 | first_switched_dcplb = i_d; | 93 | first_switched_dcplb = i_d; |
83 | first_switched_icplb = i_i; | 94 | first_switched_icplb = i_i; |
84 | 95 | ||
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 79cad0ac589..9da36bab7cc 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -361,7 +361,7 @@ static inline | |||
361 | int in_mem_const(unsigned long addr, unsigned long size, | 361 | int in_mem_const(unsigned long addr, unsigned long size, |
362 | unsigned long const_addr, unsigned long const_size) | 362 | unsigned long const_addr, unsigned long const_size) |
363 | { | 363 | { |
364 | return in_mem_const_off(addr, 0, size, const_addr, const_size); | 364 | return in_mem_const_off(addr, size, 0, const_addr, const_size); |
365 | } | 365 | } |
366 | #define IN_ASYNC(bnum, bctlnum) \ | 366 | #define IN_ASYNC(bnum, bctlnum) \ |
367 | ({ \ | 367 | ({ \ |
@@ -390,13 +390,13 @@ int bfin_mem_access_type(unsigned long addr, unsigned long size) | |||
390 | if (in_mem_const(addr, size, L1_DATA_B_START, L1_DATA_B_LENGTH)) | 390 | if (in_mem_const(addr, size, L1_DATA_B_START, L1_DATA_B_LENGTH)) |
391 | return cpu == 0 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; | 391 | return cpu == 0 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; |
392 | #ifdef COREB_L1_CODE_START | 392 | #ifdef COREB_L1_CODE_START |
393 | if (in_mem_const(addr, size, COREB_L1_CODE_START, L1_CODE_LENGTH)) | 393 | if (in_mem_const(addr, size, COREB_L1_CODE_START, COREB_L1_CODE_LENGTH)) |
394 | return cpu == 1 ? BFIN_MEM_ACCESS_ITEST : BFIN_MEM_ACCESS_IDMA; | 394 | return cpu == 1 ? BFIN_MEM_ACCESS_ITEST : BFIN_MEM_ACCESS_IDMA; |
395 | if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH)) | 395 | if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH)) |
396 | return cpu == 1 ? BFIN_MEM_ACCESS_CORE_ONLY : -EFAULT; | 396 | return cpu == 1 ? BFIN_MEM_ACCESS_CORE_ONLY : -EFAULT; |
397 | if (in_mem_const(addr, size, COREB_L1_DATA_A_START, L1_DATA_A_LENGTH)) | 397 | if (in_mem_const(addr, size, COREB_L1_DATA_A_START, COREB_L1_DATA_A_LENGTH)) |
398 | return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; | 398 | return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; |
399 | if (in_mem_const(addr, size, COREB_L1_DATA_B_START, L1_DATA_B_LENGTH)) | 399 | if (in_mem_const(addr, size, COREB_L1_DATA_B_START, COREB_L1_DATA_B_LENGTH)) |
400 | return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; | 400 | return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; |
401 | #endif | 401 | #endif |
402 | if (in_mem_const(addr, size, L2_START, L2_LENGTH)) | 402 | if (in_mem_const(addr, size, L2_START, L2_LENGTH)) |
@@ -472,13 +472,13 @@ int _access_ok(unsigned long addr, unsigned long size) | |||
472 | if (in_mem_const_off(addr, size, _ebss_b_l1 - _sdata_b_l1, L1_DATA_B_START, L1_DATA_B_LENGTH)) | 472 | if (in_mem_const_off(addr, size, _ebss_b_l1 - _sdata_b_l1, L1_DATA_B_START, L1_DATA_B_LENGTH)) |
473 | return 1; | 473 | return 1; |
474 | #ifdef COREB_L1_CODE_START | 474 | #ifdef COREB_L1_CODE_START |
475 | if (in_mem_const(addr, size, COREB_L1_CODE_START, L1_CODE_LENGTH)) | 475 | if (in_mem_const(addr, size, COREB_L1_CODE_START, COREB_L1_CODE_LENGTH)) |
476 | return 1; | 476 | return 1; |
477 | if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH)) | 477 | if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH)) |
478 | return 1; | 478 | return 1; |
479 | if (in_mem_const(addr, size, COREB_L1_DATA_A_START, L1_DATA_A_LENGTH)) | 479 | if (in_mem_const(addr, size, COREB_L1_DATA_A_START, COREB_L1_DATA_A_LENGTH)) |
480 | return 1; | 480 | return 1; |
481 | if (in_mem_const(addr, size, COREB_L1_DATA_B_START, L1_DATA_B_LENGTH)) | 481 | if (in_mem_const(addr, size, COREB_L1_DATA_B_START, COREB_L1_DATA_B_LENGTH)) |
482 | return 1; | 482 | return 1; |
483 | #endif | 483 | #endif |
484 | if (in_mem_const_off(addr, size, _ebss_l2 - _stext_l2, L2_START, L2_LENGTH)) | 484 | if (in_mem_const_off(addr, size, _ebss_l2 - _stext_l2, L2_START, L2_LENGTH)) |
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c index d76618db50d..6a387eec6b6 100644 --- a/arch/blackfin/kernel/ptrace.c +++ b/arch/blackfin/kernel/ptrace.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/mm.h> | 32 | #include <linux/mm.h> |
33 | #include <linux/smp.h> | 33 | #include <linux/smp.h> |
34 | #include <linux/smp_lock.h> | ||
35 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
36 | #include <linux/ptrace.h> | 35 | #include <linux/ptrace.h> |
37 | #include <linux/user.h> | 36 | #include <linux/user.h> |
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 298f023bcc0..6225edae488 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -168,7 +168,6 @@ void __cpuinit bfin_setup_cpudata(unsigned int cpu) | |||
168 | struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu); | 168 | struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu); |
169 | 169 | ||
170 | cpudata->idle = current; | 170 | cpudata->idle = current; |
171 | cpudata->loops_per_jiffy = loops_per_jiffy; | ||
172 | cpudata->imemctl = bfin_read_IMEM_CONTROL(); | 171 | cpudata->imemctl = bfin_read_IMEM_CONTROL(); |
173 | cpudata->dmemctl = bfin_read_DMEM_CONTROL(); | 172 | cpudata->dmemctl = bfin_read_DMEM_CONTROL(); |
174 | } | 173 | } |
@@ -408,13 +407,14 @@ static void __init print_memory_map(char *who) | |||
408 | bfin_memmap.map[i].addr + bfin_memmap.map[i].size); | 407 | bfin_memmap.map[i].addr + bfin_memmap.map[i].size); |
409 | switch (bfin_memmap.map[i].type) { | 408 | switch (bfin_memmap.map[i].type) { |
410 | case BFIN_MEMMAP_RAM: | 409 | case BFIN_MEMMAP_RAM: |
411 | printk("(usable)\n"); | 410 | printk(KERN_CONT "(usable)\n"); |
412 | break; | 411 | break; |
413 | case BFIN_MEMMAP_RESERVED: | 412 | case BFIN_MEMMAP_RESERVED: |
414 | printk("(reserved)\n"); | 413 | printk(KERN_CONT "(reserved)\n"); |
415 | break; | 414 | break; |
416 | default: printk("type %lu\n", bfin_memmap.map[i].type); | 415 | default: |
417 | break; | 416 | printk(KERN_CONT "type %lu\n", bfin_memmap.map[i].type); |
417 | break; | ||
418 | } | 418 | } |
419 | } | 419 | } |
420 | } | 420 | } |
@@ -567,17 +567,23 @@ static __init void memory_setup(void) | |||
567 | # endif /* ANOMALY_05000263 */ | 567 | # endif /* ANOMALY_05000263 */ |
568 | # endif /* CONFIG_ROMFS_FS */ | 568 | # endif /* CONFIG_ROMFS_FS */ |
569 | 569 | ||
570 | memory_end -= mtd_size; | 570 | /* Since the default MTD_UCLINUX has no magic number, we just blindly |
571 | 571 | * read 8 past the end of the kernel's image, and look at it. | |
572 | if (mtd_size == 0) { | 572 | * When no image is attached, mtd_size is set to a random number |
573 | console_init(); | 573 | * Do some basic sanity checks before operating on things |
574 | panic("Don't boot kernel without rootfs attached."); | 574 | */ |
575 | if (mtd_size == 0 || memory_end <= mtd_size) { | ||
576 | pr_emerg("Could not find valid ram mtd attached.\n"); | ||
577 | } else { | ||
578 | memory_end -= mtd_size; | ||
579 | |||
580 | /* Relocate MTD image to the top of memory after the uncached memory area */ | ||
581 | uclinux_ram_map.phys = memory_mtd_start = memory_end; | ||
582 | uclinux_ram_map.size = mtd_size; | ||
583 | pr_info("Found mtd parition at 0x%p, (len=0x%lx), moving to 0x%p\n", | ||
584 | _end, mtd_size, (void *)memory_mtd_start); | ||
585 | dma_memcpy((void *)uclinux_ram_map.phys, _end, uclinux_ram_map.size); | ||
575 | } | 586 | } |
576 | |||
577 | /* Relocate MTD image to the top of memory after the uncached memory area */ | ||
578 | uclinux_ram_map.phys = memory_mtd_start = memory_end; | ||
579 | uclinux_ram_map.size = mtd_size; | ||
580 | dma_memcpy((void *)uclinux_ram_map.phys, _end, uclinux_ram_map.size); | ||
581 | #endif /* CONFIG_MTD_UCLINUX */ | 587 | #endif /* CONFIG_MTD_UCLINUX */ |
582 | 588 | ||
583 | #if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263) | 589 | #if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263) |
@@ -614,19 +620,19 @@ static __init void memory_setup(void) | |||
614 | printk(KERN_INFO "Kernel Managed Memory: %ldMB\n", _ramend >> 20); | 620 | printk(KERN_INFO "Kernel Managed Memory: %ldMB\n", _ramend >> 20); |
615 | 621 | ||
616 | printk(KERN_INFO "Memory map:\n" | 622 | printk(KERN_INFO "Memory map:\n" |
617 | KERN_INFO " fixedcode = 0x%p-0x%p\n" | 623 | " fixedcode = 0x%p-0x%p\n" |
618 | KERN_INFO " text = 0x%p-0x%p\n" | 624 | " text = 0x%p-0x%p\n" |
619 | KERN_INFO " rodata = 0x%p-0x%p\n" | 625 | " rodata = 0x%p-0x%p\n" |
620 | KERN_INFO " bss = 0x%p-0x%p\n" | 626 | " bss = 0x%p-0x%p\n" |
621 | KERN_INFO " data = 0x%p-0x%p\n" | 627 | " data = 0x%p-0x%p\n" |
622 | KERN_INFO " stack = 0x%p-0x%p\n" | 628 | " stack = 0x%p-0x%p\n" |
623 | KERN_INFO " init = 0x%p-0x%p\n" | 629 | " init = 0x%p-0x%p\n" |
624 | KERN_INFO " available = 0x%p-0x%p\n" | 630 | " available = 0x%p-0x%p\n" |
625 | #ifdef CONFIG_MTD_UCLINUX | 631 | #ifdef CONFIG_MTD_UCLINUX |
626 | KERN_INFO " rootfs = 0x%p-0x%p\n" | 632 | " rootfs = 0x%p-0x%p\n" |
627 | #endif | 633 | #endif |
628 | #if DMA_UNCACHED_REGION > 0 | 634 | #if DMA_UNCACHED_REGION > 0 |
629 | KERN_INFO " DMA Zone = 0x%p-0x%p\n" | 635 | " DMA Zone = 0x%p-0x%p\n" |
630 | #endif | 636 | #endif |
631 | , (void *)FIXED_CODE_START, (void *)FIXED_CODE_END, | 637 | , (void *)FIXED_CODE_START, (void *)FIXED_CODE_END, |
632 | _stext, _etext, | 638 | _stext, _etext, |
@@ -859,20 +865,13 @@ void __init setup_arch(char **cmdline_p) | |||
859 | #endif | 865 | #endif |
860 | printk(KERN_INFO "Hardware Trace "); | 866 | printk(KERN_INFO "Hardware Trace "); |
861 | if (bfin_read_TBUFCTL() & 0x1) | 867 | if (bfin_read_TBUFCTL() & 0x1) |
862 | printk("Active "); | 868 | printk(KERN_CONT "Active "); |
863 | else | 869 | else |
864 | printk("Off "); | 870 | printk(KERN_CONT "Off "); |
865 | if (bfin_read_TBUFCTL() & 0x2) | 871 | if (bfin_read_TBUFCTL() & 0x2) |
866 | printk("and Enabled\n"); | 872 | printk(KERN_CONT "and Enabled\n"); |
867 | else | 873 | else |
868 | printk("and Disabled\n"); | 874 | printk(KERN_CONT "and Disabled\n"); |
869 | |||
870 | #if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH) | ||
871 | /* we need to initialize the Flashrom device here since we might | ||
872 | * do things with flash early on in the boot | ||
873 | */ | ||
874 | flash_probe(); | ||
875 | #endif | ||
876 | 875 | ||
877 | printk(KERN_INFO "Boot Mode: %i\n", bfin_read_SYSCR() & 0xF); | 876 | printk(KERN_INFO "Boot Mode: %i\n", bfin_read_SYSCR() & 0xF); |
878 | 877 | ||
@@ -937,10 +936,6 @@ void __init setup_arch(char **cmdline_p) | |||
937 | CPU, bfin_revid()); | 936 | CPU, bfin_revid()); |
938 | } | 937 | } |
939 | 938 | ||
940 | /* We can't run on BF548-0.1 due to ANOMALY 05000448 */ | ||
941 | if (bfin_cpuid() == 0x27de && bfin_revid() == 1) | ||
942 | panic("You can't run on this processor due to 05000448"); | ||
943 | |||
944 | printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n"); | 939 | printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n"); |
945 | 940 | ||
946 | printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n", | 941 | printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n", |
@@ -1163,9 +1158,9 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1163 | sclk/1000000, sclk%1000000); | 1158 | sclk/1000000, sclk%1000000); |
1164 | seq_printf(m, "bogomips\t: %lu.%02lu\n" | 1159 | seq_printf(m, "bogomips\t: %lu.%02lu\n" |
1165 | "Calibration\t: %lu loops\n", | 1160 | "Calibration\t: %lu loops\n", |
1166 | (cpudata->loops_per_jiffy * HZ) / 500000, | 1161 | (loops_per_jiffy * HZ) / 500000, |
1167 | ((cpudata->loops_per_jiffy * HZ) / 5000) % 100, | 1162 | ((loops_per_jiffy * HZ) / 5000) % 100, |
1168 | (cpudata->loops_per_jiffy * HZ)); | 1163 | (loops_per_jiffy * HZ)); |
1169 | 1164 | ||
1170 | /* Check Cache configutation */ | 1165 | /* Check Cache configutation */ |
1171 | switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) { | 1166 | switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) { |
diff --git a/arch/blackfin/kernel/sys_bfin.c b/arch/blackfin/kernel/sys_bfin.c index a8f1329c15a..3da60fb13ce 100644 --- a/arch/blackfin/kernel/sys_bfin.c +++ b/arch/blackfin/kernel/sys_bfin.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 29 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/smp_lock.h> | ||
33 | #include <linux/spinlock.h> | 32 | #include <linux/spinlock.h> |
34 | #include <linux/sem.h> | 33 | #include <linux/sem.h> |
35 | #include <linux/msg.h> | 34 | #include <linux/msg.h> |
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 8eeb457ce5d..bf2b2d1f8ae 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
@@ -212,7 +212,7 @@ asmlinkage void double_fault_c(struct pt_regs *fp) | |||
212 | console_verbose(); | 212 | console_verbose(); |
213 | oops_in_progress = 1; | 213 | oops_in_progress = 1; |
214 | #ifdef CONFIG_DEBUG_VERBOSE | 214 | #ifdef CONFIG_DEBUG_VERBOSE |
215 | printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n"); | 215 | printk(KERN_EMERG "Double Fault\n"); |
216 | #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT | 216 | #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT |
217 | if (((long)fp->seqstat & SEQSTAT_EXCAUSE) == VEC_UNCOV) { | 217 | if (((long)fp->seqstat & SEQSTAT_EXCAUSE) == VEC_UNCOV) { |
218 | unsigned int cpu = smp_processor_id(); | 218 | unsigned int cpu = smp_processor_id(); |
@@ -570,11 +570,12 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
570 | if (kernel_mode_regs(fp) || (current && !current->mm)) { | 570 | if (kernel_mode_regs(fp) || (current && !current->mm)) { |
571 | console_verbose(); | 571 | console_verbose(); |
572 | oops_in_progress = 1; | 572 | oops_in_progress = 1; |
573 | if (strerror) | ||
574 | verbose_printk(strerror); | ||
575 | } | 573 | } |
576 | 574 | ||
577 | if (sig != SIGTRAP) { | 575 | if (sig != SIGTRAP) { |
576 | if (strerror) | ||
577 | verbose_printk(strerror); | ||
578 | |||
578 | dump_bfin_process(fp); | 579 | dump_bfin_process(fp); |
579 | dump_bfin_mem(fp); | 580 | dump_bfin_mem(fp); |
580 | show_regs(fp); | 581 | show_regs(fp); |
@@ -583,15 +584,14 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
583 | #ifndef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE | 584 | #ifndef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE |
584 | if (trapnr == VEC_CPLB_I_M || trapnr == VEC_CPLB_M) | 585 | if (trapnr == VEC_CPLB_I_M || trapnr == VEC_CPLB_M) |
585 | verbose_printk(KERN_NOTICE "No trace since you do not have " | 586 | verbose_printk(KERN_NOTICE "No trace since you do not have " |
586 | "CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled\n" | 587 | "CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled\n\n"); |
587 | KERN_NOTICE "\n"); | ||
588 | else | 588 | else |
589 | #endif | 589 | #endif |
590 | dump_bfin_trace_buffer(); | 590 | dump_bfin_trace_buffer(); |
591 | 591 | ||
592 | if (oops_in_progress) { | 592 | if (oops_in_progress) { |
593 | /* Dump the current kernel stack */ | 593 | /* Dump the current kernel stack */ |
594 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "Kernel Stack\n"); | 594 | verbose_printk(KERN_NOTICE "Kernel Stack\n"); |
595 | show_stack(current, NULL); | 595 | show_stack(current, NULL); |
596 | print_modules(); | 596 | print_modules(); |
597 | #ifndef CONFIG_ACCESS_CHECK | 597 | #ifndef CONFIG_ACCESS_CHECK |
@@ -620,7 +620,9 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
620 | force_sig_info(sig, &info, current); | 620 | force_sig_info(sig, &info, current); |
621 | } | 621 | } |
622 | 622 | ||
623 | if (ANOMALY_05000461 && trapnr == VEC_HWERR && !access_ok(VERIFY_READ, fp->pc, 8)) | 623 | if ((ANOMALY_05000461 && trapnr == VEC_HWERR && !access_ok(VERIFY_READ, fp->pc, 8)) || |
624 | (ANOMALY_05000281 && trapnr == VEC_HWERR) || | ||
625 | (ANOMALY_05000189 && (trapnr == VEC_CPLB_I_VL || trapnr == VEC_CPLB_VL))) | ||
624 | fp->pc = SAFE_USER_INSTRUCTION; | 626 | fp->pc = SAFE_USER_INSTRUCTION; |
625 | 627 | ||
626 | traps_done: | 628 | traps_done: |
@@ -906,7 +908,7 @@ void show_stack(struct task_struct *task, unsigned long *stack) | |||
906 | 908 | ||
907 | ret_addr = 0; | 909 | ret_addr = 0; |
908 | if (!j && i % 8 == 0) | 910 | if (!j && i % 8 == 0) |
909 | printk("\n" KERN_NOTICE "%p:",addr); | 911 | printk(KERN_NOTICE "%p:",addr); |
910 | 912 | ||
911 | /* if it is an odd address, or zero, just skip it */ | 913 | /* if it is an odd address, or zero, just skip it */ |
912 | if (*addr & 0x1 || !*addr) | 914 | if (*addr & 0x1 || !*addr) |
@@ -996,9 +998,9 @@ void dump_bfin_process(struct pt_regs *fp) | |||
996 | 998 | ||
997 | printk(KERN_NOTICE "CPU = %d\n", current_thread_info()->cpu); | 999 | printk(KERN_NOTICE "CPU = %d\n", current_thread_info()->cpu); |
998 | if (!((unsigned long)current->mm & 0x3) && (unsigned long)current->mm >= FIXED_CODE_START) | 1000 | if (!((unsigned long)current->mm & 0x3) && (unsigned long)current->mm >= FIXED_CODE_START) |
999 | verbose_printk(KERN_NOTICE "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" | 1001 | verbose_printk(KERN_NOTICE |
1000 | KERN_NOTICE " BSS = 0x%p-0x%p USER-STACK = 0x%p\n" | 1002 | "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" |
1001 | KERN_NOTICE "\n", | 1003 | " BSS = 0x%p-0x%p USER-STACK = 0x%p\n\n", |
1002 | (void *)current->mm->start_code, | 1004 | (void *)current->mm->start_code, |
1003 | (void *)current->mm->end_code, | 1005 | (void *)current->mm->end_code, |
1004 | (void *)current->mm->start_data, | 1006 | (void *)current->mm->start_data, |
@@ -1009,8 +1011,8 @@ void dump_bfin_process(struct pt_regs *fp) | |||
1009 | else | 1011 | else |
1010 | verbose_printk(KERN_NOTICE "invalid mm\n"); | 1012 | verbose_printk(KERN_NOTICE "invalid mm\n"); |
1011 | } else | 1013 | } else |
1012 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE | 1014 | verbose_printk(KERN_NOTICE |
1013 | "No Valid process in current context\n"); | 1015 | "No Valid process in current context\n"); |
1014 | #endif | 1016 | #endif |
1015 | } | 1017 | } |
1016 | 1018 | ||
@@ -1028,7 +1030,7 @@ void dump_bfin_mem(struct pt_regs *fp) | |||
1028 | addr < (unsigned short *)((unsigned long)erraddr & ~0xF) + 0x10; | 1030 | addr < (unsigned short *)((unsigned long)erraddr & ~0xF) + 0x10; |
1029 | addr++) { | 1031 | addr++) { |
1030 | if (!((unsigned long)addr & 0xF)) | 1032 | if (!((unsigned long)addr & 0xF)) |
1031 | verbose_printk("\n" KERN_NOTICE "0x%p: ", addr); | 1033 | verbose_printk(KERN_NOTICE "0x%p: ", addr); |
1032 | 1034 | ||
1033 | if (!get_instruction(&val, addr)) { | 1035 | if (!get_instruction(&val, addr)) { |
1034 | val = 0; | 1036 | val = 0; |
@@ -1056,9 +1058,9 @@ void dump_bfin_mem(struct pt_regs *fp) | |||
1056 | oops_in_progress)){ | 1058 | oops_in_progress)){ |
1057 | verbose_printk(KERN_NOTICE "Looks like this was a deferred error - sorry\n"); | 1059 | verbose_printk(KERN_NOTICE "Looks like this was a deferred error - sorry\n"); |
1058 | #ifndef CONFIG_DEBUG_HWERR | 1060 | #ifndef CONFIG_DEBUG_HWERR |
1059 | verbose_printk(KERN_NOTICE "The remaining message may be meaningless\n" | 1061 | verbose_printk(KERN_NOTICE |
1060 | KERN_NOTICE "You should enable CONFIG_DEBUG_HWERR to get a" | 1062 | "The remaining message may be meaningless\n" |
1061 | " better idea where it came from\n"); | 1063 | "You should enable CONFIG_DEBUG_HWERR to get a better idea where it came from\n"); |
1062 | #else | 1064 | #else |
1063 | /* If we are handling only one peripheral interrupt | 1065 | /* If we are handling only one peripheral interrupt |
1064 | * and current mm and pid are valid, and the last error | 1066 | * and current mm and pid are valid, and the last error |
@@ -1114,9 +1116,10 @@ void show_regs(struct pt_regs *fp) | |||
1114 | 1116 | ||
1115 | verbose_printk(KERN_NOTICE "%s", linux_banner); | 1117 | verbose_printk(KERN_NOTICE "%s", linux_banner); |
1116 | 1118 | ||
1117 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\t\t%s\n", print_tainted()); | 1119 | verbose_printk(KERN_NOTICE "\nSEQUENCER STATUS:\t\t%s\n", |
1120 | print_tainted()); | ||
1118 | verbose_printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", | 1121 | verbose_printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", |
1119 | (long)fp->seqstat, fp->ipend, fp->syscfg); | 1122 | (long)fp->seqstat, fp->ipend, fp->syscfg); |
1120 | if ((fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) { | 1123 | if ((fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) { |
1121 | verbose_printk(KERN_NOTICE " HWERRCAUSE: 0x%lx\n", | 1124 | verbose_printk(KERN_NOTICE " HWERRCAUSE: 0x%lx\n", |
1122 | (fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14); | 1125 | (fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14); |
@@ -1184,7 +1187,7 @@ unlock: | |||
1184 | verbose_printk(KERN_NOTICE "ICPLB_FAULT_ADDR: %s\n", buf); | 1187 | verbose_printk(KERN_NOTICE "ICPLB_FAULT_ADDR: %s\n", buf); |
1185 | } | 1188 | } |
1186 | 1189 | ||
1187 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "PROCESSOR STATE:\n"); | 1190 | verbose_printk(KERN_NOTICE "PROCESSOR STATE:\n"); |
1188 | verbose_printk(KERN_NOTICE " R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n", | 1191 | verbose_printk(KERN_NOTICE " R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n", |
1189 | fp->r0, fp->r1, fp->r2, fp->r3); | 1192 | fp->r0, fp->r1, fp->r2, fp->r3); |
1190 | verbose_printk(KERN_NOTICE " R4 : %08lx R5 : %08lx R6 : %08lx R7 : %08lx\n", | 1193 | verbose_printk(KERN_NOTICE " R4 : %08lx R5 : %08lx R6 : %08lx R7 : %08lx\n", |