Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 17 Sep 2007 04:15:36 +0000 (21:15 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 17 Sep 2007 04:15:36 +0000 (21:15 -0700)
* '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.

arch/sparc64/defconfig
arch/sparc64/kernel/head.S
arch/sparc64/kernel/mdesc.c
arch/sparc64/kernel/prom.c
arch/sparc64/kernel/trampoline.S
arch/sparc64/prom/misc.c
include/asm-sparc64/oplib.h

index 68338a601f706b2df2d1c0268d4e4f05870dfbac..7d07297db8782d3286d33ec85a7bd34961d0a1ec 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.23-rc1
-# Sun Jul 22 19:24:37 2007
+# Linux kernel version: 2.6.23-rc6
+# Sun Sep 16 09:52:11 2007
 #
 CONFIG_SPARC=y
 CONFIG_SPARC64=y
@@ -32,15 +32,11 @@ CONFIG_HZ=100
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
-# Code maturity level options
+# General setup
 #
 CONFIG_EXPERIMENTAL=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
 CONFIG_LOCALVERSION=""
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_SWAP=y
@@ -555,6 +551,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_SIS190 is not set
 # CONFIG_SKGE is not set
 # CONFIG_SKY2 is not set
+# CONFIG_SK98LIN is not set
 # CONFIG_VIA_VELOCITY is not set
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
@@ -809,6 +806,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_THMC50 is not set
 # CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_VT1211 is not set
 # CONFIG_SENSORS_VT8231 is not set
@@ -1162,10 +1160,6 @@ CONFIG_USB_STORAGE=m
 # CONFIG_MMC is not set
 # CONFIG_NEW_LEDS is not set
 # CONFIG_INFINIBAND is not set
-
-#
-# Real Time Clock
-#
 # CONFIG_RTC_CLASS is not set
 
 #
index 63144ad476f6663c1ab3ed98fd252503fc89ebdb..c4147ad8677b5307c4323ec06160b7fe541aa063 100644 (file)
@@ -98,7 +98,7 @@ sparc64_boot:
        .globl  prom_boot_mapped_pc, prom_boot_mapping_mode
        .globl  prom_boot_mapping_phys_high, prom_boot_mapping_phys_low
        .globl  prom_compatible_name, prom_cpu_path, prom_cpu_compatible
-       .globl  is_sun4v, sun4v_chip_type
+       .globl  is_sun4v, sun4v_chip_type, prom_set_trap_table_name
 prom_peer_name:
        .asciz  "peer"
 prom_compatible_name:
@@ -121,6 +121,8 @@ prom_map_name:
        .asciz  "map"
 prom_unmap_name:
        .asciz  "unmap"
+prom_set_trap_table_name:
+       .asciz  "SUNW,set-trap-table"
 prom_sun4v_name:
        .asciz  "sun4v"
 prom_niagara_prefix:
@@ -691,15 +693,38 @@ setup_trap_table:
        sethi   %hi(kern_base), %g3
        ldx     [%g3 + %lo(kern_base)], %g3
        add     %g2, %g3, %o1
+       sethi   %hi(sparc64_ttable_tl0), %o0
 
-       call    prom_set_trap_table_sun4v
-        sethi  %hi(sparc64_ttable_tl0), %o0
+       set     prom_set_trap_table_name, %g2
+       stx     %g2, [%sp + 2047 + 128 + 0x00]
+       mov     2, %g2
+       stx     %g2, [%sp + 2047 + 128 + 0x08]
+       mov     0, %g2
+       stx     %g2, [%sp + 2047 + 128 + 0x10]
+       stx     %o0, [%sp + 2047 + 128 + 0x18]
+       stx     %o1, [%sp + 2047 + 128 + 0x20]
+       sethi   %hi(p1275buf), %g2
+       or      %g2, %lo(p1275buf), %g2
+       ldx     [%g2 + 0x08], %o1
+       call    %o1
+        add    %sp, (2047 + 128), %o0
 
        ba,pt   %xcc, 2f
         nop
 
-1:     call    prom_set_trap_table
-        sethi  %hi(sparc64_ttable_tl0), %o0
+1:     sethi   %hi(sparc64_ttable_tl0), %o0
+       set     prom_set_trap_table_name, %g2
+       stx     %g2, [%sp + 2047 + 128 + 0x00]
+       mov     1, %g2
+       stx     %g2, [%sp + 2047 + 128 + 0x08]
+       mov     0, %g2
+       stx     %g2, [%sp + 2047 + 128 + 0x10]
+       stx     %o0, [%sp + 2047 + 128 + 0x18]
+       sethi   %hi(p1275buf), %g2
+       or      %g2, %lo(p1275buf), %g2
+       ldx     [%g2 + 0x08], %o1
+       call    %o1
+        add    %sp, (2047 + 128), %o0
 
        /* Start using proper page size encodings in ctx register.  */
 2:     sethi   %hi(sparc64_kern_pri_context), %g3
index 9f22e4ff6015771e8c39106f7df2baff3c315633..856659bb13116ed7444c263ec1a9f8087c660ec7 100644 (file)
@@ -777,8 +777,12 @@ void __devinit mdesc_fill_in_cpu_data(cpumask_t mask)
                cpuid = *id;
 
 #ifdef CONFIG_SMP
-               if (cpuid >= NR_CPUS)
+               if (cpuid >= NR_CPUS) {
+                       printk(KERN_WARNING "Ignoring CPU %d which is "
+                              ">= NR_CPUS (%d)\n",
+                              cpuid, NR_CPUS);
                        continue;
+               }
                if (!cpu_isset(cpuid, mask))
                        continue;
 #else
index d1a78c976cef0cfe73c9b51a2610d3ab4fa4d015..0614dff63d7c095b0e80711f09b336583439c0df 100644 (file)
@@ -1583,8 +1583,12 @@ static void __init of_fill_in_cpu_data(void)
                ncpus_probed++;
 
 #ifdef CONFIG_SMP
-               if (cpuid >= NR_CPUS)
+               if (cpuid >= NR_CPUS) {
+                       printk(KERN_WARNING "Ignoring CPU %d which is "
+                              ">= NR_CPUS (%d)\n",
+                              cpuid, NR_CPUS);
                        continue;
+               }
 #else
                /* On uniprocessor we only want the values for the
                 * real physical cpu the kernel booted onto, however
index 9533a25ce5d2191f9ceb251695c0141acc78071c..04e81dda13d008b83032cc2b251759a8fe4e8417 100644 (file)
@@ -345,7 +345,7 @@ after_lock_tlb:
        sethi           %hi(tramp_stack), %g1
        or              %g1, %lo(tramp_stack), %g1
        add             %g1, TRAMP_STACK_SIZE, %g1
-       sub             %g1, STACKFRAME_SZ + STACK_BIAS, %sp
+       sub             %g1, STACKFRAME_SZ + STACK_BIAS + 256, %sp
        mov             0, %fp
 
        /* Put garbage in these registers to trap any access to them.  */
@@ -411,15 +411,38 @@ after_lock_tlb:
        sethi           %hi(kern_base), %g3
        ldx             [%g3 + %lo(kern_base)], %g3
        add             %g2, %g3, %o1
+       sethi           %hi(sparc64_ttable_tl0), %o0
 
-       call            prom_set_trap_table_sun4v
-        sethi          %hi(sparc64_ttable_tl0), %o0
+       set             prom_set_trap_table_name, %g2
+       stx             %g2, [%sp + 2047 + 128 + 0x00]
+       mov             2, %g2
+       stx             %g2, [%sp + 2047 + 128 + 0x08]
+       mov             0, %g2
+       stx             %g2, [%sp + 2047 + 128 + 0x10]
+       stx             %o0, [%sp + 2047 + 128 + 0x18]
+       stx             %o1, [%sp + 2047 + 128 + 0x20]
+       sethi           %hi(p1275buf), %g2
+       or              %g2, %lo(p1275buf), %g2
+       ldx             [%g2 + 0x08], %o1
+       call            %o1
+        add            %sp, (2047 + 128), %o0
 
        ba,pt           %xcc, 2f
         nop
 
-1:     call            prom_set_trap_table
-        sethi          %hi(sparc64_ttable_tl0), %o0
+1:     sethi           %hi(sparc64_ttable_tl0), %o0
+       set             prom_set_trap_table_name, %g2
+       stx             %g2, [%sp + 2047 + 128 + 0x00]
+       mov             1, %g2
+       stx             %g2, [%sp + 2047 + 128 + 0x08]
+       mov             0, %g2
+       stx             %g2, [%sp + 2047 + 128 + 0x10]
+       stx             %o0, [%sp + 2047 + 128 + 0x18]
+       sethi           %hi(p1275buf), %g2
+       or              %g2, %lo(p1275buf), %g2
+       ldx             [%g2 + 0x08], %o1
+       call            %o1
+        add            %sp, (2047 + 128), %o0
 
 2:     ldx             [%l0], %g6
        ldx             [%g6 + TI_TASK], %g4
index 68c83ad04ad958651654e6439657206284ae5df8..bbec7522826c742bc6125dce589c3d2334590b05 100644 (file)
@@ -143,22 +143,6 @@ unsigned char prom_get_idprom(char *idbuf, int num_bytes)
        return 0xff;
 }
 
