aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/configs/sparc64_defconfig28
-rw-r--r--arch/sparc/kernel/helpers.S75
-rw-r--r--arch/sparc/kernel/ptrace_32.c4
-rw-r--r--arch/sparc/kernel/ptrace_64.c4
-rw-r--r--arch/sparc/mm/init_64.c2
5 files changed, 100 insertions, 13 deletions
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig
index 56e3163673e3..259e3fd50993 100644
--- a/arch/sparc/configs/sparc64_defconfig
+++ b/arch/sparc/configs/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.33 3# Linux kernel version: 2.6.34-rc3
4# Wed Mar 3 02:54:29 2010 4# Sat Apr 3 15:49:56 2010
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7CONFIG_SPARC=y 7CONFIG_SPARC=y
@@ -23,6 +23,7 @@ CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
23CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y 23CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
24CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 24CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
25CONFIG_MMU=y 25CONFIG_MMU=y
26CONFIG_NEED_DMA_MAP_STATE=y
26CONFIG_ARCH_NO_VIRT_TO_BUS=y 27CONFIG_ARCH_NO_VIRT_TO_BUS=y
27CONFIG_OF=y 28CONFIG_OF=y
28CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 29CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
@@ -439,6 +440,7 @@ CONFIG_MISC_DEVICES=y
439# CONFIG_ENCLOSURE_SERVICES is not set 440# CONFIG_ENCLOSURE_SERVICES is not set
440# CONFIG_HP_ILO is not set 441# CONFIG_HP_ILO is not set
441# CONFIG_ISL29003 is not set 442# CONFIG_ISL29003 is not set
443# CONFIG_SENSORS_TSL2550 is not set
442# CONFIG_DS1682 is not set 444# CONFIG_DS1682 is not set
443# CONFIG_C2PORT is not set 445# CONFIG_C2PORT is not set
444 446
@@ -511,6 +513,7 @@ CONFIG_BLK_DEV_IDEDMA=y
511# 513#
512# SCSI device support 514# SCSI device support
513# 515#
516CONFIG_SCSI_MOD=y
514CONFIG_RAID_ATTRS=m 517CONFIG_RAID_ATTRS=m
515CONFIG_SCSI=y 518CONFIG_SCSI=y
516CONFIG_SCSI_DMA=y 519CONFIG_SCSI_DMA=y
@@ -888,6 +891,7 @@ CONFIG_SERIAL_SUNHV=y
888CONFIG_SERIAL_CORE=y 891CONFIG_SERIAL_CORE=y
889CONFIG_SERIAL_CORE_CONSOLE=y 892CONFIG_SERIAL_CORE_CONSOLE=y
890# CONFIG_SERIAL_JSM is not set 893# CONFIG_SERIAL_JSM is not set
894# CONFIG_SERIAL_TIMBERDALE is not set
891# CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set 895# CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set
892CONFIG_UNIX98_PTYS=y 896CONFIG_UNIX98_PTYS=y
893# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 897# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
@@ -935,6 +939,7 @@ CONFIG_I2C_ALGOBIT=y
935# 939#
936# CONFIG_I2C_OCORES is not set 940# CONFIG_I2C_OCORES is not set
937# CONFIG_I2C_SIMTEC is not set 941# CONFIG_I2C_SIMTEC is not set
942# CONFIG_I2C_XILINX is not set
938 943
939# 944#
940# External I2C/SMBus adapter drivers 945# External I2C/SMBus adapter drivers
@@ -948,15 +953,9 @@ CONFIG_I2C_ALGOBIT=y
948# 953#
949# CONFIG_I2C_PCA_PLATFORM is not set 954# CONFIG_I2C_PCA_PLATFORM is not set
950# CONFIG_I2C_STUB is not set 955# CONFIG_I2C_STUB is not set
951
952#
953# Miscellaneous I2C Chip support
954#
955# CONFIG_SENSORS_TSL2550 is not set
956# CONFIG_I2C_DEBUG_CORE is not set 956# CONFIG_I2C_DEBUG_CORE is not set
957# CONFIG_I2C_DEBUG_ALGO is not set 957# CONFIG_I2C_DEBUG_ALGO is not set
958# CONFIG_I2C_DEBUG_BUS is not set 958# CONFIG_I2C_DEBUG_BUS is not set
959# CONFIG_I2C_DEBUG_CHIP is not set
960# CONFIG_SPI is not set 959# CONFIG_SPI is not set
961 960
962# 961#
@@ -982,10 +981,11 @@ CONFIG_HWMON=y
982# CONFIG_SENSORS_ADM1029 is not set 981# CONFIG_SENSORS_ADM1029 is not set
983# CONFIG_SENSORS_ADM1031 is not set 982# CONFIG_SENSORS_ADM1031 is not set
984# CONFIG_SENSORS_ADM9240 is not set 983# CONFIG_SENSORS_ADM9240 is not set
984# CONFIG_SENSORS_ADT7411 is not set
985# CONFIG_SENSORS_ADT7462 is not set 985# CONFIG_SENSORS_ADT7462 is not set
986# CONFIG_SENSORS_ADT7470 is not set 986# CONFIG_SENSORS_ADT7470 is not set
987# CONFIG_SENSORS_ADT7473 is not set
988# CONFIG_SENSORS_ADT7475 is not set 987# CONFIG_SENSORS_ADT7475 is not set
988# CONFIG_SENSORS_ASC7621 is not set
989# CONFIG_SENSORS_ATXP1 is not set 989# CONFIG_SENSORS_ATXP1 is not set
990# CONFIG_SENSORS_DS1621 is not set 990# CONFIG_SENSORS_DS1621 is not set
991# CONFIG_SENSORS_I5K_AMB is not set 991# CONFIG_SENSORS_I5K_AMB is not set
@@ -1052,18 +1052,21 @@ CONFIG_SSB_POSSIBLE=y
1052# Multifunction device drivers 1052# Multifunction device drivers
1053# 1053#
1054# CONFIG_MFD_CORE is not set 1054# CONFIG_MFD_CORE is not set
1055# CONFIG_MFD_88PM860X is not set
1055# CONFIG_MFD_SM501 is not set 1056# CONFIG_MFD_SM501 is not set
1056# CONFIG_HTC_PASIC3 is not set 1057# CONFIG_HTC_PASIC3 is not set
1057# CONFIG_TWL4030_CORE is not set 1058# CONFIG_TWL4030_CORE is not set
1058# CONFIG_MFD_TMIO is not set 1059# CONFIG_MFD_TMIO is not set
1059# CONFIG_PMIC_DA903X is not set 1060# CONFIG_PMIC_DA903X is not set
1060# CONFIG_PMIC_ADP5520 is not set 1061# CONFIG_PMIC_ADP5520 is not set
1062# CONFIG_MFD_MAX8925 is not set
1061# CONFIG_MFD_WM8400 is not set 1063# CONFIG_MFD_WM8400 is not set
1062# CONFIG_MFD_WM831X is not set 1064# CONFIG_MFD_WM831X is not set
1063# CONFIG_MFD_WM8350_I2C is not set 1065# CONFIG_MFD_WM8350_I2C is not set
1066# CONFIG_MFD_WM8994 is not set
1064# CONFIG_MFD_PCF50633 is not set 1067# CONFIG_MFD_PCF50633 is not set
1065# CONFIG_AB3100_CORE is not set 1068# CONFIG_AB3100_CORE is not set
1066# CONFIG_MFD_88PM8607 is not set 1069# CONFIG_LPC_SCH is not set
1067# CONFIG_REGULATOR is not set 1070# CONFIG_REGULATOR is not set
1068# CONFIG_MEDIA_SUPPORT is not set 1071# CONFIG_MEDIA_SUPPORT is not set
1069 1072
@@ -1113,6 +1116,7 @@ CONFIG_FB_FFB=y
1113# CONFIG_FB_LEO is not set 1116# CONFIG_FB_LEO is not set
1114CONFIG_FB_XVR500=y 1117CONFIG_FB_XVR500=y
1115CONFIG_FB_XVR2500=y 1118CONFIG_FB_XVR2500=y
1119CONFIG_FB_XVR1000=y
1116# CONFIG_FB_S1D13XXX is not set 1120# CONFIG_FB_S1D13XXX is not set
1117# CONFIG_FB_NVIDIA is not set 1121# CONFIG_FB_NVIDIA is not set
1118# CONFIG_FB_RIVA is not set 1122# CONFIG_FB_RIVA is not set
@@ -1430,7 +1434,6 @@ CONFIG_USB_STORAGE=m
1430# CONFIG_USB_RIO500 is not set 1434# CONFIG_USB_RIO500 is not set
1431# CONFIG_USB_LEGOTOWER is not set 1435# CONFIG_USB_LEGOTOWER is not set
1432# CONFIG_USB_LCD is not set 1436# CONFIG_USB_LCD is not set
1433# CONFIG_USB_BERRY_CHARGE is not set
1434# CONFIG_USB_LED is not set 1437# CONFIG_USB_LED is not set
1435# CONFIG_USB_CYPRESS_CY7C63 is not set 1438# CONFIG_USB_CYPRESS_CY7C63 is not set
1436# CONFIG_USB_CYTHERM is not set 1439# CONFIG_USB_CYTHERM is not set
@@ -1443,7 +1446,6 @@ CONFIG_USB_STORAGE=m
1443# CONFIG_USB_IOWARRIOR is not set 1446# CONFIG_USB_IOWARRIOR is not set
1444# CONFIG_USB_TEST is not set 1447# CONFIG_USB_TEST is not set
1445# CONFIG_USB_ISIGHTFW is not set 1448# CONFIG_USB_ISIGHTFW is not set
1446# CONFIG_USB_VST is not set
1447# CONFIG_USB_GADGET is not set 1449# CONFIG_USB_GADGET is not set
1448 1450
1449# 1451#
@@ -1610,6 +1612,7 @@ CONFIG_MISC_FILESYSTEMS=y
1610# CONFIG_BEFS_FS is not set 1612# CONFIG_BEFS_FS is not set
1611# CONFIG_BFS_FS is not set 1613# CONFIG_BFS_FS is not set
1612# CONFIG_EFS_FS is not set 1614# CONFIG_EFS_FS is not set
1615# CONFIG_LOGFS is not set
1613# CONFIG_CRAMFS is not set 1616# CONFIG_CRAMFS is not set
1614# CONFIG_SQUASHFS is not set 1617# CONFIG_SQUASHFS is not set
1615# CONFIG_VXFS_FS is not set 1618# CONFIG_VXFS_FS is not set
@@ -1624,6 +1627,7 @@ CONFIG_NETWORK_FILESYSTEMS=y
1624# CONFIG_NFS_FS is not set 1627# CONFIG_NFS_FS is not set
1625# CONFIG_NFSD is not set 1628# CONFIG_NFSD is not set
1626# CONFIG_SMB_FS is not set 1629# CONFIG_SMB_FS is not set
1630# CONFIG_CEPH_FS is not set
1627# CONFIG_CIFS is not set 1631# CONFIG_CIFS is not set
1628# CONFIG_NCP_FS is not set 1632# CONFIG_NCP_FS is not set
1629# CONFIG_CODA_FS is not set 1633# CONFIG_CODA_FS is not set
diff --git a/arch/sparc/kernel/helpers.S b/arch/sparc/kernel/helpers.S
index 314dd0c9fc5b..92090cc9e829 100644
--- a/arch/sparc/kernel/helpers.S
+++ b/arch/sparc/kernel/helpers.S
@@ -46,6 +46,81 @@ stack_trace_flush:
46 nop 46 nop
47 .size stack_trace_flush,.-stack_trace_flush 47 .size stack_trace_flush,.-stack_trace_flush
48 48
49#ifdef CONFIG_PERF_EVENTS
50 .globl perf_arch_fetch_caller_regs
51 .type perf_arch_fetch_caller_regs,#function
52perf_arch_fetch_caller_regs:
53 /* We always read the %pstate into %o5 since we will use
54 * that to construct a fake %tstate to store into the regs.
55 */
56 rdpr %pstate, %o5
57 brz,pn %o2, 50f
58 mov %o2, %g7
59
60 /* Turn off interrupts while we walk around the register
61 * window by hand.
62 */
63 wrpr %o5, PSTATE_IE, %pstate
64
65 /* The %canrestore tells us how many register windows are
66 * still live in the chip above us, past that we have to
67 * walk the frame as saved on the stack. We stash away
68 * the %cwp in %g1 so we can return back to the original
69 * register window.
70 */
71 rdpr %cwp, %g1
72 rdpr %canrestore, %g2
73 sub %g1, 1, %g3
74
75 /* We have the skip count in %g7, if it hits zero then
76 * %fp/%i7 are the registers we need. Otherwise if our
77 * %canrestore count maintained in %g2 hits zero we have
78 * to start traversing the stack.
79 */
8010: brz,pn %g2, 4f
81 sub %g2, 1, %g2
82 wrpr %g3, %cwp
83 subcc %g7, 1, %g7
84 bne,pt %xcc, 10b
85 sub %g3, 1, %g3
86
87 /* We found the values we need in the cpu's register
88 * windows.
89 */
90 mov %fp, %g3
91 ba,pt %xcc, 3f
92 mov %i7, %g2
93
9450: mov %fp, %g3
95 ba,pt %xcc, 2f
96 mov %i7, %g2
97
98 /* We hit the end of the valid register windows in the
99 * cpu, start traversing the stack frame.
100 */
1014: mov %fp, %g3
102
10320: ldx [%g3 + STACK_BIAS + RW_V9_I7], %g2
104 subcc %g7, 1, %g7
105 bne,pn %xcc, 20b
106 ldx [%g3 + STACK_BIAS + RW_V9_I6], %g3
107
108 /* Restore the current register window position and
109 * re-enable interrupts.
110 */
1113: wrpr %g1, %cwp
112 wrpr %o5, %pstate
113
1142: stx %g3, [%o0 + PT_V9_FP]
115 sllx %o5, 8, %o5
116 stx %o5, [%o0 + PT_V9_TSTATE]
117 stx %g2, [%o0 + PT_V9_TPC]
118 add %g2, 4, %g2
119 retl
120 stx %g2, [%o0 + PT_V9_TNPC]
121 .size perf_arch_fetch_caller_regs,.-perf_arch_fetch_caller_regs
122#endif /* CONFIG_PERF_EVENTS */
123
49#ifdef CONFIG_SMP 124#ifdef CONFIG_SMP
50 .globl hard_smp_processor_id 125 .globl hard_smp_processor_id
51 .type hard_smp_processor_id,#function 126 .type hard_smp_processor_id,#function
diff --git a/arch/sparc/kernel/ptrace_32.c b/arch/sparc/kernel/ptrace_32.c
index 7e3dfd9bb97e..e608f397e11f 100644
--- a/arch/sparc/kernel/ptrace_32.c
+++ b/arch/sparc/kernel/ptrace_32.c
@@ -65,6 +65,7 @@ static int genregs32_get(struct task_struct *target,
65 *k++ = regs->u_regs[pos++]; 65 *k++ = regs->u_regs[pos++];
66 66
67 reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; 67 reg_window = (unsigned long __user *) regs->u_regs[UREG_I6];
68 reg_window -= 16;
68 for (; count > 0 && pos < 32; count--) { 69 for (; count > 0 && pos < 32; count--) {
69 if (get_user(*k++, &reg_window[pos++])) 70 if (get_user(*k++, &reg_window[pos++]))
70 return -EFAULT; 71 return -EFAULT;
@@ -76,6 +77,7 @@ static int genregs32_get(struct task_struct *target,
76 } 77 }
77 78
78 reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; 79 reg_window = (unsigned long __user *) regs->u_regs[UREG_I6];
80 reg_window -= 16;
79 for (; count > 0 && pos < 32; count--) { 81 for (; count > 0 && pos < 32; count--) {
80 if (get_user(reg, &reg_window[pos++]) || 82 if (get_user(reg, &reg_window[pos++]) ||
81 put_user(reg, u++)) 83 put_user(reg, u++))
@@ -141,6 +143,7 @@ static int genregs32_set(struct task_struct *target,
141 regs->u_regs[pos++] = *k++; 143 regs->u_regs[pos++] = *k++;
142 144
143 reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; 145 reg_window = (unsigned long __user *) regs->u_regs[UREG_I6];
146 reg_window -= 16;
144 for (; count > 0 && pos < 32; count--) { 147 for (; count > 0 && pos < 32; count--) {
145 if (put_user(*k++, &reg_window[pos++])) 148 if (put_user(*k++, &reg_window[pos++]))
146 return -EFAULT; 149 return -EFAULT;
@@ -153,6 +156,7 @@ static int genregs32_set(struct task_struct *target,
153 } 156 }
154 157
155 reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; 158 reg_window = (unsigned long __user *) regs->u_regs[UREG_I6];
159 reg_window -= 16;
156 for (; count > 0 && pos < 32; count--) { 160 for (; count > 0 && pos < 32; count--) {
157 if (get_user(reg, u++) || 161 if (get_user(reg, u++) ||
158 put_user(reg, &reg_window[pos++])) 162 put_user(reg, &reg_window[pos++]))
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c
index 2f6524d1a817..aa90da08bf61 100644
--- a/arch/sparc/kernel/ptrace_64.c
+++ b/arch/sparc/kernel/ptrace_64.c
@@ -492,6 +492,7 @@ static int genregs32_get(struct task_struct *target,
492 *k++ = regs->u_regs[pos++]; 492 *k++ = regs->u_regs[pos++];
493 493
494 reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; 494 reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6];
495 reg_window -= 16;
495 if (target == current) { 496 if (target == current) {
496 for (; count > 0 && pos < 32; count--) { 497 for (; count > 0 && pos < 32; count--) {
497 if (get_user(*k++, &reg_window[pos++])) 498 if (get_user(*k++, &reg_window[pos++]))
@@ -516,6 +517,7 @@ static int genregs32_get(struct task_struct *target,
516 } 517 }
517 518
518 reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; 519 reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6];
520 reg_window -= 16;
519 if (target == current) { 521 if (target == current) {
520 for (; count > 0 && pos < 32; count--) { 522 for (; count > 0 && pos < 32; count--) {
521 if (get_user(reg, &reg_window[pos++]) || 523 if (get_user(reg, &reg_window[pos++]) ||
@@ -599,6 +601,7 @@ static int genregs32_set(struct task_struct *target,
599 regs->u_regs[pos++] = *k++; 601 regs->u_regs[pos++] = *k++;
600 602
601 reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; 603 reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6];
604 reg_window -= 16;
602 if (target == current) { 605 if (target == current) {
603 for (; count > 0 && pos < 32; count--) { 606 for (; count > 0 && pos < 32; count--) {
604 if (put_user(*k++, &reg_window[pos++])) 607 if (put_user(*k++, &reg_window[pos++]))
@@ -625,6 +628,7 @@ static int genregs32_set(struct task_struct *target,
625 } 628 }
626 629
627 reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; 630 reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6];
631 reg_window -= 16;
628 if (target == current) { 632 if (target == current) {
629 for (; count > 0 && pos < 32; count--) { 633 for (; count > 0 && pos < 32; count--) {
630 if (get_user(reg, u++) || 634 if (get_user(reg, u++) ||
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index aaebc4815044..b2831dc3c121 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -2117,7 +2117,7 @@ int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node)
2117 "node=%d entry=%lu/%lu\n", start, block, nr, 2117 "node=%d entry=%lu/%lu\n", start, block, nr,
2118 node, 2118 node,
2119 addr >> VMEMMAP_CHUNK_SHIFT, 2119 addr >> VMEMMAP_CHUNK_SHIFT,
2120 VMEMMAP_SIZE >> VMEMMAP_CHUNK_SHIFT); 2120 VMEMMAP_SIZE);
2121 } 2121 }
2122 } 2122 }
2123 return 0; 2123 return 0;