diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-09-17 00:15:36 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-09-17 00:15:36 -0400 |
| commit | 6553daeafb4fa15cd07088f543352fa3779e86e1 (patch) | |
| tree | 1e1952e7ce3227160a9bec60b24dc816f495b6b8 /arch/sparc64 | |
| parent | edb1e9671a990e6eb9f593636deed7ac43ba9084 (diff) | |
| parent | 8a177c4f17c691c2c9a08a54709d37c6db481a0b (diff) | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: Warn user if cpu is ignored.
[SPARC64]: Fix lockdep, particularly on SMP.
[SPARC64]: Update defconfig.
Diffstat (limited to 'arch/sparc64')
| -rw-r--r-- | arch/sparc64/defconfig | 16 | ||||
| -rw-r--r-- | arch/sparc64/kernel/head.S | 35 | ||||
| -rw-r--r-- | arch/sparc64/kernel/mdesc.c | 6 | ||||
| -rw-r--r-- | arch/sparc64/kernel/prom.c | 6 | ||||
| -rw-r--r-- | arch/sparc64/kernel/trampoline.S | 33 | ||||
| -rw-r--r-- | arch/sparc64/prom/misc.c | 16 |
6 files changed, 73 insertions, 39 deletions
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index 68338a601f70..7d07297db878 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # | 1 | # |
| 2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
| 3 | # Linux kernel version: 2.6.23-rc1 | 3 | # Linux kernel version: 2.6.23-rc6 |
| 4 | # Sun Jul 22 19:24:37 2007 | 4 | # Sun Sep 16 09:52:11 2007 |
| 5 | # | 5 | # |
| 6 | CONFIG_SPARC=y | 6 | CONFIG_SPARC=y |
| 7 | CONFIG_SPARC64=y | 7 | CONFIG_SPARC64=y |
| @@ -32,15 +32,11 @@ CONFIG_HZ=100 | |||
| 32 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 32 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
| 33 | 33 | ||
| 34 | # | 34 | # |
| 35 | # Code maturity level options | 35 | # General setup |
| 36 | # | 36 | # |
| 37 | CONFIG_EXPERIMENTAL=y | 37 | CONFIG_EXPERIMENTAL=y |
| 38 | CONFIG_BROKEN_ON_SMP=y | 38 | CONFIG_BROKEN_ON_SMP=y |
| 39 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 39 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
| 40 | |||
| 41 | # | ||
| 42 | # General setup | ||
| 43 | # | ||
| 44 | CONFIG_LOCALVERSION="" | 40 | CONFIG_LOCALVERSION="" |
| 45 | # CONFIG_LOCALVERSION_AUTO is not set | 41 | # CONFIG_LOCALVERSION_AUTO is not set |
| 46 | CONFIG_SWAP=y | 42 | CONFIG_SWAP=y |
| @@ -555,6 +551,7 @@ CONFIG_E1000_NAPI=y | |||
| 555 | # CONFIG_SIS190 is not set | 551 | # CONFIG_SIS190 is not set |
| 556 | # CONFIG_SKGE is not set | 552 | # CONFIG_SKGE is not set |
| 557 | # CONFIG_SKY2 is not set | 553 | # CONFIG_SKY2 is not set |
| 554 | # CONFIG_SK98LIN is not set | ||
| 558 | # CONFIG_VIA_VELOCITY is not set | 555 | # CONFIG_VIA_VELOCITY is not set |
| 559 | CONFIG_TIGON3=m | 556 | CONFIG_TIGON3=m |
| 560 | CONFIG_BNX2=m | 557 | CONFIG_BNX2=m |
| @@ -809,6 +806,7 @@ CONFIG_HWMON=y | |||
| 809 | # CONFIG_SENSORS_SMSC47M1 is not set | 806 | # CONFIG_SENSORS_SMSC47M1 is not set |
| 810 | # CONFIG_SENSORS_SMSC47M192 is not set | 807 | # CONFIG_SENSORS_SMSC47M192 is not set |
| 811 | # CONFIG_SENSORS_SMSC47B397 is not set | 808 | # CONFIG_SENSORS_SMSC47B397 is not set |
| 809 | # CONFIG_SENSORS_THMC50 is not set | ||
| 812 | # CONFIG_SENSORS_VIA686A is not set | 810 | # CONFIG_SENSORS_VIA686A is not set |
| 813 | # CONFIG_SENSORS_VT1211 is not set | 811 | # CONFIG_SENSORS_VT1211 is not set |
| 814 | # CONFIG_SENSORS_VT8231 is not set | 812 | # CONFIG_SENSORS_VT8231 is not set |
| @@ -1162,10 +1160,6 @@ CONFIG_USB_STORAGE=m | |||
| 1162 | # CONFIG_MMC is not set | 1160 | # CONFIG_MMC is not set |
| 1163 | # CONFIG_NEW_LEDS is not set | 1161 | # CONFIG_NEW_LEDS is not set |
| 1164 | # CONFIG_INFINIBAND is not set | 1162 | # CONFIG_INFINIBAND is not set |
| 1165 | |||
| 1166 | # | ||
| 1167 | # Real Time Clock | ||
| 1168 | # | ||
| 1169 | # CONFIG_RTC_CLASS is not set | 1163 | # CONFIG_RTC_CLASS is not set |
| 1170 | 1164 | ||
| 1171 | # | 1165 | # |
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S index 63144ad476f6..c4147ad8677b 100644 --- a/arch/sparc64/kernel/head.S +++ b/arch/sparc64/kernel/head.S | |||
| @@ -98,7 +98,7 @@ sparc64_boot: | |||
| 98 | .globl prom_boot_mapped_pc, prom_boot_mapping_mode | 98 | .globl prom_boot_mapped_pc, prom_boot_mapping_mode |
| 99 | .globl prom_boot_mapping_phys_high, prom_boot_mapping_phys_low | 99 | .globl prom_boot_mapping_phys_high, prom_boot_mapping_phys_low |
| 100 | .globl prom_compatible_name, prom_cpu_path, prom_cpu_compatible | 100 | .globl prom_compatible_name, prom_cpu_path, prom_cpu_compatible |
| 101 | .globl is_sun4v, sun4v_chip_type | 101 | .globl is_sun4v, sun4v_chip_type, prom_set_trap_table_name |
| 102 | prom_peer_name: | 102 | prom_peer_name: |
| 103 | .asciz "peer" | 103 | .asciz "peer" |
| 104 | prom_compatible_name: | 104 | prom_compatible_name: |
| @@ -121,6 +121,8 @@ prom_map_name: | |||
| 121 | .asciz "map" | 121 | .asciz "map" |
| 122 | prom_unmap_name: | 122 | prom_unmap_name: |
| 123 | .asciz "unmap" | 123 | .asciz "unmap" |
| 124 | prom_set_trap_table_name: | ||
| 125 | .asciz "SUNW,set-trap-table" | ||
| 124 | prom_sun4v_name: | 126 | prom_sun4v_name: |
| 125 | .asciz "sun4v" | 127 | .asciz "sun4v" |
| 126 | prom_niagara_prefix: | 128 | prom_niagara_prefix: |
| @@ -691,15 +693,38 @@ setup_trap_table: | |||
| 691 | sethi %hi(kern_base), %g3 | 693 | sethi %hi(kern_base), %g3 |
| 692 | ldx [%g3 + %lo(kern_base)], %g3 | 694 | ldx [%g3 + %lo(kern_base)], %g3 |
| 693 | add %g2, %g3, %o1 | 695 | add %g2, %g3, %o1 |
| 696 | sethi %hi(sparc64_ttable_tl0), %o0 | ||
| 694 | 697 | ||
| 695 | call prom_set_trap_table_sun4v | 698 | set prom_set_trap_table_name, %g2 |
| 696 | sethi %hi(sparc64_ttable_tl0), %o0 | 699 | stx %g2, [%sp + 2047 + 128 + 0x00] |
| 700 | mov 2, %g2 | ||
| 701 | stx %g2, [%sp + 2047 + 128 + 0x08] | ||
| 702 | mov 0, %g2 | ||
| 703 | stx %g2, [%sp + 2047 + 128 + 0x10] | ||
| 704 | stx %o0, [%sp + 2047 + 128 + 0x18] | ||
| 705 | stx %o1, [%sp + 2047 + 128 + 0x20] | ||
| 706 | sethi %hi(p1275buf), %g2 | ||
| 707 | or %g2, %lo(p1275buf), %g2 | ||
| 708 | ldx [%g2 + 0x08], %o1 | ||
| 709 | call %o1 | ||
| 710 | add %sp, (2047 + 128), %o0 | ||
| 697 | 711 | ||
| 698 | ba,pt %xcc, 2f | 712 | ba,pt %xcc, 2f |
| 699 | nop | 713 | nop |
| 700 | 714 | ||
| 701 | 1: call prom_set_trap_table | 715 | 1: sethi %hi(sparc64_ttable_tl0), %o0 |
| 702 | sethi %hi(sparc64_ttable_tl0), %o0 | 716 | set prom_set_trap_table_name, %g2 |
| 717 | stx %g2, [%sp + 2047 + 128 + 0x00] | ||
| 718 | mov 1, %g2 | ||
| 719 | stx %g2, [%sp + 2047 + 128 + 0x08] | ||
| 720 | mov 0, %g2 | ||
| 721 | stx %g2, [%sp + 2047 + 128 + 0x10] | ||
| 722 | stx %o0, [%sp + 2047 + 128 + 0x18] | ||
| 723 | sethi %hi(p1275buf), %g2 | ||
| 724 | or %g2, %lo(p1275buf), %g2 | ||
| 725 | ldx [%g2 + 0x08], %o1 | ||
| 726 | call %o1 | ||
| 727 | add %sp, (2047 + 128), %o0 | ||
| 703 | 728 | ||
| 704 | /* Start using proper page size encodings in ctx register. */ | 729 | /* Start using proper page size encodings in ctx register. */ |
| 705 | 2: sethi %hi(sparc64_kern_pri_context), %g3 | 730 | 2: sethi %hi(sparc64_kern_pri_context), %g3 |
diff --git a/arch/sparc64/kernel/mdesc.c b/arch/sparc64/kernel/mdesc.c index 9f22e4ff6015..856659bb1311 100644 --- a/arch/sparc64/kernel/mdesc.c +++ b/arch/sparc64/kernel/mdesc.c | |||
| @@ -777,8 +777,12 @@ void __devinit mdesc_fill_in_cpu_data(cpumask_t mask) | |||
| 777 | cpuid = *id; | 777 | cpuid = *id; |
| 778 | 778 | ||
| 779 | #ifdef CONFIG_SMP | 779 | #ifdef CONFIG_SMP |
| 780 | if (cpuid >= NR_CPUS) | 780 | if (cpuid >= NR_CPUS) { |
| 781 | printk(KERN_WARNING "Ignoring CPU %d which is " | ||
| 782 | ">= NR_CPUS (%d)\n", | ||
| 783 | cpuid, NR_CPUS); | ||
| 781 | continue; | 784 | continue; |
| 785 | } | ||
| 782 | if (!cpu_isset(cpuid, mask)) | 786 | if (!cpu_isset(cpuid, mask)) |
| 783 | continue; | 787 | continue; |
| 784 | #else | 788 | #else |
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c index d1a78c976cef..0614dff63d7c 100644 --- a/arch/sparc64/kernel/prom.c +++ b/arch/sparc64/kernel/prom.c | |||
| @@ -1583,8 +1583,12 @@ static void __init of_fill_in_cpu_data(void) | |||
| 1583 | ncpus_probed++; | 1583 | ncpus_probed++; |
| 1584 | 1584 | ||
| 1585 | #ifdef CONFIG_SMP | 1585 | #ifdef CONFIG_SMP |
| 1586 | if (cpuid >= NR_CPUS) | 1586 | if (cpuid >= NR_CPUS) { |
| 1587 | printk(KERN_WARNING "Ignoring CPU %d which is " | ||
| 1588 | ">= NR_CPUS (%d)\n", | ||
| 1589 | cpuid, NR_CPUS); | ||
| 1587 | continue; | 1590 | continue; |
| 1591 | } | ||
| 1588 | #else | 1592 | #else |
| 1589 | /* On uniprocessor we only want the values for the | 1593 | /* On uniprocessor we only want the values for the |
| 1590 | * real physical cpu the kernel booted onto, however | 1594 | * real physical cpu the kernel booted onto, however |
diff --git a/arch/sparc64/kernel/trampoline.S b/arch/sparc64/kernel/trampoline.S index 9533a25ce5d2..04e81dda13d0 100644 --- a/arch/sparc64/kernel/trampoline.S +++ b/arch/sparc64/kernel/trampoline.S | |||
| @@ -345,7 +345,7 @@ after_lock_tlb: | |||
| 345 | sethi %hi(tramp_stack), %g1 | 345 | sethi %hi(tramp_stack), %g1 |
| 346 | or %g1, %lo(tramp_stack), %g1 | 346 | or %g1, %lo(tramp_stack), %g1 |
| 347 | add %g1, TRAMP_STACK_SIZE, %g1 | 347 | add %g1, TRAMP_STACK_SIZE, %g1 |
| 348 | sub %g1, STACKFRAME_SZ + STACK_BIAS, %sp | 348 | sub %g1, STACKFRAME_SZ + STACK_BIAS + 256, %sp |
| 349 | mov 0, %fp | 349 | mov 0, %fp |
| 350 | 350 | ||
| 351 | /* Put garbage in these registers to trap any access to them. */ | 351 | /* Put garbage in these registers to trap any access to them. */ |
| @@ -411,15 +411,38 @@ after_lock_tlb: | |||
| 411 | sethi %hi(kern_base), %g3 | 411 | sethi %hi(kern_base), %g3 |
| 412 | ldx [%g3 + %lo(kern_base)], %g3 | 412 | ldx [%g3 + %lo(kern_base)], %g3 |
| 413 | add %g2, %g3, %o1 | 413 | add %g2, %g3, %o1 |
| 414 | sethi %hi(sparc64_ttable_tl0), %o0 | ||
| 414 | 415 | ||
| 415 | call prom_set_trap_table_sun4v | 416 | set prom_set_trap_table_name, %g2 |
| 416 | sethi %hi(sparc64_ttable_tl0), %o0 | 417 | stx %g2, [%sp + 2047 + 128 + 0x00] |
| 418 | mov 2, %g2 | ||
| 419 | stx %g2, [%sp + 2047 + 128 + 0x08] | ||
| 420 | mov 0, %g2 | ||
| 421 | stx %g2, [%sp + 2047 + 128 + 0x10] | ||
| 422 | stx %o0, [%sp + 2047 + 128 + 0x18] | ||
| 423 | stx %o1, [%sp + 2047 + 128 + 0x20] | ||
| 424 | sethi %hi(p1275buf), %g2 | ||
| 425 | or %g2, %lo(p1275buf), %g2 | ||
| 426 | ldx [%g2 + 0x08], %o1 | ||
| 427 | call %o1 | ||
| 428 | add %sp, (2047 + 128), %o0 | ||
| 417 | 429 | ||
| 418 | ba,pt %xcc, 2f | 430 | ba,pt %xcc, 2f |
| 419 | nop | 431 | nop |
| 420 | 432 | ||
| 421 | 1: call prom_set_trap_table | 433 | 1: sethi %hi(sparc64_ttable_tl0), %o0 |
| 422 | sethi %hi(sparc64_ttable_tl0), %o0 | 434 | set prom_set_trap_table_name, %g2 |
| 435 | stx %g2, [%sp + 2047 + 128 + 0x00] | ||
| 436 | mov 1, %g2 | ||
| 437 | stx %g2, [%sp + 2047 + 128 + 0x08] | ||
| 438 | mov 0, %g2 | ||
| 439 | stx %g2, [%sp + 2047 + 128 + 0x10] | ||
| 440 | stx %o0, [%sp + 2047 + 128 + 0x18] | ||
| 441 | sethi %hi(p1275buf), %g2 | ||
| 442 | or %g2, %lo(p1275buf), %g2 | ||
| 443 | ldx [%g2 + 0x08], %o1 | ||
| 444 | call %o1 | ||
| 445 | add %sp, (2047 + 128), %o0 | ||
| 423 | 446 | ||
| 424 | 2: ldx [%l0], %g6 | 447 | 2: ldx [%l0], %g6 |
| 425 | ldx [%g6 + TI_TASK], %g4 | 448 | ldx [%g6 + TI_TASK], %g4 |
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c index 68c83ad04ad9..bbec7522826c 100644 --- a/arch/sparc64/prom/misc.c +++ b/arch/sparc64/prom/misc.c | |||
| @@ -143,22 +143,6 @@ unsigned char prom_get_idprom(char *idbuf, int num_bytes) | |||
| 143 | return 0xff; | 143 | return 0xff; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | /* Install Linux trap table so PROM uses that instead of its own. */ | ||
| 147 | void prom_set_trap_table(unsigned long tba) | ||
| 148 | { | ||
| 149 | p1275_cmd("SUNW,set-trap-table", | ||
| 150 | (P1275_ARG(0, P1275_ARG_IN_64B) | | ||
| 151 | P1275_INOUT(1, 0)), tba); | ||
| 152 | } | ||
| 153 | |||
| 154 | void prom_set_trap_table_sun4v(unsigned long tba, unsigned long mmfsa) | ||
| 155 | { | ||
| 156 | p1275_cmd("SUNW,set-trap-table", | ||
| 157 | (P1275_ARG(0, P1275_ARG_IN_64B) | | ||
| 158 | P1275_ARG(1, P1275_ARG_IN_64B) | | ||
| 159 | P1275_INOUT(2, 0)), tba, mmfsa); | ||
| 160 | } | ||
| 161 | |||
| 162 | int prom_get_mmu_ihandle(void) | 146 | int prom_get_mmu_ihandle(void) |
| 163 | { | 147 | { |
| 164 | int node, ret; | 148 | int node, ret; |