-/* Install Linux trap table so PROM uses that instead of its own. */
-void prom_set_trap_table(unsigned long tba)
-{
-       p1275_cmd("SUNW,set-trap-table",
-                 (P1275_ARG(0, P1275_ARG_IN_64B) |
-                  P1275_INOUT(1, 0)), tba);
-}
-
-void prom_set_trap_table_sun4v(unsigned long tba, unsigned long mmfsa)
-{
-       p1275_cmd("SUNW,set-trap-table",
-                 (P1275_ARG(0, P1275_ARG_IN_64B) |
-                  P1275_ARG(1, P1275_ARG_IN_64B) |
-                  P1275_INOUT(2, 0)), tba, mmfsa);
-}
-
 int prom_get_mmu_ihandle(void)
 {
        int node, ret;
index 86dc5c018a197f0fdb3b36162ca468337bf8aa7a..55c5bb27e4da241cc1eae429f0ca36d1fb103dea 100644 (file)
@@ -297,11 +297,7 @@ extern void prom_sun4v_guest_soft_state(void);
 extern int prom_ihandle2path(int handle, char *buffer, int bufsize);
 
 /* Client interface level routines. */
-extern void prom_set_trap_table(unsigned long tba);
-extern void prom_set_trap_table_sun4v(unsigned long tba, unsigned long mmfsa);
-
 extern long p1275_cmd(const char *, long, ...);
-                                  
 
 #if 0
 #define P1275_SIZE(x) ((((long)((x) / 32)) << 32) | (x))