diff options
Diffstat (limited to 'arch')
232 files changed, 3786 insertions, 3122 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 7e55ea66c6d4..84caf50725b5 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -25,6 +25,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
25 | bool | 25 | bool |
26 | default y | 26 | default y |
27 | 27 | ||
28 | config ARCH_HAS_ILOG2_U32 | ||
29 | bool | ||
30 | default n | ||
31 | |||
32 | config ARCH_HAS_ILOG2_U64 | ||
33 | bool | ||
34 | default n | ||
35 | |||
28 | config GENERIC_FIND_NEXT_BIT | 36 | config GENERIC_FIND_NEXT_BIT |
29 | bool | 37 | bool |
30 | default y | 38 | default y |
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index ad6173651995..be133f1f75a4 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -277,7 +277,7 @@ osf_fstatfs(unsigned long fd, struct osf_statfs __user *buffer, unsigned long bu | |||
277 | retval = -EBADF; | 277 | retval = -EBADF; |
278 | file = fget(fd); | 278 | file = fget(fd); |
279 | if (file) { | 279 | if (file) { |
280 | retval = do_osf_statfs(file->f_dentry, buffer, bufsiz); | 280 | retval = do_osf_statfs(file->f_path.dentry, buffer, bufsiz); |
281 | fput(file); | 281 | fput(file); |
282 | } | 282 | } |
283 | return retval; | 283 | return retval; |
@@ -979,7 +979,7 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, | |||
979 | long timeout; | 979 | long timeout; |
980 | int ret = -EINVAL; | 980 | int ret = -EINVAL; |
981 | struct fdtable *fdt; | 981 | struct fdtable *fdt; |
982 | int max_fdset; | 982 | int max_fds; |
983 | 983 | ||
984 | timeout = MAX_SCHEDULE_TIMEOUT; | 984 | timeout = MAX_SCHEDULE_TIMEOUT; |
985 | if (tvp) { | 985 | if (tvp) { |
@@ -1003,9 +1003,9 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, | |||
1003 | 1003 | ||
1004 | rcu_read_lock(); | 1004 | rcu_read_lock(); |
1005 | fdt = files_fdtable(current->files); | 1005 | fdt = files_fdtable(current->files); |
1006 | max_fdset = fdt->max_fdset; | 1006 | max_fds = fdt->max_fds; |
1007 | rcu_read_unlock(); | 1007 | rcu_read_unlock(); |
1008 | if (n < 0 || n > max_fdset) | 1008 | if (n < 0 || n > max_fds) |
1009 | goto out_nofds; | 1009 | goto out_nofds; |
1010 | 1010 | ||
1011 | /* | 1011 | /* |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 8c05d4321ae9..aa1d400d721a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -74,6 +74,14 @@ config RWSEM_GENERIC_SPINLOCK | |||
74 | config RWSEM_XCHGADD_ALGORITHM | 74 | config RWSEM_XCHGADD_ALGORITHM |
75 | bool | 75 | bool |
76 | 76 | ||
77 | config ARCH_HAS_ILOG2_U32 | ||
78 | bool | ||
79 | default n | ||
80 | |||
81 | config ARCH_HAS_ILOG2_U64 | ||
82 | bool | ||
83 | default n | ||
84 | |||
77 | config GENERIC_HWEIGHT | 85 | config GENERIC_HWEIGHT |
78 | bool | 86 | bool |
79 | default y | 87 | default y |
diff --git a/arch/arm26/Kconfig b/arch/arm26/Kconfig index c14fe918bc4c..74eba8b5a8ca 100644 --- a/arch/arm26/Kconfig +++ b/arch/arm26/Kconfig | |||
@@ -41,6 +41,14 @@ config RWSEM_GENERIC_SPINLOCK | |||
41 | config RWSEM_XCHGADD_ALGORITHM | 41 | config RWSEM_XCHGADD_ALGORITHM |
42 | bool | 42 | bool |
43 | 43 | ||
44 | config ARCH_HAS_ILOG2_U32 | ||
45 | bool | ||
46 | default n | ||
47 | |||
48 | config ARCH_HAS_ILOG2_U64 | ||
49 | bool | ||
50 | default n | ||
51 | |||
44 | config GENERIC_HWEIGHT | 52 | config GENERIC_HWEIGHT |
45 | bool | 53 | bool |
46 | default y | 54 | default y |
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index 5f1694eea842..bb059a4e1df9 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig | |||
@@ -45,6 +45,14 @@ config GENERIC_TIME | |||
45 | config RWSEM_XCHGADD_ALGORITHM | 45 | config RWSEM_XCHGADD_ALGORITHM |
46 | bool | 46 | bool |
47 | 47 | ||
48 | config ARCH_HAS_ILOG2_U32 | ||
49 | bool | ||
50 | default n | ||
51 | |||
52 | config ARCH_HAS_ILOG2_U64 | ||
53 | bool | ||
54 | default n | ||
55 | |||
48 | config GENERIC_BUST_SPINLOCK | 56 | config GENERIC_BUST_SPINLOCK |
49 | bool | 57 | bool |
50 | 58 | ||
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 6a1238a29d6c..3474309e049c 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig | |||
@@ -16,6 +16,14 @@ config RWSEM_GENERIC_SPINLOCK | |||
16 | config RWSEM_XCHGADD_ALGORITHM | 16 | config RWSEM_XCHGADD_ALGORITHM |
17 | bool | 17 | bool |
18 | 18 | ||
19 | config ARCH_HAS_ILOG2_U32 | ||
20 | bool | ||
21 | default n | ||
22 | |||
23 | config ARCH_HAS_ILOG2_U64 | ||
24 | bool | ||
25 | default n | ||
26 | |||
19 | config GENERIC_FIND_NEXT_BIT | 27 | config GENERIC_FIND_NEXT_BIT |
20 | bool | 28 | bool |
21 | default y | 29 | default y |
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c index e067806b2208..424eb0eb1cd5 100644 --- a/arch/cris/arch-v32/drivers/sync_serial.c +++ b/arch/cris/arch-v32/drivers/sync_serial.c | |||
@@ -504,7 +504,7 @@ static int sync_serial_release(struct inode *inode, struct file *file) | |||
504 | 504 | ||
505 | static unsigned int sync_serial_poll(struct file *file, poll_table *wait) | 505 | static unsigned int sync_serial_poll(struct file *file, poll_table *wait) |
506 | { | 506 | { |
507 | int dev = iminor(file->f_dentry->d_inode); | 507 | int dev = iminor(file->f_path.dentry->d_inode); |
508 | unsigned int mask = 0; | 508 | unsigned int mask = 0; |
509 | sync_port* port; | 509 | sync_port* port; |
510 | DEBUGPOLL( static unsigned int prev_mask = 0; ); | 510 | DEBUGPOLL( static unsigned int prev_mask = 0; ); |
@@ -531,7 +531,7 @@ static int sync_serial_ioctl(struct inode *inode, struct file *file, | |||
531 | unsigned int cmd, unsigned long arg) | 531 | unsigned int cmd, unsigned long arg) |
532 | { | 532 | { |
533 | int return_val = 0; | 533 | int return_val = 0; |
534 | int dev = iminor(file->f_dentry->d_inode); | 534 | int dev = iminor(file->f_path.dentry->d_inode); |
535 | sync_port* port; | 535 | sync_port* port; |
536 | reg_sser_rw_tr_cfg tr_cfg; | 536 | reg_sser_rw_tr_cfg tr_cfg; |
537 | reg_sser_rw_rec_cfg rec_cfg; | 537 | reg_sser_rw_rec_cfg rec_cfg; |
@@ -789,7 +789,7 @@ static int sync_serial_ioctl(struct inode *inode, struct file *file, | |||
789 | static ssize_t sync_serial_write(struct file * file, const char * buf, | 789 | static ssize_t sync_serial_write(struct file * file, const char * buf, |
790 | size_t count, loff_t *ppos) | 790 | size_t count, loff_t *ppos) |
791 | { | 791 | { |
792 | int dev = iminor(file->f_dentry->d_inode); | 792 | int dev = iminor(file->f_path.dentry->d_inode); |
793 | DECLARE_WAITQUEUE(wait, current); | 793 | DECLARE_WAITQUEUE(wait, current); |
794 | sync_port *port; | 794 | sync_port *port; |
795 | unsigned long c, c1; | 795 | unsigned long c, c1; |
@@ -919,7 +919,7 @@ static ssize_t sync_serial_write(struct file * file, const char * buf, | |||
919 | static ssize_t sync_serial_read(struct file * file, char * buf, | 919 | static ssize_t sync_serial_read(struct file * file, char * buf, |
920 | size_t count, loff_t *ppos) | 920 | size_t count, loff_t *ppos) |
921 | { | 921 | { |
922 | int dev = iminor(file->f_dentry->d_inode); | 922 | int dev = iminor(file->f_path.dentry->d_inode); |
923 | int avail; | 923 | int avail; |
924 | sync_port *port; | 924 | sync_port *port; |
925 | unsigned char* start; | 925 | unsigned char* start; |
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index cf1c446e003a..7561d7b72e75 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
@@ -41,6 +41,14 @@ config TIME_LOW_RES | |||
41 | bool | 41 | bool |
42 | default y | 42 | default y |
43 | 43 | ||
44 | config ARCH_HAS_ILOG2_U32 | ||
45 | bool | ||
46 | default y | ||
47 | |||
48 | config ARCH_HAS_ILOG2_U64 | ||
49 | bool | ||
50 | default y | ||
51 | |||
44 | mainmenu "Fujitsu FR-V Kernel Configuration" | 52 | mainmenu "Fujitsu FR-V Kernel Configuration" |
45 | 53 | ||
46 | source "init/Kconfig" | 54 | source "init/Kconfig" |
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index c1d9fc8f1a85..ee677ced7b68 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c | |||
@@ -223,7 +223,7 @@ static int cmode_procctl(ctl_table *ctl, int write, struct file *filp, | |||
223 | 223 | ||
224 | static int cmode_sysctl(ctl_table *table, int __user *name, int nlen, | 224 | static int cmode_sysctl(ctl_table *table, int __user *name, int nlen, |
225 | void __user *oldval, size_t __user *oldlenp, | 225 | void __user *oldval, size_t __user *oldlenp, |
226 | void __user *newval, size_t newlen, void **context) | 226 | void __user *newval, size_t newlen) |
227 | { | 227 | { |
228 | if (oldval && oldlenp) { | 228 | if (oldval && oldlenp) { |
229 | size_t oldlen; | 229 | size_t oldlen; |
@@ -326,7 +326,7 @@ static int p0_procctl(ctl_table *ctl, int write, struct file *filp, | |||
326 | 326 | ||
327 | static int p0_sysctl(ctl_table *table, int __user *name, int nlen, | 327 | static int p0_sysctl(ctl_table *table, int __user *name, int nlen, |
328 | void __user *oldval, size_t __user *oldlenp, | 328 | void __user *oldval, size_t __user *oldlenp, |
329 | void __user *newval, size_t newlen, void **context) | 329 | void __user *newval, size_t newlen) |
330 | { | 330 | { |
331 | if (oldval && oldlenp) { | 331 | if (oldval && oldlenp) { |
332 | size_t oldlen; | 332 | size_t oldlen; |
@@ -370,7 +370,7 @@ static int cm_procctl(ctl_table *ctl, int write, struct file *filp, | |||
370 | 370 | ||
371 | static int cm_sysctl(ctl_table *table, int __user *name, int nlen, | 371 | static int cm_sysctl(ctl_table *table, int __user *name, int nlen, |
372 | void __user *oldval, size_t __user *oldlenp, | 372 | void __user *oldval, size_t __user *oldlenp, |
373 | void __user *newval, size_t newlen, void **context) | 373 | void __user *newval, size_t newlen) |
374 | { | 374 | { |
375 | if (oldval && oldlenp) { | 375 | if (oldval && oldlenp) { |
376 | size_t oldlen; | 376 | size_t oldlen; |
diff --git a/arch/frv/mm/elf-fdpic.c b/arch/frv/mm/elf-fdpic.c index f5a653033fe0..9477ccce070e 100644 --- a/arch/frv/mm/elf-fdpic.c +++ b/arch/frv/mm/elf-fdpic.c | |||
@@ -110,14 +110,14 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi | |||
110 | 110 | ||
111 | #if 0 | 111 | #if 0 |
112 | printk("[area] l=%lx (ENOMEM) f='%s'\n", | 112 | printk("[area] l=%lx (ENOMEM) f='%s'\n", |
113 | len, filp ? filp->f_dentry->d_name.name : ""); | 113 | len, filp ? filp->f_path.dentry->d_name.name : ""); |
114 | #endif | 114 | #endif |
115 | return -ENOMEM; | 115 | return -ENOMEM; |
116 | 116 | ||
117 | success: | 117 | success: |
118 | #if 0 | 118 | #if 0 |
119 | printk("[area] l=%lx ad=%lx f='%s'\n", | 119 | printk("[area] l=%lx ad=%lx f='%s'\n", |
120 | len, addr, filp ? filp->f_dentry->d_name.name : ""); | 120 | len, addr, filp ? filp->f_path.dentry->d_name.name : ""); |
121 | #endif | 121 | #endif |
122 | return addr; | 122 | return addr; |
123 | } /* end arch_get_unmapped_area() */ | 123 | } /* end arch_get_unmapped_area() */ |
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index cabf0bfffc53..34a84bc4baf5 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig | |||
@@ -29,6 +29,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
29 | bool | 29 | bool |
30 | default n | 30 | default n |
31 | 31 | ||
32 | config ARCH_HAS_ILOG2_U32 | ||
33 | bool | ||
34 | default n | ||
35 | |||
36 | config ARCH_HAS_ILOG2_U64 | ||
37 | bool | ||
38 | default n | ||
39 | |||
32 | config GENERIC_FIND_NEXT_BIT | 40 | config GENERIC_FIND_NEXT_BIT |
33 | bool | 41 | bool |
34 | default y | 42 | default y |
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index ea70359b02d0..0d67a0a1151e 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -49,6 +49,11 @@ config GENERIC_IOMAP | |||
49 | bool | 49 | bool |
50 | default y | 50 | default y |
51 | 51 | ||
52 | config GENERIC_BUG | ||
53 | bool | ||
54 | default y | ||
55 | depends on BUG | ||
56 | |||
52 | config GENERIC_HWEIGHT | 57 | config GENERIC_HWEIGHT |
53 | bool | 58 | bool |
54 | default y | 59 | default y |
@@ -185,6 +190,7 @@ endchoice | |||
185 | config PARAVIRT | 190 | config PARAVIRT |
186 | bool "Paravirtualization support (EXPERIMENTAL)" | 191 | bool "Paravirtualization support (EXPERIMENTAL)" |
187 | depends on EXPERIMENTAL | 192 | depends on EXPERIMENTAL |
193 | depends on !(X86_VISWS || X86_VOYAGER) | ||
188 | help | 194 | help |
189 | Paravirtualization is a way of running multiple instances of | 195 | Paravirtualization is a way of running multiple instances of |
190 | Linux on the same machine, under a hypervisor. This option | 196 | Linux on the same machine, under a hypervisor. This option |
diff --git a/arch/i386/Kconfig.cpu b/arch/i386/Kconfig.cpu index 821fd269ca58..2aecfba4ac4f 100644 --- a/arch/i386/Kconfig.cpu +++ b/arch/i386/Kconfig.cpu | |||
@@ -248,6 +248,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
248 | depends on !M386 | 248 | depends on !M386 |
249 | default y | 249 | default y |
250 | 250 | ||
251 | config ARCH_HAS_ILOG2_U32 | ||
252 | bool | ||
253 | default n | ||
254 | |||
255 | config ARCH_HAS_ILOG2_U64 | ||
256 | bool | ||
257 | default n | ||
258 | |||
251 | config GENERIC_CALIBRATE_DELAY | 259 | config GENERIC_CALIBRATE_DELAY |
252 | bool | 260 | bool |
253 | default y | 261 | default y |
diff --git a/arch/i386/defconfig b/arch/i386/defconfig index 65891f11aced..3265208e5899 100644 --- a/arch/i386/defconfig +++ b/arch/i386/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.19-git7 | 3 | # Linux kernel version: 2.6.19-git14 |
4 | # Wed Dec 6 23:50:49 2006 | 4 | # Sat Dec 9 21:23:14 2006 |
5 | # | 5 | # |
6 | CONFIG_X86_32=y | 6 | CONFIG_X86_32=y |
7 | CONFIG_GENERIC_TIME=y | 7 | CONFIG_GENERIC_TIME=y |
@@ -12,6 +12,7 @@ CONFIG_X86=y | |||
12 | CONFIG_MMU=y | 12 | CONFIG_MMU=y |
13 | CONFIG_GENERIC_ISA_DMA=y | 13 | CONFIG_GENERIC_ISA_DMA=y |
14 | CONFIG_GENERIC_IOMAP=y | 14 | CONFIG_GENERIC_IOMAP=y |
15 | CONFIG_GENERIC_BUG=y | ||
15 | CONFIG_GENERIC_HWEIGHT=y | 16 | CONFIG_GENERIC_HWEIGHT=y |
16 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 17 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
17 | CONFIG_DMI=y | 18 | CONFIG_DMI=y |
@@ -141,6 +142,8 @@ CONFIG_X86_CMPXCHG=y | |||
141 | CONFIG_X86_XADD=y | 142 | CONFIG_X86_XADD=y |
142 | CONFIG_X86_L1_CACHE_SHIFT=7 | 143 | CONFIG_X86_L1_CACHE_SHIFT=7 |
143 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 144 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
145 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
146 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
144 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 147 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
145 | CONFIG_X86_WP_WORKS_OK=y | 148 | CONFIG_X86_WP_WORKS_OK=y |
146 | CONFIG_X86_INVLPG=y | 149 | CONFIG_X86_INVLPG=y |
@@ -203,6 +206,7 @@ CONFIG_MTRR=y | |||
203 | CONFIG_SECCOMP=y | 206 | CONFIG_SECCOMP=y |
204 | # CONFIG_HZ_100 is not set | 207 | # CONFIG_HZ_100 is not set |
205 | CONFIG_HZ_250=y | 208 | CONFIG_HZ_250=y |
209 | # CONFIG_HZ_300 is not set | ||
206 | # CONFIG_HZ_1000 is not set | 210 | # CONFIG_HZ_1000 is not set |
207 | CONFIG_HZ=250 | 211 | CONFIG_HZ=250 |
208 | # CONFIG_KEXEC is not set | 212 | # CONFIG_KEXEC is not set |
@@ -563,6 +567,7 @@ CONFIG_IDEDMA_AUTO=y | |||
563 | # | 567 | # |
564 | # CONFIG_RAID_ATTRS is not set | 568 | # CONFIG_RAID_ATTRS is not set |
565 | CONFIG_SCSI=y | 569 | CONFIG_SCSI=y |
570 | # CONFIG_SCSI_TGT is not set | ||
566 | CONFIG_SCSI_NETLINK=y | 571 | CONFIG_SCSI_NETLINK=y |
567 | # CONFIG_SCSI_PROC_FS is not set | 572 | # CONFIG_SCSI_PROC_FS is not set |
568 | 573 | ||
@@ -583,6 +588,7 @@ CONFIG_CHR_DEV_SG=y | |||
583 | # CONFIG_SCSI_MULTI_LUN is not set | 588 | # CONFIG_SCSI_MULTI_LUN is not set |
584 | # CONFIG_SCSI_CONSTANTS is not set | 589 | # CONFIG_SCSI_CONSTANTS is not set |
585 | # CONFIG_SCSI_LOGGING is not set | 590 | # CONFIG_SCSI_LOGGING is not set |
591 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
586 | 592 | ||
587 | # | 593 | # |
588 | # SCSI Transports | 594 | # SCSI Transports |
@@ -642,6 +648,7 @@ CONFIG_AIC79XX_DEBUG_MASK=0 | |||
642 | # CONFIG_SCSI_DC390T is not set | 648 | # CONFIG_SCSI_DC390T is not set |
643 | # CONFIG_SCSI_NSP32 is not set | 649 | # CONFIG_SCSI_NSP32 is not set |
644 | # CONFIG_SCSI_DEBUG is not set | 650 | # CONFIG_SCSI_DEBUG is not set |
651 | # CONFIG_SCSI_SRP is not set | ||
645 | 652 | ||
646 | # | 653 | # |
647 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | 654 | # Serial ATA (prod) and Parallel ATA (experimental) drivers |
@@ -1082,10 +1089,7 @@ CONFIG_SOUND=y | |||
1082 | # Open Sound System | 1089 | # Open Sound System |
1083 | # | 1090 | # |
1084 | CONFIG_SOUND_PRIME=y | 1091 | CONFIG_SOUND_PRIME=y |
1085 | CONFIG_OSS_OBSOLETE_DRIVER=y | ||
1086 | # CONFIG_SOUND_BT878 is not set | 1092 | # CONFIG_SOUND_BT878 is not set |
1087 | # CONFIG_SOUND_EMU10K1 is not set | ||
1088 | # CONFIG_SOUND_FUSION is not set | ||
1089 | # CONFIG_SOUND_ES1371 is not set | 1093 | # CONFIG_SOUND_ES1371 is not set |
1090 | CONFIG_SOUND_ICH=y | 1094 | CONFIG_SOUND_ICH=y |
1091 | # CONFIG_SOUND_TRIDENT is not set | 1095 | # CONFIG_SOUND_TRIDENT is not set |
@@ -1095,6 +1099,11 @@ CONFIG_SOUND_ICH=y | |||
1095 | # CONFIG_SOUND_OSS is not set | 1099 | # CONFIG_SOUND_OSS is not set |
1096 | 1100 | ||
1097 | # | 1101 | # |
1102 | # HID Devices | ||
1103 | # | ||
1104 | CONFIG_HID=y | ||
1105 | |||
1106 | # | ||
1098 | # USB support | 1107 | # USB support |
1099 | # | 1108 | # |
1100 | CONFIG_USB_ARCH_HAS_HCD=y | 1109 | CONFIG_USB_ARCH_HAS_HCD=y |
@@ -1158,8 +1167,7 @@ CONFIG_USB_STORAGE=y | |||
1158 | # USB Input Devices | 1167 | # USB Input Devices |
1159 | # | 1168 | # |
1160 | CONFIG_USB_HID=y | 1169 | CONFIG_USB_HID=y |
1161 | CONFIG_USB_HIDINPUT=y | 1170 | # CONFIG_USB_HID_POWERBOOK is not set |
1162 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | ||
1163 | # CONFIG_HID_FF is not set | 1171 | # CONFIG_HID_FF is not set |
1164 | # CONFIG_USB_HIDDEV is not set | 1172 | # CONFIG_USB_HIDDEV is not set |
1165 | # CONFIG_USB_AIPTEK is not set | 1173 | # CONFIG_USB_AIPTEK is not set |
@@ -1444,6 +1452,11 @@ CONFIG_NLS_ISO8859_15=y | |||
1444 | CONFIG_NLS_UTF8=y | 1452 | CONFIG_NLS_UTF8=y |
1445 | 1453 | ||
1446 | # | 1454 | # |
1455 | # Distributed Lock Manager | ||
1456 | # | ||
1457 | # CONFIG_DLM is not set | ||
1458 | |||
1459 | # | ||
1447 | # Instrumentation Support | 1460 | # Instrumentation Support |
1448 | # | 1461 | # |
1449 | CONFIG_PROFILING=y | 1462 | CONFIG_PROFILING=y |
@@ -1509,6 +1522,7 @@ CONFIG_DOUBLEFAULT=y | |||
1509 | # | 1522 | # |
1510 | # Library routines | 1523 | # Library routines |
1511 | # | 1524 | # |
1525 | CONFIG_BITREVERSE=y | ||
1512 | # CONFIG_CRC_CCITT is not set | 1526 | # CONFIG_CRC_CCITT is not set |
1513 | # CONFIG_CRC16 is not set | 1527 | # CONFIG_CRC16 is not set |
1514 | CONFIG_CRC32=y | 1528 | CONFIG_CRC32=y |
diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c index db6dd20c3589..51130b39cd2e 100644 --- a/arch/i386/kernel/cpuid.c +++ b/arch/i386/kernel/cpuid.c | |||
@@ -116,7 +116,7 @@ static ssize_t cpuid_read(struct file *file, char __user *buf, | |||
116 | char __user *tmp = buf; | 116 | char __user *tmp = buf; |
117 | u32 data[4]; | 117 | u32 data[4]; |
118 | u32 reg = *ppos; | 118 | u32 reg = *ppos; |
119 | int cpu = iminor(file->f_dentry->d_inode); | 119 | int cpu = iminor(file->f_path.dentry->d_inode); |
120 | 120 | ||
121 | if (count % 16) | 121 | if (count % 16) |
122 | return -EINVAL; /* Invalid chunk size */ | 122 | return -EINVAL; /* Invalid chunk size */ |
@@ -134,7 +134,7 @@ static ssize_t cpuid_read(struct file *file, char __user *buf, | |||
134 | 134 | ||
135 | static int cpuid_open(struct inode *inode, struct file *file) | 135 | static int cpuid_open(struct inode *inode, struct file *file) |
136 | { | 136 | { |
137 | unsigned int cpu = iminor(file->f_dentry->d_inode); | 137 | unsigned int cpu = iminor(file->f_path.dentry->d_inode); |
138 | struct cpuinfo_x86 *c = &(cpu_data)[cpu]; | 138 | struct cpuinfo_x86 *c = &(cpu_data)[cpu]; |
139 | 139 | ||
140 | if (cpu >= NR_CPUS || !cpu_online(cpu)) | 140 | if (cpu >= NR_CPUS || !cpu_online(cpu)) |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index e21dcde0790e..2424cc9c7b3d 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -2485,7 +2485,7 @@ device_initcall(ioapic_init_sysfs); | |||
2485 | int create_irq(void) | 2485 | int create_irq(void) |
2486 | { | 2486 | { |
2487 | /* Allocate an unused irq */ | 2487 | /* Allocate an unused irq */ |
2488 | int irq, new, vector; | 2488 | int irq, new, vector = 0; |
2489 | unsigned long flags; | 2489 | unsigned long flags; |
2490 | 2490 | ||
2491 | irq = -ENOSPC; | 2491 | irq = -ENOSPC; |
diff --git a/arch/i386/kernel/module.c b/arch/i386/kernel/module.c index d7d9c8b23f72..3db0a5442eb1 100644 --- a/arch/i386/kernel/module.c +++ b/arch/i386/kernel/module.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/bug.h> | ||
24 | 25 | ||
25 | #if 0 | 26 | #if 0 |
26 | #define DEBUGP printk | 27 | #define DEBUGP printk |
@@ -141,10 +142,11 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
141 | apply_paravirt(pseg, pseg + para->sh_size); | 142 | apply_paravirt(pseg, pseg + para->sh_size); |
142 | } | 143 | } |
143 | 144 | ||
144 | return 0; | 145 | return module_bug_finalize(hdr, sechdrs, me); |
145 | } | 146 | } |
146 | 147 | ||
147 | void module_arch_cleanup(struct module *mod) | 148 | void module_arch_cleanup(struct module *mod) |
148 | { | 149 | { |
149 | alternatives_smp_module_del(mod); | 150 | alternatives_smp_module_del(mod); |
151 | module_bug_cleanup(mod); | ||
150 | } | 152 | } |
diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c index 1d1a56cae340..4a472a17d1c6 100644 --- a/arch/i386/kernel/msr.c +++ b/arch/i386/kernel/msr.c | |||
@@ -172,7 +172,7 @@ static ssize_t msr_read(struct file *file, char __user * buf, | |||
172 | u32 __user *tmp = (u32 __user *) buf; | 172 | u32 __user *tmp = (u32 __user *) buf; |
173 | u32 data[2]; | 173 | u32 data[2]; |
174 | u32 reg = *ppos; | 174 | u32 reg = *ppos; |
175 | int cpu = iminor(file->f_dentry->d_inode); | 175 | int cpu = iminor(file->f_path.dentry->d_inode); |
176 | int err; | 176 | int err; |
177 | 177 | ||
178 | if (count % 8) | 178 | if (count % 8) |
@@ -196,7 +196,7 @@ static ssize_t msr_write(struct file *file, const char __user *buf, | |||
196 | const u32 __user *tmp = (const u32 __user *)buf; | 196 | const u32 __user *tmp = (const u32 __user *)buf; |
197 | u32 data[2]; | 197 | u32 data[2]; |
198 | u32 reg = *ppos; | 198 | u32 reg = *ppos; |
199 | int cpu = iminor(file->f_dentry->d_inode); | 199 | int cpu = iminor(file->f_path.dentry->d_inode); |
200 | int err; | 200 | int err; |
201 | 201 | ||
202 | if (count % 8) | 202 | if (count % 8) |
@@ -216,7 +216,7 @@ static ssize_t msr_write(struct file *file, const char __user *buf, | |||
216 | 216 | ||
217 | static int msr_open(struct inode *inode, struct file *file) | 217 | static int msr_open(struct inode *inode, struct file *file) |
218 | { | 218 | { |
219 | unsigned int cpu = iminor(file->f_dentry->d_inode); | 219 | unsigned int cpu = iminor(file->f_path.dentry->d_inode); |
220 | struct cpuinfo_x86 *c = &(cpu_data)[cpu]; | 220 | struct cpuinfo_x86 *c = &(cpu_data)[cpu]; |
221 | 221 | ||
222 | if (cpu >= NR_CPUS || !cpu_online(cpu)) | 222 | if (cpu >= NR_CPUS || !cpu_online(cpu)) |
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index f5bc7e1be801..a5e34d655965 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -195,6 +195,8 @@ static __cpuinit inline int nmi_known_cpu(void) | |||
195 | return 0; | 195 | return 0; |
196 | } | 196 | } |
197 | 197 | ||
198 | static int endflag __initdata = 0; | ||
199 | |||
198 | #ifdef CONFIG_SMP | 200 | #ifdef CONFIG_SMP |
199 | /* The performance counters used by NMI_LOCAL_APIC don't trigger when | 201 | /* The performance counters used by NMI_LOCAL_APIC don't trigger when |
200 | * the CPU is idle. To make sure the NMI watchdog really ticks on all | 202 | * the CPU is idle. To make sure the NMI watchdog really ticks on all |
@@ -202,7 +204,6 @@ static __cpuinit inline int nmi_known_cpu(void) | |||
202 | */ | 204 | */ |
203 | static __init void nmi_cpu_busy(void *data) | 205 | static __init void nmi_cpu_busy(void *data) |
204 | { | 206 | { |
205 | volatile int *endflag = data; | ||
206 | local_irq_enable_in_hardirq(); | 207 | local_irq_enable_in_hardirq(); |
207 | /* Intentionally don't use cpu_relax here. This is | 208 | /* Intentionally don't use cpu_relax here. This is |
208 | to make sure that the performance counter really ticks, | 209 | to make sure that the performance counter really ticks, |
@@ -210,14 +211,13 @@ static __init void nmi_cpu_busy(void *data) | |||
210 | pause instruction. On a real HT machine this is fine because | 211 | pause instruction. On a real HT machine this is fine because |
211 | all other CPUs are busy with "useless" delay loops and don't | 212 | all other CPUs are busy with "useless" delay loops and don't |
212 | care if they get somewhat less cycles. */ | 213 | care if they get somewhat less cycles. */ |
213 | while (*endflag == 0) | 214 | while (endflag == 0) |
214 | barrier(); | 215 | mb(); |
215 | } | 216 | } |
216 | #endif | 217 | #endif |
217 | 218 | ||
218 | static int __init check_nmi_watchdog(void) | 219 | static int __init check_nmi_watchdog(void) |
219 | { | 220 | { |
220 | volatile int endflag = 0; | ||
221 | unsigned int *prev_nmi_count; | 221 | unsigned int *prev_nmi_count; |
222 | int cpu; | 222 | int cpu; |
223 | 223 | ||
diff --git a/arch/i386/kernel/quirks.c b/arch/i386/kernel/quirks.c index a01320a7b636..34874c398b44 100644 --- a/arch/i386/kernel/quirks.c +++ b/arch/i386/kernel/quirks.c | |||
@@ -10,13 +10,38 @@ | |||
10 | #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI) | 10 | #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI) |
11 | static void __devinit verify_quirk_intel_irqbalance(struct pci_dev *dev) | 11 | static void __devinit verify_quirk_intel_irqbalance(struct pci_dev *dev) |
12 | { | 12 | { |
13 | u8 config, rev; | ||
14 | u32 word; | ||
15 | |||
16 | /* BIOS may enable hardware IRQ balancing for | ||
17 | * E7520/E7320/E7525(revision ID 0x9 and below) | ||
18 | * based platforms. | ||
19 | * For those platforms, make sure that the genapic is set to 'flat' | ||
20 | */ | ||
21 | pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev); | ||
22 | if (rev > 0x9) | ||
23 | return; | ||
24 | |||
25 | /* enable access to config space*/ | ||
26 | pci_read_config_byte(dev, 0xf4, &config); | ||
27 | pci_write_config_byte(dev, 0xf4, config|0x2); | ||
28 | |||
29 | /* read xTPR register */ | ||
30 | raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word); | ||
31 | |||
32 | if (!(word & (1 << 13))) { | ||
13 | #ifdef CONFIG_X86_64 | 33 | #ifdef CONFIG_X86_64 |
14 | if (genapic != &apic_flat) | 34 | if (genapic != &apic_flat) |
15 | panic("APIC mode must be flat on this system\n"); | 35 | panic("APIC mode must be flat on this system\n"); |
16 | #elif defined(CONFIG_X86_GENERICARCH) | 36 | #elif defined(CONFIG_X86_GENERICARCH) |
17 | if (genapic != &apic_default) | 37 | if (genapic != &apic_default) |
18 | panic("APIC mode must be default(flat) on this system. Use apic=default\n"); | 38 | panic("APIC mode must be default(flat) on this system. Use apic=default\n"); |
19 | #endif | 39 | #endif |
40 | } | ||
41 | |||
42 | /* put back the original value for config space*/ | ||
43 | if (!(config & 0x2)) | ||
44 | pci_write_config_byte(dev, 0xf4, config); | ||
20 | } | 45 | } |
21 | 46 | ||
22 | void __init quirk_intel_irqbalance(void) | 47 | void __init quirk_intel_irqbalance(void) |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 4bf0e3c83b8b..b0f84e5778ad 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -69,7 +69,7 @@ static int __devinitdata smp_b_stepping; | |||
69 | 69 | ||
70 | /* Number of siblings per CPU package */ | 70 | /* Number of siblings per CPU package */ |
71 | int smp_num_siblings = 1; | 71 | int smp_num_siblings = 1; |
72 | #ifdef CONFIG_X86_HT | 72 | #ifdef CONFIG_SMP |
73 | EXPORT_SYMBOL(smp_num_siblings); | 73 | EXPORT_SYMBOL(smp_num_siblings); |
74 | #endif | 74 | #endif |
75 | 75 | ||
@@ -1118,7 +1118,7 @@ static int __cpuinit __smp_prepare_cpu(int cpu) | |||
1118 | 1118 | ||
1119 | /* init low mem mapping */ | 1119 | /* init low mem mapping */ |
1120 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS, | 1120 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS, |
1121 | KERNEL_PGD_PTRS); | 1121 | min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS)); |
1122 | flush_tlb_all(); | 1122 | flush_tlb_all(); |
1123 | schedule_work(&info.task); | 1123 | schedule_work(&info.task); |
1124 | wait_for_completion(&done); | 1124 | wait_for_completion(&done); |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 68de48e498ca..2b30dbf8d117 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/unwind.h> | 30 | #include <linux/unwind.h> |
31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | #include <linux/nmi.h> | 32 | #include <linux/nmi.h> |
33 | #include <linux/bug.h> | ||
33 | 34 | ||
34 | #ifdef CONFIG_EISA | 35 | #ifdef CONFIG_EISA |
35 | #include <linux/ioport.h> | 36 | #include <linux/ioport.h> |
@@ -420,43 +421,22 @@ void show_registers(struct pt_regs *regs) | |||
420 | printk("\n"); | 421 | printk("\n"); |
421 | } | 422 | } |
422 | 423 | ||
423 | static void handle_BUG(struct pt_regs *regs) | 424 | int is_valid_bugaddr(unsigned long eip) |
424 | { | 425 | { |
425 | unsigned long eip = regs->eip; | ||
426 | unsigned short ud2; | 426 | unsigned short ud2; |
427 | 427 | ||
428 | if (eip < PAGE_OFFSET) | 428 | if (eip < PAGE_OFFSET) |
429 | return; | 429 | return 0; |
430 | if (probe_kernel_address((unsigned short *)eip, ud2)) | 430 | if (probe_kernel_address((unsigned short *)eip, ud2)) |
431 | return; | 431 | return 0; |
432 | if (ud2 != 0x0b0f) | ||
433 | return; | ||
434 | |||
435 | printk(KERN_EMERG "------------[ cut here ]------------\n"); | ||
436 | |||
437 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
438 | do { | ||
439 | unsigned short line; | ||
440 | char *file; | ||
441 | char c; | ||
442 | |||
443 | if (probe_kernel_address((unsigned short *)(eip + 2), line)) | ||
444 | break; | ||
445 | if (probe_kernel_address((char **)(eip + 4), file) || | ||
446 | (unsigned long)file < PAGE_OFFSET || | ||
447 | probe_kernel_address(file, c)) | ||
448 | file = "<bad filename>"; | ||
449 | 432 | ||
450 | printk(KERN_EMERG "kernel BUG at %s:%d!\n", file, line); | 433 | return ud2 == 0x0b0f; |
451 | return; | ||
452 | } while (0); | ||
453 | #endif | ||
454 | printk(KERN_EMERG "Kernel BUG at [verbose debug info unavailable]\n"); | ||
455 | } | 434 | } |
456 | 435 | ||
457 | /* This is gone through when something in the kernel | 436 | /* |
458 | * has done something bad and is about to be terminated. | 437 | * This is gone through when something in the kernel has done something bad and |
459 | */ | 438 | * is about to be terminated. |
439 | */ | ||
460 | void die(const char * str, struct pt_regs * regs, long err) | 440 | void die(const char * str, struct pt_regs * regs, long err) |
461 | { | 441 | { |
462 | static struct { | 442 | static struct { |
@@ -488,7 +468,8 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
488 | unsigned long esp; | 468 | unsigned long esp; |
489 | unsigned short ss; | 469 | unsigned short ss; |
490 | 470 | ||
491 | handle_BUG(regs); | 471 | report_bug(regs->eip); |
472 | |||
492 | printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); | 473 | printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); |
493 | #ifdef CONFIG_PREEMPT | 474 | #ifdef CONFIG_PREEMPT |
494 | printk(KERN_EMERG "PREEMPT "); | 475 | printk(KERN_EMERG "PREEMPT "); |
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S index 56e6ad5cb045..a53c8b1854b5 100644 --- a/arch/i386/kernel/vmlinux.lds.S +++ b/arch/i386/kernel/vmlinux.lds.S | |||
@@ -26,6 +26,7 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") | |||
26 | OUTPUT_ARCH(i386) | 26 | OUTPUT_ARCH(i386) |
27 | ENTRY(phys_startup_32) | 27 | ENTRY(phys_startup_32) |
28 | jiffies = jiffies_64; | 28 | jiffies = jiffies_64; |
29 | _proxy_pda = 0; | ||
29 | 30 | ||
30 | PHDRS { | 31 | PHDRS { |
31 | text PT_LOAD FLAGS(5); /* R_E */ | 32 | text PT_LOAD FLAGS(5); /* R_E */ |
@@ -57,6 +58,8 @@ SECTIONS | |||
57 | 58 | ||
58 | RODATA | 59 | RODATA |
59 | 60 | ||
61 | BUG_TABLE | ||
62 | |||
60 | . = ALIGN(4); | 63 | . = ALIGN(4); |
61 | .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { | 64 | .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { |
62 | __tracedata_start = .; | 65 | __tracedata_start = .; |
diff --git a/arch/i386/mach-visws/setup.c b/arch/i386/mach-visws/setup.c index 885c7cbfd478..233ee20907b9 100644 --- a/arch/i386/mach-visws/setup.c +++ b/arch/i386/mach-visws/setup.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/smp.h> | 6 | #include <linux/smp.h> |
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/interrupt.h> | 8 | #include <linux/interrupt.h> |
9 | #include <linux/module.h> | ||
9 | 10 | ||
10 | #include <asm/fixmap.h> | 11 | #include <asm/fixmap.h> |
11 | #include <asm/arch_hooks.h> | 12 | #include <asm/arch_hooks.h> |
@@ -142,6 +143,8 @@ void __init time_init_hook(void) | |||
142 | 143 | ||
143 | unsigned long sgivwfb_mem_phys; | 144 | unsigned long sgivwfb_mem_phys; |
144 | unsigned long sgivwfb_mem_size; | 145 | unsigned long sgivwfb_mem_size; |
146 | EXPORT_SYMBOL(sgivwfb_mem_phys); | ||
147 | EXPORT_SYMBOL(sgivwfb_mem_size); | ||
145 | 148 | ||
146 | long long mem_size __initdata = 0; | 149 | long long mem_size __initdata = 0; |
147 | 150 | ||
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 75d839715b2f..fcacfe291b9b 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -34,6 +34,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
34 | bool | 34 | bool |
35 | default y | 35 | default y |
36 | 36 | ||
37 | config ARCH_HAS_ILOG2_U32 | ||
38 | bool | ||
39 | default n | ||
40 | |||
41 | config ARCH_HAS_ILOG2_U64 | ||
42 | bool | ||
43 | default n | ||
44 | |||
37 | config GENERIC_FIND_NEXT_BIT | 45 | config GENERIC_FIND_NEXT_BIT |
38 | bool | 46 | bool |
39 | default y | 47 | default y |
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index a4a6e1463af8..957681c39ad9 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
@@ -235,7 +235,7 @@ mmap_subpage (struct file *file, unsigned long start, unsigned long end, int pro | |||
235 | 235 | ||
236 | if (!(flags & MAP_ANONYMOUS)) { | 236 | if (!(flags & MAP_ANONYMOUS)) { |
237 | /* read the file contents */ | 237 | /* read the file contents */ |
238 | inode = file->f_dentry->d_inode; | 238 | inode = file->f_path.dentry->d_inode; |
239 | if (!inode->i_fop || !file->f_op->read | 239 | if (!inode->i_fop || !file->f_op->read |
240 | || ((*file->f_op->read)(file, (char __user *) start, end - start, &off) < 0)) | 240 | || ((*file->f_op->read)(file, (char __user *) start, end - start, &off) < 0)) |
241 | { | 241 | { |
@@ -837,7 +837,7 @@ emulate_mmap (struct file *file, unsigned long start, unsigned long len, int pro | |||
837 | 837 | ||
838 | if (!is_congruent) { | 838 | if (!is_congruent) { |
839 | /* read the file contents */ | 839 | /* read the file contents */ |
840 | inode = file->f_dentry->d_inode; | 840 | inode = file->f_path.dentry->d_inode; |
841 | if (!inode->i_fop || !file->f_op->read | 841 | if (!inode->i_fop || !file->f_op->read |
842 | || ((*file->f_op->read)(file, (char __user *) pstart, pend - pstart, &poff) | 842 | || ((*file->f_op->read)(file, (char __user *) pstart, pend - pstart, &poff) |
843 | < 0)) | 843 | < 0)) |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index dbb28164b19b..aa94f60fa8e7 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -2188,13 +2188,13 @@ pfm_alloc_fd(struct file **cfile) | |||
2188 | /* | 2188 | /* |
2189 | * allocate a new dcache entry | 2189 | * allocate a new dcache entry |
2190 | */ | 2190 | */ |
2191 | file->f_dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); | 2191 | file->f_path.dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); |
2192 | if (!file->f_dentry) goto out; | 2192 | if (!file->f_path.dentry) goto out; |
2193 | 2193 | ||
2194 | file->f_dentry->d_op = &pfmfs_dentry_operations; | 2194 | file->f_path.dentry->d_op = &pfmfs_dentry_operations; |
2195 | 2195 | ||
2196 | d_add(file->f_dentry, inode); | 2196 | d_add(file->f_path.dentry, inode); |
2197 | file->f_vfsmnt = mntget(pfmfs_mnt); | 2197 | file->f_path.mnt = mntget(pfmfs_mnt); |
2198 | file->f_mapping = inode->i_mapping; | 2198 | file->f_mapping = inode->i_mapping; |
2199 | 2199 | ||
2200 | file->f_op = &pfm_file_ops; | 2200 | file->f_op = &pfm_file_ops; |
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index fd607ca51a8d..e375a2f0f2c3 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c | |||
@@ -302,7 +302,7 @@ salinfo_event_open(struct inode *inode, struct file *file) | |||
302 | static ssize_t | 302 | static ssize_t |
303 | salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) | 303 | salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) |
304 | { | 304 | { |
305 | struct inode *inode = file->f_dentry->d_inode; | 305 | struct inode *inode = file->f_path.dentry->d_inode; |
306 | struct proc_dir_entry *entry = PDE(inode); | 306 | struct proc_dir_entry *entry = PDE(inode); |
307 | struct salinfo_data *data = entry->data; | 307 | struct salinfo_data *data = entry->data; |
308 | char cmd[32]; | 308 | char cmd[32]; |
@@ -464,7 +464,7 @@ retry: | |||
464 | static ssize_t | 464 | static ssize_t |
465 | salinfo_log_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) | 465 | salinfo_log_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) |
466 | { | 466 | { |
467 | struct inode *inode = file->f_dentry->d_inode; | 467 | struct inode *inode = file->f_path.dentry->d_inode; |
468 | struct proc_dir_entry *entry = PDE(inode); | 468 | struct proc_dir_entry *entry = PDE(inode); |
469 | struct salinfo_data *data = entry->data; | 469 | struct salinfo_data *data = entry->data; |
470 | u8 *buf; | 470 | u8 *buf; |
@@ -525,7 +525,7 @@ salinfo_log_clear(struct salinfo_data *data, int cpu) | |||
525 | static ssize_t | 525 | static ssize_t |
526 | salinfo_log_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) | 526 | salinfo_log_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) |
527 | { | 527 | { |
528 | struct inode *inode = file->f_dentry->d_inode; | 528 | struct inode *inode = file->f_path.dentry->d_inode; |
529 | struct proc_dir_entry *entry = PDE(inode); | 529 | struct proc_dir_entry *entry = PDE(inode); |
530 | struct salinfo_data *data = entry->data; | 530 | struct salinfo_data *data = entry->data; |
531 | char cmd[32]; | 531 | char cmd[32]; |
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 41fd490af3b4..f383dab973f5 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -214,6 +214,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
214 | bool | 214 | bool |
215 | default n | 215 | default n |
216 | 216 | ||
217 | config ARCH_HAS_ILOG2_U32 | ||
218 | bool | ||
219 | default n | ||
220 | |||
221 | config ARCH_HAS_ILOG2_U64 | ||
222 | bool | ||
223 | default n | ||
224 | |||
217 | config GENERIC_FIND_NEXT_BIT | 225 | config GENERIC_FIND_NEXT_BIT |
218 | bool | 226 | bool |
219 | default y | 227 | default y |
diff --git a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c index bce8af5e3bb2..ee3c8be12fa0 100644 --- a/arch/m32r/boot/compressed/m32r_sio.c +++ b/arch/m32r/boot/compressed/m32r_sio.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * arch/m32r/boot/compressed/m32r_sio.c | 2 | * arch/m32r/boot/compressed/m32r_sio.c |
3 | * | 3 | * |
4 | * 2003-02-12: Takeo Takahashi | 4 | * 2003-02-12: Takeo Takahashi |
5 | * 2006-11-30: OPSPUT support by Kazuhiro Inaoka | ||
5 | * | 6 | * |
6 | */ | 7 | */ |
7 | 8 | ||
@@ -16,7 +17,7 @@ static int puts(const char *s) | |||
16 | return 0; | 17 | return 0; |
17 | } | 18 | } |
18 | 19 | ||
19 | #if defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) | 20 | #if defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT) |
20 | #include <asm/m32r.h> | 21 | #include <asm/m32r.h> |
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | 23 | ||
@@ -31,7 +32,11 @@ static int puts(const char *s) | |||
31 | #define BOOT_SIO0TXB (volatile unsigned short *)(0x02c00000 + 0x2000c) | 32 | #define BOOT_SIO0TXB (volatile unsigned short *)(0x02c00000 + 0x2000c) |
32 | #else | 33 | #else |
33 | #undef PLD_BASE | 34 | #undef PLD_BASE |
35 | #if defined(CONFIG_PLAT_OPSPUT) | ||
36 | #define PLD_BASE 0x1cc00000 | ||
37 | #else | ||
34 | #define PLD_BASE 0xa4c00000 | 38 | #define PLD_BASE 0xa4c00000 |
39 | #endif | ||
35 | #define BOOT_SIO0STS PLD_ESIO0STS | 40 | #define BOOT_SIO0STS PLD_ESIO0STS |
36 | #define BOOT_SIO0TXB PLD_ESIO0TXB | 41 | #define BOOT_SIO0TXB PLD_ESIO0TXB |
37 | #endif | 42 | #endif |
diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index ac6d840b382b..a2c472c0549f 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S | |||
@@ -23,35 +23,35 @@ | |||
23 | * updated in fork.c:copy_thread, signal.c:do_signal, | 23 | * updated in fork.c:copy_thread, signal.c:do_signal, |
24 | * ptrace.c and ptrace.h | 24 | * ptrace.c and ptrace.h |
25 | * | 25 | * |
26 | * M32Rx/M32R2 M32R | 26 | * M32R/M32Rx/M32R2 |
27 | * @(sp) - r4 ditto | 27 | * @(sp) - r4 |
28 | * @(0x04,sp) - r5 ditto | 28 | * @(0x04,sp) - r5 |
29 | * @(0x08,sp) - r6 ditto | 29 | * @(0x08,sp) - r6 |
30 | * @(0x0c,sp) - *pt_regs ditto | 30 | * @(0x0c,sp) - *pt_regs |
31 | * @(0x10,sp) - r0 ditto | 31 | * @(0x10,sp) - r0 |
32 | * @(0x14,sp) - r1 ditto | 32 | * @(0x14,sp) - r1 |
33 | * @(0x18,sp) - r2 ditto | 33 | * @(0x18,sp) - r2 |
34 | * @(0x1c,sp) - r3 ditto | 34 | * @(0x1c,sp) - r3 |
35 | * @(0x20,sp) - r7 ditto | 35 | * @(0x20,sp) - r7 |
36 | * @(0x24,sp) - r8 ditto | 36 | * @(0x24,sp) - r8 |
37 | * @(0x28,sp) - r9 ditto | 37 | * @(0x28,sp) - r9 |
38 | * @(0x2c,sp) - r10 ditto | 38 | * @(0x2c,sp) - r10 |
39 | * @(0x30,sp) - r11 ditto | 39 | * @(0x30,sp) - r11 |
40 | * @(0x34,sp) - r12 ditto | 40 | * @(0x34,sp) - r12 |
41 | * @(0x38,sp) - syscall_nr ditto | 41 | * @(0x38,sp) - syscall_nr |
42 | * @(0x3c,sp) - acc0h @(0x3c,sp) - acch | 42 | * @(0x3c,sp) - acc0h |
43 | * @(0x40,sp) - acc0l @(0x40,sp) - accl | 43 | * @(0x40,sp) - acc0l |
44 | * @(0x44,sp) - acc1h @(0x44,sp) - dummy_acc1h | 44 | * @(0x44,sp) - acc1h ; ISA_DSP_LEVEL2 only |
45 | * @(0x48,sp) - acc1l @(0x48,sp) - dummy_acc1l | 45 | * @(0x48,sp) - acc1l ; ISA_DSP_LEVEL2 only |
46 | * @(0x4c,sp) - psw ditto | 46 | * @(0x4c,sp) - psw |
47 | * @(0x50,sp) - bpc ditto | 47 | * @(0x50,sp) - bpc |
48 | * @(0x54,sp) - bbpsw ditto | 48 | * @(0x54,sp) - bbpsw |
49 | * @(0x58,sp) - bbpc ditto | 49 | * @(0x58,sp) - bbpc |
50 | * @(0x5c,sp) - spu (cr3) ditto | 50 | * @(0x5c,sp) - spu (cr3) |
51 | * @(0x60,sp) - fp (r13) ditto | 51 | * @(0x60,sp) - fp (r13) |
52 | * @(0x64,sp) - lr (r14) ditto | 52 | * @(0x64,sp) - lr (r14) |
53 | * @(0x68,sp) - spi (cr2) ditto | 53 | * @(0x68,sp) - spi (cr2) |
54 | * @(0x6c,sp) - orig_r0 ditto | 54 | * @(0x6c,sp) - orig_r0 |
55 | */ | 55 | */ |
56 | 56 | ||
57 | #include <linux/linkage.h> | 57 | #include <linux/linkage.h> |
@@ -95,17 +95,10 @@ | |||
95 | #define R11(reg) @(0x30,reg) | 95 | #define R11(reg) @(0x30,reg) |
96 | #define R12(reg) @(0x34,reg) | 96 | #define R12(reg) @(0x34,reg) |
97 | #define SYSCALL_NR(reg) @(0x38,reg) | 97 | #define SYSCALL_NR(reg) @(0x38,reg) |
98 | #if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2) | ||
99 | #define ACC0H(reg) @(0x3C,reg) | 98 | #define ACC0H(reg) @(0x3C,reg) |
100 | #define ACC0L(reg) @(0x40,reg) | 99 | #define ACC0L(reg) @(0x40,reg) |
101 | #define ACC1H(reg) @(0x44,reg) | 100 | #define ACC1H(reg) @(0x44,reg) |
102 | #define ACC1L(reg) @(0x48,reg) | 101 | #define ACC1L(reg) @(0x48,reg) |
103 | #elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) | ||
104 | #define ACCH(reg) @(0x3C,reg) | ||
105 | #define ACCL(reg) @(0x40,reg) | ||
106 | #else | ||
107 | #error unknown isa configuration | ||
108 | #endif | ||
109 | #define PSW(reg) @(0x4C,reg) | 102 | #define PSW(reg) @(0x4C,reg) |
110 | #define BPC(reg) @(0x50,reg) | 103 | #define BPC(reg) @(0x50,reg) |
111 | #define BBPSW(reg) @(0x54,reg) | 104 | #define BBPSW(reg) @(0x54,reg) |
@@ -603,8 +596,6 @@ ENTRY(ace_handler) | |||
603 | beqz r1, inst | 596 | beqz r1, inst |
604 | oprand: | 597 | oprand: |
605 | ld r2, @(low(MDEVA_offset),r2) ; set address | 598 | ld r2, @(low(MDEVA_offset),r2) ; set address |
606 | srli r2, #12 | ||
607 | slli r2, #12 | ||
608 | srli r1, #1 | 599 | srli r1, #1 |
609 | bra 1f | 600 | bra 1f |
610 | inst: | 601 | inst: |
diff --git a/arch/m32r/kernel/io_opsput.c b/arch/m32r/kernel/io_opsput.c index da6c5f5c1f82..3cbb1f717e50 100644 --- a/arch/m32r/kernel/io_opsput.c +++ b/arch/m32r/kernel/io_opsput.c | |||
@@ -30,14 +30,34 @@ extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int); | |||
30 | extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); | 30 | extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); |
31 | #endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */ | 31 | #endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */ |
32 | 32 | ||
33 | #define PORT2ADDR(port) _port2addr(port) | 33 | #define PORT2ADDR(port) _port2addr(port) |
34 | #define PORT2ADDR_USB(port) _port2addr_usb(port) | 34 | #define PORT2ADDR_USB(port) _port2addr_usb(port) |
35 | 35 | ||
36 | static inline void *_port2addr(unsigned long port) | 36 | static inline void *_port2addr(unsigned long port) |
37 | { | 37 | { |
38 | return (void *)(port | NONCACHE_OFFSET); | 38 | return (void *)(port | NONCACHE_OFFSET); |
39 | } | 39 | } |
40 | 40 | ||
41 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
42 | static inline void *__port2addr_ata(unsigned long port) | ||
43 | { | ||
44 | static int dummy_reg; | ||
45 | |||
46 | switch (port) { | ||
47 | case 0x1f0: return (void *)(0x0c002000 | NONCACHE_OFFSET); | ||
48 | case 0x1f1: return (void *)(0x0c012800 | NONCACHE_OFFSET); | ||
49 | case 0x1f2: return (void *)(0x0c012002 | NONCACHE_OFFSET); | ||
50 | case 0x1f3: return (void *)(0x0c012802 | NONCACHE_OFFSET); | ||
51 | case 0x1f4: return (void *)(0x0c012004 | NONCACHE_OFFSET); | ||
52 | case 0x1f5: return (void *)(0x0c012804 | NONCACHE_OFFSET); | ||
53 | case 0x1f6: return (void *)(0x0c012006 | NONCACHE_OFFSET); | ||
54 | case 0x1f7: return (void *)(0x0c012806 | NONCACHE_OFFSET); | ||
55 | case 0x3f6: return (void *)(0x0c01200e | NONCACHE_OFFSET); | ||
56 | default: return (void *)&dummy_reg; | ||
57 | } | ||
58 | } | ||
59 | #endif | ||
60 | |||
41 | /* | 61 | /* |
42 | * OPSPUT-LAN is located in the extended bus space | 62 | * OPSPUT-LAN is located in the extended bus space |
43 | * from 0x10000000 to 0x13ffffff on physical address. | 63 | * from 0x10000000 to 0x13ffffff on physical address. |
@@ -97,6 +117,12 @@ unsigned char _inb(unsigned long port) | |||
97 | { | 117 | { |
98 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 118 | if (port >= LAN_IOSTART && port < LAN_IOEND) |
99 | return _ne_inb(PORT2ADDR_NE(port)); | 119 | return _ne_inb(PORT2ADDR_NE(port)); |
120 | |||
121 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
122 | else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
123 | return *(volatile unsigned char *)__port2addr_ata(port); | ||
124 | } | ||
125 | #endif | ||
100 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | 126 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) |
101 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | 127 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { |
102 | unsigned char b; | 128 | unsigned char b; |
@@ -112,6 +138,11 @@ unsigned short _inw(unsigned long port) | |||
112 | { | 138 | { |
113 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 139 | if (port >= LAN_IOSTART && port < LAN_IOEND) |
114 | return _ne_inw(PORT2ADDR_NE(port)); | 140 | return _ne_inw(PORT2ADDR_NE(port)); |
141 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
142 | else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
143 | return *(volatile unsigned short *)__port2addr_ata(port); | ||
144 | } | ||
145 | #endif | ||
115 | #if defined(CONFIG_USB) | 146 | #if defined(CONFIG_USB) |
116 | else if(port >= 0x340 && port < 0x3a0) | 147 | else if(port >= 0x340 && port < 0x3a0) |
117 | return *(volatile unsigned short *)PORT2ADDR_USB(port); | 148 | return *(volatile unsigned short *)PORT2ADDR_USB(port); |
@@ -164,6 +195,11 @@ void _outb(unsigned char b, unsigned long port) | |||
164 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 195 | if (port >= LAN_IOSTART && port < LAN_IOEND) |
165 | _ne_outb(b, PORT2ADDR_NE(port)); | 196 | _ne_outb(b, PORT2ADDR_NE(port)); |
166 | else | 197 | else |
198 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
199 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
200 | *(volatile unsigned char *)__port2addr_ata(port) = b; | ||
201 | } else | ||
202 | #endif | ||
167 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | 203 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) |
168 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | 204 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { |
169 | pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); | 205 | pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); |
@@ -177,6 +213,11 @@ void _outw(unsigned short w, unsigned long port) | |||
177 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 213 | if (port >= LAN_IOSTART && port < LAN_IOEND) |
178 | _ne_outw(w, PORT2ADDR_NE(port)); | 214 | _ne_outw(w, PORT2ADDR_NE(port)); |
179 | else | 215 | else |
216 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
217 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
218 | *(volatile unsigned short *)__port2addr_ata(port) = w; | ||
219 | } else | ||
220 | #endif | ||
180 | #if defined(CONFIG_USB) | 221 | #if defined(CONFIG_USB) |
181 | if(port >= 0x340 && port < 0x3a0) | 222 | if(port >= 0x340 && port < 0x3a0) |
182 | *(volatile unsigned short *)PORT2ADDR_USB(port) = w; | 223 | *(volatile unsigned short *)PORT2ADDR_USB(port) = w; |
@@ -222,6 +263,14 @@ void _insb(unsigned int port, void *addr, unsigned long count) | |||
222 | { | 263 | { |
223 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 264 | if (port >= LAN_IOSTART && port < LAN_IOEND) |
224 | _ne_insb(PORT2ADDR_NE(port), addr, count); | 265 | _ne_insb(PORT2ADDR_NE(port), addr, count); |
266 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
267 | else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
268 | unsigned char *buf = addr; | ||
269 | unsigned char *portp = __port2addr_ata(port); | ||
270 | while (count--) | ||
271 | *buf++ = *(volatile unsigned char *)portp; | ||
272 | } | ||
273 | #endif | ||
225 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | 274 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) |
226 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | 275 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { |
227 | pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char), | 276 | pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char), |
@@ -254,6 +303,12 @@ void _insw(unsigned int port, void *addr, unsigned long count) | |||
254 | pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), | 303 | pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), |
255 | count, 1); | 304 | count, 1); |
256 | #endif | 305 | #endif |
306 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
307 | } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
308 | portp = __port2addr_ata(port); | ||
309 | while (count--) | ||
310 | *buf++ = *(volatile unsigned short *)portp; | ||
311 | #endif | ||
257 | } else { | 312 | } else { |
258 | portp = PORT2ADDR(port); | 313 | portp = PORT2ADDR(port); |
259 | while (count--) | 314 | while (count--) |
@@ -280,6 +335,12 @@ void _outsb(unsigned int port, const void *addr, unsigned long count) | |||
280 | portp = PORT2ADDR_NE(port); | 335 | portp = PORT2ADDR_NE(port); |
281 | while (count--) | 336 | while (count--) |
282 | _ne_outb(*buf++, portp); | 337 | _ne_outb(*buf++, portp); |
338 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
339 | } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
340 | portp = __port2addr_ata(port); | ||
341 | while (count--) | ||
342 | *(volatile unsigned char *)portp = *buf++; | ||
343 | #endif | ||
283 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | 344 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) |
284 | } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | 345 | } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { |
285 | pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), | 346 | pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), |
@@ -305,6 +366,12 @@ void _outsw(unsigned int port, const void *addr, unsigned long count) | |||
305 | portp = PORT2ADDR_NE(port); | 366 | portp = PORT2ADDR_NE(port); |
306 | while (count--) | 367 | while (count--) |
307 | *(volatile unsigned short *)portp = *buf++; | 368 | *(volatile unsigned short *)portp = *buf++; |
369 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
370 | } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
371 | portp = __port2addr_ata(port); | ||
372 | while (count--) | ||
373 | *(volatile unsigned short *)portp = *buf++; | ||
374 | #endif | ||
308 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | 375 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) |
309 | } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | 376 | } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { |
310 | pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), | 377 | pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), |
diff --git a/arch/m32r/kernel/setup_opsput.c b/arch/m32r/kernel/setup_opsput.c index 61d3b01cbe07..62d6b71de45f 100644 --- a/arch/m32r/kernel/setup_opsput.c +++ b/arch/m32r/kernel/setup_opsput.c | |||
@@ -218,13 +218,13 @@ static void shutdown_opsput_lanpld_irq(unsigned int irq) | |||
218 | 218 | ||
219 | static struct hw_interrupt_type opsput_lanpld_irq_type = | 219 | static struct hw_interrupt_type opsput_lanpld_irq_type = |
220 | { | 220 | { |
221 | "OPSPUT-PLD-LAN-IRQ", | 221 | .typename = "OPSPUT-PLD-LAN-IRQ", |
222 | startup_opsput_lanpld_irq, | 222 | .startup = startup_opsput_lanpld_irq, |
223 | shutdown_opsput_lanpld_irq, | 223 | .shutdown = shutdown_opsput_lanpld_irq, |
224 | enable_opsput_lanpld_irq, | 224 | .enable = enable_opsput_lanpld_irq, |
225 | disable_opsput_lanpld_irq, | 225 | .disable = disable_opsput_lanpld_irq, |
226 | mask_and_ack_opsput_lanpld, | 226 | .ack = mask_and_ack_opsput_lanpld, |
227 | end_opsput_lanpld_irq | 227 | .end = end_opsput_lanpld_irq |
228 | }; | 228 | }; |
229 | 229 | ||
230 | /* | 230 | /* |
@@ -374,7 +374,6 @@ void __init init_IRQ(void) | |||
374 | disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); | 374 | disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); |
375 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ | 375 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ |
376 | 376 | ||
377 | #if defined(CONFIG_M32R_CFC) | ||
378 | /* INT#1: CFC IREQ on PLD */ | 377 | /* INT#1: CFC IREQ on PLD */ |
379 | irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; | 378 | irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; |
380 | irq_desc[PLD_IRQ_CFIREQ].chip = &opsput_pld_irq_type; | 379 | irq_desc[PLD_IRQ_CFIREQ].chip = &opsput_pld_irq_type; |
@@ -398,8 +397,6 @@ void __init init_IRQ(void) | |||
398 | irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ | 397 | irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ |
399 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ | 398 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ |
400 | disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); | 399 | disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); |
401 | #endif /* CONFIG_M32R_CFC */ | ||
402 | |||
403 | 400 | ||
404 | /* | 401 | /* |
405 | * INT0# is used for LAN, DIO | 402 | * INT0# is used for LAN, DIO |
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 8d5f551b5754..9b9feb0f1610 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c | |||
@@ -173,7 +173,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, | |||
173 | goto good_area; | 173 | goto good_area; |
174 | if (!(vma->vm_flags & VM_GROWSDOWN)) | 174 | if (!(vma->vm_flags & VM_GROWSDOWN)) |
175 | goto bad_area; | 175 | goto bad_area; |
176 | #if 0 | 176 | |
177 | if (error_code & ACE_USERMODE) { | 177 | if (error_code & ACE_USERMODE) { |
178 | /* | 178 | /* |
179 | * accessing the stack below "spu" is always a bug. | 179 | * accessing the stack below "spu" is always a bug. |
@@ -184,7 +184,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, | |||
184 | if (address + 4 < regs->spu) | 184 | if (address + 4 < regs->spu) |
185 | goto bad_area; | 185 | goto bad_area; |
186 | } | 186 | } |
187 | #endif | 187 | |
188 | if (expand_stack(vma, address)) | 188 | if (expand_stack(vma, address)) |
189 | goto bad_area; | 189 | goto bad_area; |
190 | /* | 190 | /* |
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 7bc14461a6ac..70a577c89c7c 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -17,6 +17,14 @@ config RWSEM_GENERIC_SPINLOCK | |||
17 | config RWSEM_XCHGADD_ALGORITHM | 17 | config RWSEM_XCHGADD_ALGORITHM |
18 | bool | 18 | bool |
19 | 19 | ||
20 | config ARCH_HAS_ILOG2_U32 | ||
21 | bool | ||
22 | default n | ||
23 | |||
24 | config ARCH_HAS_ILOG2_U64 | ||
25 | bool | ||
26 | default n | ||
27 | |||
20 | config GENERIC_HWEIGHT | 28 | config GENERIC_HWEIGHT |
21 | bool | 29 | bool |
22 | default y | 30 | default y |
diff --git a/arch/m68k/atari/stdma.c b/arch/m68k/atari/stdma.c index d64b5804e980..d01deb46ebbc 100644 --- a/arch/m68k/atari/stdma.c +++ b/arch/m68k/atari/stdma.c | |||
@@ -174,7 +174,7 @@ int stdma_islocked(void) | |||
174 | void __init stdma_init(void) | 174 | void __init stdma_init(void) |
175 | { | 175 | { |
176 | stdma_isr = NULL; | 176 | stdma_isr = NULL; |
177 | request_irq(IRQ_MFP_FDC, stdma_int, IRQ_TYPE_SLOW, | 177 | request_irq(IRQ_MFP_FDC, stdma_int, IRQ_TYPE_SLOW | SA_SHIRQ, |
178 | "ST-DMA: floppy/ACSI/IDE/Falcon-SCSI", stdma_int); | 178 | "ST-DMA: floppy/ACSI/IDE/Falcon-SCSI", stdma_int); |
179 | } | 179 | } |
180 | 180 | ||
diff --git a/arch/m68k/kernel/sun3-head.S b/arch/m68k/kernel/sun3-head.S index bffd69a4a1ab..4b5f050204e8 100644 --- a/arch/m68k/kernel/sun3-head.S +++ b/arch/m68k/kernel/sun3-head.S | |||
@@ -67,16 +67,6 @@ ENTRY(_start) | |||
67 | 1: lea init_task,%curptr | get initial thread... | 67 | 1: lea init_task,%curptr | get initial thread... |
68 | lea init_thread_union+THREAD_SIZE,%sp | ...and its stack. | 68 | lea init_thread_union+THREAD_SIZE,%sp | ...and its stack. |
69 | 69 | ||
70 | /* copy bootinfo records from the loader to _end */ | ||
71 | lea _end, %a1 | ||
72 | lea BI_START, %a0 | ||
73 | /* number of longs to copy */ | ||
74 | movel %a0@, %d0 | ||
75 | 1: addl #4, %a0 | ||
76 | movel %a0@, %a1@ | ||
77 | addl #4, %a1 | ||
78 | dbf %d0, 1b | ||
79 | |||
80 | /* Point MSP at an invalid page to trap if it's used. --m */ | 70 | /* Point MSP at an invalid page to trap if it's used. --m */ |
81 | movl #(PAGESIZE),%d0 | 71 | movl #(PAGESIZE),%d0 |
82 | movc %d0,%msp | 72 | movc %d0,%msp |
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds index 2550b4ae2732..8c7eccbfc982 100644 --- a/arch/m68k/kernel/vmlinux-sun3.lds +++ b/arch/m68k/kernel/vmlinux-sun3.lds | |||
@@ -8,7 +8,7 @@ ENTRY(_start) | |||
8 | jiffies = jiffies_64 + 4; | 8 | jiffies = jiffies_64 + 4; |
9 | SECTIONS | 9 | SECTIONS |
10 | { | 10 | { |
11 | . = 0xE004000; | 11 | . = 0xE002000; |
12 | _text = .; /* Text and read-only data */ | 12 | _text = .; /* Text and read-only data */ |
13 | .text : { | 13 | .text : { |
14 | *(.head) | 14 | *(.head) |
diff --git a/arch/m68k/mm/memory.c b/arch/m68k/mm/memory.c index 0f88812822b1..13c0b4ad01eb 100644 --- a/arch/m68k/mm/memory.c +++ b/arch/m68k/mm/memory.c | |||
@@ -299,7 +299,7 @@ void cache_clear (unsigned long paddr, int len) | |||
299 | mach_l2_flush(0); | 299 | mach_l2_flush(0); |
300 | #endif | 300 | #endif |
301 | } | 301 | } |
302 | EXPORT_SYMBOL(cache_clear); /* probably can be unexported */ | 302 | EXPORT_SYMBOL(cache_clear); |
303 | 303 | ||
304 | 304 | ||
305 | /* | 305 | /* |
@@ -352,7 +352,7 @@ void cache_push (unsigned long paddr, int len) | |||
352 | mach_l2_flush(1); | 352 | mach_l2_flush(1); |
353 | #endif | 353 | #endif |
354 | } | 354 | } |
355 | EXPORT_SYMBOL(cache_push); /* probably can be unexported */ | 355 | EXPORT_SYMBOL(cache_push); |
356 | 356 | ||
357 | #ifndef CONFIG_SINGLE_MEMORY_CHUNK | 357 | #ifndef CONFIG_SINGLE_MEMORY_CHUNK |
358 | int mm_end_of_chunk (unsigned long addr, int len) | 358 | int mm_end_of_chunk (unsigned long addr, int len) |
diff --git a/arch/m68k/mm/sun3mmu.c b/arch/m68k/mm/sun3mmu.c index ac6640ade0b1..6a6513aa1ce8 100644 --- a/arch/m68k/mm/sun3mmu.c +++ b/arch/m68k/mm/sun3mmu.c | |||
@@ -49,7 +49,6 @@ void __init paging_init(void) | |||
49 | unsigned long zones_size[MAX_NR_ZONES] = { 0, }; | 49 | unsigned long zones_size[MAX_NR_ZONES] = { 0, }; |
50 | unsigned long size; | 50 | unsigned long size; |
51 | 51 | ||
52 | |||
53 | #ifdef TEST_VERIFY_AREA | 52 | #ifdef TEST_VERIFY_AREA |
54 | wp_works_ok = 0; | 53 | wp_works_ok = 0; |
55 | #endif | 54 | #endif |
@@ -94,7 +93,11 @@ void __init paging_init(void) | |||
94 | /* memory sizing is a hack stolen from motorola.c.. hope it works for us */ | 93 | /* memory sizing is a hack stolen from motorola.c.. hope it works for us */ |
95 | zones_size[ZONE_DMA] = ((unsigned long)high_memory - PAGE_OFFSET) >> PAGE_SHIFT; | 94 | zones_size[ZONE_DMA] = ((unsigned long)high_memory - PAGE_OFFSET) >> PAGE_SHIFT; |
96 | 95 | ||
97 | free_area_init(zones_size); | 96 | /* I really wish I knew why the following change made things better... -- Sam */ |
97 | /* free_area_init(zones_size); */ | ||
98 | free_area_init_node(0, NODE_DATA(0), zones_size, | ||
99 | (__pa(PAGE_OFFSET) >> PAGE_SHIFT) + 1, NULL); | ||
100 | |||
98 | 101 | ||
99 | } | 102 | } |
100 | 103 | ||
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig index aa70dde54228..25993c2a8fbb 100644 --- a/arch/m68knommu/Kconfig +++ b/arch/m68knommu/Kconfig | |||
@@ -25,6 +25,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
25 | bool | 25 | bool |
26 | default n | 26 | default n |
27 | 27 | ||
28 | config ARCH_HAS_ILOG2_U32 | ||
29 | bool | ||
30 | default n | ||
31 | |||
32 | config ARCH_HAS_ILOG2_U64 | ||
33 | bool | ||
34 | default n | ||
35 | |||
28 | config GENERIC_FIND_NEXT_BIT | 36 | config GENERIC_FIND_NEXT_BIT |
29 | bool | 37 | bool |
30 | default y | 38 | default y |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index d8af858fe3f5..fd2ff0698a85 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -165,6 +165,7 @@ config MIPS_COBALT | |||
165 | select SYS_SUPPORTS_32BIT_KERNEL | 165 | select SYS_SUPPORTS_32BIT_KERNEL |
166 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | 166 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL |
167 | select SYS_SUPPORTS_LITTLE_ENDIAN | 167 | select SYS_SUPPORTS_LITTLE_ENDIAN |
168 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
168 | 169 | ||
169 | config MACH_DECSTATION | 170 | config MACH_DECSTATION |
170 | bool "DECstations" | 171 | bool "DECstations" |
@@ -225,6 +226,7 @@ config MACH_JAZZ | |||
225 | select SYS_SUPPORTS_32BIT_KERNEL | 226 | select SYS_SUPPORTS_32BIT_KERNEL |
226 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | 227 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL |
227 | select SYS_SUPPORTS_100HZ | 228 | select SYS_SUPPORTS_100HZ |
229 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
228 | help | 230 | help |
229 | This a family of machines based on the MIPS R4030 chipset which was | 231 | This a family of machines based on the MIPS R4030 chipset which was |
230 | used by several vendors to build RISC/os and Windows NT workstations. | 232 | used by several vendors to build RISC/os and Windows NT workstations. |
@@ -459,6 +461,11 @@ config PNX8550_JBS | |||
459 | select PNX8550 | 461 | select PNX8550 |
460 | select SYS_SUPPORTS_LITTLE_ENDIAN | 462 | select SYS_SUPPORTS_LITTLE_ENDIAN |
461 | 463 | ||
464 | config PNX8550_STB810 | ||
465 | bool "Support for Philips PNX8550 based STB810 board" | ||
466 | select PNX8550 | ||
467 | select SYS_SUPPORTS_LITTLE_ENDIAN | ||
468 | |||
462 | config DDB5477 | 469 | config DDB5477 |
463 | bool "NEC DDB Vrc-5477" | 470 | bool "NEC DDB Vrc-5477" |
464 | select DDB5XXX_COMMON | 471 | select DDB5XXX_COMMON |
@@ -482,6 +489,7 @@ config MACH_VR41XX | |||
482 | select SYS_HAS_CPU_VR41XX | 489 | select SYS_HAS_CPU_VR41XX |
483 | select SYS_SUPPORTS_32BIT_KERNEL | 490 | select SYS_SUPPORTS_32BIT_KERNEL |
484 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | 491 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL |
492 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
485 | 493 | ||
486 | config PMC_YOSEMITE | 494 | config PMC_YOSEMITE |
487 | bool "PMC-Sierra Yosemite eval board" | 495 | bool "PMC-Sierra Yosemite eval board" |
@@ -515,6 +523,7 @@ config QEMU | |||
515 | select SYS_SUPPORTS_BIG_ENDIAN | 523 | select SYS_SUPPORTS_BIG_ENDIAN |
516 | select SYS_SUPPORTS_LITTLE_ENDIAN | 524 | select SYS_SUPPORTS_LITTLE_ENDIAN |
517 | select ARCH_SPARSEMEM_ENABLE | 525 | select ARCH_SPARSEMEM_ENABLE |
526 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
518 | help | 527 | help |
519 | Qemu is a software emulator which among other architectures also | 528 | Qemu is a software emulator which among other architectures also |
520 | can simulate a MIPS32 4Kc system. This patch adds support for the | 529 | can simulate a MIPS32 4Kc system. This patch adds support for the |
@@ -701,8 +710,8 @@ config SIBYTE_CRHONE | |||
701 | select SYS_SUPPORTS_HIGHMEM | 710 | select SYS_SUPPORTS_HIGHMEM |
702 | select SYS_SUPPORTS_LITTLE_ENDIAN | 711 | select SYS_SUPPORTS_LITTLE_ENDIAN |
703 | 712 | ||
704 | config SNI_RM200_PCI | 713 | config SNI_RM |
705 | bool "SNI RM200 PCI" | 714 | bool "SNI RM200/300/400" |
706 | select ARC if CPU_LITTLE_ENDIAN | 715 | select ARC if CPU_LITTLE_ENDIAN |
707 | select ARC32 if CPU_LITTLE_ENDIAN | 716 | select ARC32 if CPU_LITTLE_ENDIAN |
708 | select ARCH_MAY_HAVE_PC_FDC | 717 | select ARCH_MAY_HAVE_PC_FDC |
@@ -725,8 +734,8 @@ config SNI_RM200_PCI | |||
725 | select SYS_SUPPORTS_HIGHMEM | 734 | select SYS_SUPPORTS_HIGHMEM |
726 | select SYS_SUPPORTS_LITTLE_ENDIAN | 735 | select SYS_SUPPORTS_LITTLE_ENDIAN |
727 | help | 736 | help |
728 | The SNI RM200 PCI was a MIPS-based platform manufactured by Siemens | 737 | The SNI RM200/300/400 are MIPS-based machines manufactured by |
729 | Nixdorf Informationssysteme (SNI), parent company of Pyramid | 738 | Siemens Nixdorf Informationssysteme (SNI), parent company of Pyramid |
730 | Technology and now in turn merged with Fujitsu. Say Y here to | 739 | Technology and now in turn merged with Fujitsu. Say Y here to |
731 | support this machine type. | 740 | support this machine type. |
732 | 741 | ||
@@ -754,6 +763,7 @@ config TOSHIBA_RBTX4927 | |||
754 | select SYS_SUPPORTS_64BIT_KERNEL | 763 | select SYS_SUPPORTS_64BIT_KERNEL |
755 | select SYS_SUPPORTS_BIG_ENDIAN | 764 | select SYS_SUPPORTS_BIG_ENDIAN |
756 | select TOSHIBA_BOARDS | 765 | select TOSHIBA_BOARDS |
766 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
757 | help | 767 | help |
758 | This Toshiba board is based on the TX4927 processor. Say Y here to | 768 | This Toshiba board is based on the TX4927 processor. Say Y here to |
759 | support this machine type | 769 | support this machine type |
@@ -773,6 +783,7 @@ config TOSHIBA_RBTX4938 | |||
773 | select SYS_SUPPORTS_LITTLE_ENDIAN | 783 | select SYS_SUPPORTS_LITTLE_ENDIAN |
774 | select SYS_SUPPORTS_BIG_ENDIAN | 784 | select SYS_SUPPORTS_BIG_ENDIAN |
775 | select TOSHIBA_BOARDS | 785 | select TOSHIBA_BOARDS |
786 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
776 | help | 787 | help |
777 | This Toshiba board is based on the TX4938 processor. Say Y here to | 788 | This Toshiba board is based on the TX4938 processor. Say Y here to |
778 | support this machine type | 789 | support this machine type |
@@ -819,6 +830,14 @@ config RWSEM_GENERIC_SPINLOCK | |||
819 | config RWSEM_XCHGADD_ALGORITHM | 830 | config RWSEM_XCHGADD_ALGORITHM |
820 | bool | 831 | bool |
821 | 832 | ||
833 | config ARCH_HAS_ILOG2_U32 | ||
834 | bool | ||
835 | default n | ||
836 | |||
837 | config ARCH_HAS_ILOG2_U64 | ||
838 | bool | ||
839 | default n | ||
840 | |||
822 | config GENERIC_FIND_NEXT_BIT | 841 | config GENERIC_FIND_NEXT_BIT |
823 | bool | 842 | bool |
824 | default y | 843 | default y |
@@ -1062,16 +1081,16 @@ config HAVE_STD_PC_SERIAL_PORT | |||
1062 | 1081 | ||
1063 | config ARC_CONSOLE | 1082 | config ARC_CONSOLE |
1064 | bool "ARC console support" | 1083 | bool "ARC console support" |
1065 | depends on SGI_IP22 || SNI_RM200_PCI | 1084 | depends on SGI_IP22 || SNI_RM |
1066 | 1085 | ||
1067 | config ARC_MEMORY | 1086 | config ARC_MEMORY |
1068 | bool | 1087 | bool |
1069 | depends on MACH_JAZZ || SNI_RM200_PCI || SGI_IP32 | 1088 | depends on MACH_JAZZ || SNI_RM || SGI_IP32 |
1070 | default y | 1089 | default y |
1071 | 1090 | ||
1072 | config ARC_PROMLIB | 1091 | config ARC_PROMLIB |
1073 | bool | 1092 | bool |
1074 | depends on MACH_JAZZ || SNI_RM200_PCI || SGI_IP22 || SGI_IP32 | 1093 | depends on MACH_JAZZ || SNI_RM || SGI_IP22 || SGI_IP32 |
1075 | default y | 1094 | default y |
1076 | 1095 | ||
1077 | config ARC64 | 1096 | config ARC64 |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 641aa30b3638..d1b026a0337d 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -463,6 +463,11 @@ libs-$(CONFIG_PNX8550_JBS) += arch/mips/philips/pnx8550/jbs/ | |||
463 | #cflags-$(CONFIG_PNX8550_JBS) += -Iinclude/asm-mips/mach-pnx8550 | 463 | #cflags-$(CONFIG_PNX8550_JBS) += -Iinclude/asm-mips/mach-pnx8550 |
464 | load-$(CONFIG_PNX8550_JBS) += 0xffffffff80060000 | 464 | load-$(CONFIG_PNX8550_JBS) += 0xffffffff80060000 |
465 | 465 | ||
466 | # Philips PNX8550 STB810 board | ||
467 | # | ||
468 | libs-$(CONFIG_PNX8550_STB810) += arch/mips/philips/pnx8550/stb810/ | ||
469 | load-$(CONFIG_PNX8550_STB810) += 0xffffffff80060000 | ||
470 | |||
466 | # NEC EMMA2RH boards | 471 | # NEC EMMA2RH boards |
467 | # | 472 | # |
468 | core-$(CONFIG_EMMA2RH) += arch/mips/emma2rh/common/ | 473 | core-$(CONFIG_EMMA2RH) += arch/mips/emma2rh/common/ |
@@ -569,11 +574,11 @@ libs-$(CONFIG_SIBYTE_BIGSUR) += arch/mips/sibyte/swarm/ | |||
569 | load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000 | 574 | load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000 |
570 | 575 | ||
571 | # | 576 | # |
572 | # SNI RM200 PCI | 577 | # SNI RM |
573 | # | 578 | # |
574 | core-$(CONFIG_SNI_RM200_PCI) += arch/mips/sni/ | 579 | core-$(CONFIG_SNI_RM) += arch/mips/sni/ |
575 | cflags-$(CONFIG_SNI_RM200_PCI) += -Iinclude/asm-mips/mach-rm200 | 580 | cflags-$(CONFIG_SNI_RM) += -Iinclude/asm-mips/mach-rm |
576 | load-$(CONFIG_SNI_RM200_PCI) += 0xffffffff80600000 | 581 | load-$(CONFIG_SNI_RM) += 0xffffffff80600000 |
577 | 582 | ||
578 | # | 583 | # |
579 | # Toshiba JMR-TX3927 board | 584 | # Toshiba JMR-TX3927 board |
@@ -695,7 +700,7 @@ ifdef CONFIG_QEMU | |||
695 | all: vmlinux.bin | 700 | all: vmlinux.bin |
696 | endif | 701 | endif |
697 | 702 | ||
698 | ifdef CONFIG_SNI_RM200_PCI | 703 | ifdef CONFIG_SNI_RM |
699 | all: vmlinux.ecoff | 704 | all: vmlinux.ecoff |
700 | endif | 705 | endif |
701 | 706 | ||
diff --git a/arch/mips/configs/atlas_defconfig b/arch/mips/configs/atlas_defconfig index 35931bedc3df..ac1891687520 100644 --- a/arch/mips/configs/atlas_defconfig +++ b/arch/mips/configs/atlas_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_ATLAS=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig index ba3bf733d27d..9554257c6f3a 100644 --- a/arch/mips/configs/bigsur_defconfig +++ b/arch/mips/configs/bigsur_defconfig | |||
@@ -57,7 +57,7 @@ CONFIG_SIBYTE_BIGSUR=y | |||
57 | # CONFIG_SIBYTE_LITTLESUR is not set | 57 | # CONFIG_SIBYTE_LITTLESUR is not set |
58 | # CONFIG_SIBYTE_CRHINE is not set | 58 | # CONFIG_SIBYTE_CRHINE is not set |
59 | # CONFIG_SIBYTE_CRHONE is not set | 59 | # CONFIG_SIBYTE_CRHONE is not set |
60 | # CONFIG_SNI_RM200_PCI is not set | 60 | # CONFIG_SNI_RM is not set |
61 | # CONFIG_TOSHIBA_JMR3927 is not set | 61 | # CONFIG_TOSHIBA_JMR3927 is not set |
62 | # CONFIG_TOSHIBA_RBTX4927 is not set | 62 | # CONFIG_TOSHIBA_RBTX4927 is not set |
63 | # CONFIG_TOSHIBA_RBTX4938 is not set | 63 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig index e5358121d2da..49590d443712 100644 --- a/arch/mips/configs/capcella_defconfig +++ b/arch/mips/configs/capcella_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_VR41XX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig index adf1e8c98c65..0607fc239087 100644 --- a/arch/mips/configs/cobalt_defconfig +++ b/arch/mips/configs/cobalt_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_COBALT=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig index 4fd29ffdfb8d..1a57b3375483 100644 --- a/arch/mips/configs/db1000_defconfig +++ b/arch/mips/configs/db1000_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_DB1000=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/db1100_defconfig b/arch/mips/configs/db1100_defconfig index 025b960ba990..0055ec41f207 100644 --- a/arch/mips/configs/db1100_defconfig +++ b/arch/mips/configs/db1100_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_DB1100=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/db1200_defconfig b/arch/mips/configs/db1200_defconfig index 80c9dd98f897..c41823b81be0 100644 --- a/arch/mips/configs/db1200_defconfig +++ b/arch/mips/configs/db1200_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_DB1200=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig index 6caa90b0e176..7d6d92187880 100644 --- a/arch/mips/configs/db1500_defconfig +++ b/arch/mips/configs/db1500_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_DB1500=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/db1550_defconfig b/arch/mips/configs/db1550_defconfig index c6cae86c6ab7..c681c91763aa 100644 --- a/arch/mips/configs/db1550_defconfig +++ b/arch/mips/configs/db1550_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_DB1550=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ddb5477_defconfig b/arch/mips/configs/ddb5477_defconfig index 72f24001c99e..dd4bb0080211 100644 --- a/arch/mips/configs/ddb5477_defconfig +++ b/arch/mips/configs/ddb5477_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_DDB5477=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/decstation_defconfig index fe1387eb83c9..8a31ce4be12c 100644 --- a/arch/mips/configs/decstation_defconfig +++ b/arch/mips/configs/decstation_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_DECSTATION=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig index 6133c28beb8c..6fa4f914f6e4 100644 --- a/arch/mips/configs/e55_defconfig +++ b/arch/mips/configs/e55_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_VR41XX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/emma2rh_defconfig b/arch/mips/configs/emma2rh_defconfig index a484b7d396fc..4c9d0405a5df 100644 --- a/arch/mips/configs/emma2rh_defconfig +++ b/arch/mips/configs/emma2rh_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MARKEINS=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ev64120_defconfig b/arch/mips/configs/ev64120_defconfig index 21bfcdebf8f5..d5b49735683b 100644 --- a/arch/mips/configs/ev64120_defconfig +++ b/arch/mips/configs/ev64120_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_EV64120=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/excite_defconfig b/arch/mips/configs/excite_defconfig index 1a5b06cfb4d6..697140c6562f 100644 --- a/arch/mips/configs/excite_defconfig +++ b/arch/mips/configs/excite_defconfig | |||
@@ -60,7 +60,7 @@ CONFIG_BASLER_EXCITE=y | |||
60 | # CONFIG_SIBYTE_LITTLESUR is not set | 60 | # CONFIG_SIBYTE_LITTLESUR is not set |
61 | # CONFIG_SIBYTE_CRHINE is not set | 61 | # CONFIG_SIBYTE_CRHINE is not set |
62 | # CONFIG_SIBYTE_CRHONE is not set | 62 | # CONFIG_SIBYTE_CRHONE is not set |
63 | # CONFIG_SNI_RM200_PCI is not set | 63 | # CONFIG_SNI_RM is not set |
64 | # CONFIG_TOSHIBA_JMR3927 is not set | 64 | # CONFIG_TOSHIBA_JMR3927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4927 is not set | 65 | # CONFIG_TOSHIBA_RBTX4927 is not set |
66 | # CONFIG_TOSHIBA_RBTX4938 is not set | 66 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig index 21d53e0c9ee8..f9812d1e4579 100644 --- a/arch/mips/configs/ip22_defconfig +++ b/arch/mips/configs/ip22_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_SGI_IP22=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig index e3e94c7e5ee1..96090f28373b 100644 --- a/arch/mips/configs/ip27_defconfig +++ b/arch/mips/configs/ip27_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_SGI_IP27=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig index b4ab2bea9723..61e069a0f1aa 100644 --- a/arch/mips/configs/ip32_defconfig +++ b/arch/mips/configs/ip32_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_SGI_IP32=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/jaguar-atx_defconfig b/arch/mips/configs/jaguar-atx_defconfig index 9d4d17ace123..88966666f4c6 100644 --- a/arch/mips/configs/jaguar-atx_defconfig +++ b/arch/mips/configs/jaguar-atx_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MOMENCO_JAGUAR_ATX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig index 382083ebea0a..835764d834f7 100644 --- a/arch/mips/configs/jazz_defconfig +++ b/arch/mips/configs/jazz_defconfig | |||
@@ -57,7 +57,7 @@ CONFIG_MACH_JAZZ=y | |||
57 | # CONFIG_SIBYTE_LITTLESUR is not set | 57 | # CONFIG_SIBYTE_LITTLESUR is not set |
58 | # CONFIG_SIBYTE_CRHINE is not set | 58 | # CONFIG_SIBYTE_CRHINE is not set |
59 | # CONFIG_SIBYTE_CRHONE is not set | 59 | # CONFIG_SIBYTE_CRHONE is not set |
60 | # CONFIG_SNI_RM200_PCI is not set | 60 | # CONFIG_SNI_RM is not set |
61 | # CONFIG_TOSHIBA_JMR3927 is not set | 61 | # CONFIG_TOSHIBA_JMR3927 is not set |
62 | # CONFIG_TOSHIBA_RBTX4927 is not set | 62 | # CONFIG_TOSHIBA_RBTX4927 is not set |
63 | # CONFIG_TOSHIBA_RBTX4938 is not set | 63 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig index d03746667a96..50fd9557e646 100644 --- a/arch/mips/configs/jmr3927_defconfig +++ b/arch/mips/configs/jmr3927_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | CONFIG_TOSHIBA_JMR3927=y | 63 | CONFIG_TOSHIBA_JMR3927=y |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/lasat200_defconfig b/arch/mips/configs/lasat200_defconfig index 1db8249b4c0f..05f539f84f58 100644 --- a/arch/mips/configs/lasat200_defconfig +++ b/arch/mips/configs/lasat200_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_LASAT=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig index 101e80347dce..96e941084c04 100644 --- a/arch/mips/configs/malta_defconfig +++ b/arch/mips/configs/malta_defconfig | |||
@@ -57,7 +57,7 @@ CONFIG_MIPS_MALTA=y | |||
57 | # CONFIG_SIBYTE_LITTLESUR is not set | 57 | # CONFIG_SIBYTE_LITTLESUR is not set |
58 | # CONFIG_SIBYTE_CRHINE is not set | 58 | # CONFIG_SIBYTE_CRHINE is not set |
59 | # CONFIG_SIBYTE_CRHONE is not set | 59 | # CONFIG_SIBYTE_CRHONE is not set |
60 | # CONFIG_SNI_RM200_PCI is not set | 60 | # CONFIG_SNI_RM is not set |
61 | # CONFIG_TOSHIBA_JMR3927 is not set | 61 | # CONFIG_TOSHIBA_JMR3927 is not set |
62 | # CONFIG_TOSHIBA_RBTX4927 is not set | 62 | # CONFIG_TOSHIBA_RBTX4927 is not set |
63 | # CONFIG_TOSHIBA_RBTX4938 is not set | 63 | # CONFIG_TOSHIBA_RBTX4938 is not set |
@@ -644,7 +644,85 @@ CONFIG_CONNECTOR=m | |||
644 | # | 644 | # |
645 | # Memory Technology Devices (MTD) | 645 | # Memory Technology Devices (MTD) |
646 | # | 646 | # |
647 | # CONFIG_MTD is not set | 647 | CONFIG_MTD=y |
648 | # CONFIG_MTD_DEBUG is not set | ||
649 | # CONFIG_MTD_CONCAT is not set | ||
650 | CONFIG_MTD_PARTITIONS=y | ||
651 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
652 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
653 | |||
654 | # | ||
655 | # User Modules And Translation Layers | ||
656 | # | ||
657 | CONFIG_MTD_CHAR=y | ||
658 | CONFIG_MTD_BLOCK=y | ||
659 | # CONFIG_FTL is not set | ||
660 | # CONFIG_NFTL is not set | ||
661 | # CONFIG_INFTL is not set | ||
662 | # CONFIG_RFD_FTL is not set | ||
663 | # CONFIG_SSFDC is not set | ||
664 | |||
665 | # | ||
666 | # RAM/ROM/Flash chip drivers | ||
667 | # | ||
668 | CONFIG_MTD_CFI=y | ||
669 | # CONFIG_MTD_JEDECPROBE is not set | ||
670 | CONFIG_MTD_GEN_PROBE=y | ||
671 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
672 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
673 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
674 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
675 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
676 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
677 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
678 | CONFIG_MTD_CFI_I1=y | ||
679 | CONFIG_MTD_CFI_I2=y | ||
680 | # CONFIG_MTD_CFI_I4 is not set | ||
681 | # CONFIG_MTD_CFI_I8 is not set | ||
682 | CONFIG_MTD_CFI_INTELEXT=y | ||
683 | CONFIG_MTD_CFI_AMDSTD=y | ||
684 | CONFIG_MTD_CFI_STAA=y | ||
685 | CONFIG_MTD_CFI_UTIL=y | ||
686 | # CONFIG_MTD_RAM is not set | ||
687 | # CONFIG_MTD_ROM is not set | ||
688 | # CONFIG_MTD_ABSENT is not set | ||
689 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
690 | |||
691 | # | ||
692 | # Mapping drivers for chip access | ||
693 | # | ||
694 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
695 | CONFIG_MTD_PHYSMAP=y | ||
696 | CONFIG_MTD_PHYSMAP_START=0x0 | ||
697 | CONFIG_MTD_PHYSMAP_LEN=0x0 | ||
698 | CONFIG_MTD_PHYSMAP_BANKWIDTH=0 | ||
699 | # CONFIG_MTD_PLATRAM is not set | ||
700 | |||
701 | # | ||
702 | # Self-contained MTD device drivers | ||
703 | # | ||
704 | # CONFIG_MTD_PMC551 is not set | ||
705 | # CONFIG_MTD_SLRAM is not set | ||
706 | # CONFIG_MTD_PHRAM is not set | ||
707 | # CONFIG_MTD_MTDRAM is not set | ||
708 | # CONFIG_MTD_BLOCK2MTD is not set | ||
709 | |||
710 | # | ||
711 | # Disk-On-Chip Device Drivers | ||
712 | # | ||
713 | # CONFIG_MTD_DOC2000 is not set | ||
714 | # CONFIG_MTD_DOC2001 is not set | ||
715 | # CONFIG_MTD_DOC2001PLUS is not set | ||
716 | |||
717 | # | ||
718 | # NAND Flash Device Drivers | ||
719 | # | ||
720 | # CONFIG_MTD_NAND is not set | ||
721 | |||
722 | # | ||
723 | # OneNAND Flash Device Drivers | ||
724 | # | ||
725 | # CONFIG_MTD_ONENAND is not set | ||
648 | 726 | ||
649 | # | 727 | # |
650 | # Parallel port support | 728 | # Parallel port support |
diff --git a/arch/mips/configs/mipssim_defconfig b/arch/mips/configs/mipssim_defconfig index a3cbd23bf217..03efcfd0503b 100644 --- a/arch/mips/configs/mipssim_defconfig +++ b/arch/mips/configs/mipssim_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_SIM=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig index 6570b47426ce..e4221aafbc4c 100644 --- a/arch/mips/configs/mpc30x_defconfig +++ b/arch/mips/configs/mpc30x_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_VR41XX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ocelot_3_defconfig b/arch/mips/configs/ocelot_3_defconfig index 440d65f93a94..32b1afdd1c20 100644 --- a/arch/mips/configs/ocelot_3_defconfig +++ b/arch/mips/configs/ocelot_3_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MOMENCO_OCELOT_3=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ocelot_c_defconfig b/arch/mips/configs/ocelot_c_defconfig index c2c7ae77da3e..ebe75c1c71af 100644 --- a/arch/mips/configs/ocelot_c_defconfig +++ b/arch/mips/configs/ocelot_c_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MOMENCO_OCELOT_C=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ocelot_defconfig b/arch/mips/configs/ocelot_defconfig index 67efe270e0cc..5a9603c12902 100644 --- a/arch/mips/configs/ocelot_defconfig +++ b/arch/mips/configs/ocelot_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MOMENCO_OCELOT=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ocelot_g_defconfig b/arch/mips/configs/ocelot_g_defconfig index a10f34de5f7e..46a942c253cf 100644 --- a/arch/mips/configs/ocelot_g_defconfig +++ b/arch/mips/configs/ocelot_g_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MOMENCO_OCELOT_G=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig index 9e672f63a0aa..7d3c688181d5 100644 --- a/arch/mips/configs/pb1100_defconfig +++ b/arch/mips/configs/pb1100_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_PB1100=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig index d0c0f4af1bff..a77805af0819 100644 --- a/arch/mips/configs/pb1500_defconfig +++ b/arch/mips/configs/pb1500_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_PB1500=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig index 3db7427d1b55..8318d74d6adb 100644 --- a/arch/mips/configs/pb1550_defconfig +++ b/arch/mips/configs/pb1550_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_PB1550=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/pnx8550-jbs_defconfig b/arch/mips/configs/pnx8550-jbs_defconfig index 280a8001eacf..fcb8fea3052c 100644 --- a/arch/mips/configs/pnx8550-jbs_defconfig +++ b/arch/mips/configs/pnx8550-jbs_defconfig | |||
@@ -57,7 +57,7 @@ CONFIG_PNX8550_JBS=y | |||
57 | # CONFIG_SIBYTE_LITTLESUR is not set | 57 | # CONFIG_SIBYTE_LITTLESUR is not set |
58 | # CONFIG_SIBYTE_CRHINE is not set | 58 | # CONFIG_SIBYTE_CRHINE is not set |
59 | # CONFIG_SIBYTE_CRHONE is not set | 59 | # CONFIG_SIBYTE_CRHONE is not set |
60 | # CONFIG_SNI_RM200_PCI is not set | 60 | # CONFIG_SNI_RM is not set |
61 | # CONFIG_TOSHIBA_JMR3927 is not set | 61 | # CONFIG_TOSHIBA_JMR3927 is not set |
62 | # CONFIG_TOSHIBA_RBTX4927 is not set | 62 | # CONFIG_TOSHIBA_RBTX4927 is not set |
63 | # CONFIG_TOSHIBA_RBTX4938 is not set | 63 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/pnx8550-stb810_defconfig b/arch/mips/configs/pnx8550-stb810_defconfig new file mode 100644 index 000000000000..f38a2c123037 --- /dev/null +++ b/arch/mips/configs/pnx8550-stb810_defconfig | |||
@@ -0,0 +1,1229 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.19 | ||
4 | # Thu Dec 7 16:35:12 2006 | ||
5 | # | ||
6 | CONFIG_MIPS=y | ||
7 | |||
8 | # | ||
9 | # Machine selection | ||
10 | # | ||
11 | # CONFIG_MIPS_MTX1 is not set | ||
12 | # CONFIG_MIPS_BOSPORUS is not set | ||
13 | # CONFIG_MIPS_PB1000 is not set | ||
14 | # CONFIG_MIPS_PB1100 is not set | ||
15 | # CONFIG_MIPS_PB1500 is not set | ||
16 | # CONFIG_MIPS_PB1550 is not set | ||
17 | # CONFIG_MIPS_PB1200 is not set | ||
18 | # CONFIG_MIPS_DB1000 is not set | ||
19 | # CONFIG_MIPS_DB1100 is not set | ||
20 | # CONFIG_MIPS_DB1500 is not set | ||
21 | # CONFIG_MIPS_DB1550 is not set | ||
22 | # CONFIG_MIPS_DB1200 is not set | ||
23 | # CONFIG_MIPS_MIRAGE is not set | ||
24 | # CONFIG_BASLER_EXCITE is not set | ||
25 | # CONFIG_MIPS_COBALT is not set | ||
26 | # CONFIG_MACH_DECSTATION is not set | ||
27 | # CONFIG_MIPS_EV64120 is not set | ||
28 | # CONFIG_MACH_JAZZ is not set | ||
29 | # CONFIG_LASAT is not set | ||
30 | # CONFIG_MIPS_ATLAS is not set | ||
31 | # CONFIG_MIPS_MALTA is not set | ||
32 | # CONFIG_MIPS_SEAD is not set | ||
33 | # CONFIG_WR_PPMC is not set | ||
34 | # CONFIG_MIPS_SIM is not set | ||
35 | # CONFIG_MOMENCO_JAGUAR_ATX is not set | ||
36 | # CONFIG_MOMENCO_OCELOT is not set | ||
37 | # CONFIG_MOMENCO_OCELOT_3 is not set | ||
38 | # CONFIG_MOMENCO_OCELOT_C is not set | ||
39 | # CONFIG_MOMENCO_OCELOT_G is not set | ||
40 | # CONFIG_MIPS_XXS1500 is not set | ||
41 | # CONFIG_PNX8550_V2PCI is not set | ||
42 | # CONFIG_PNX8550_JBS is not set | ||
43 | CONFIG_PNX8550_STB810=y | ||
44 | # CONFIG_DDB5477 is not set | ||
45 | # CONFIG_MACH_VR41XX is not set | ||
46 | # CONFIG_PMC_YOSEMITE is not set | ||
47 | # CONFIG_QEMU is not set | ||
48 | # CONFIG_MARKEINS is not set | ||
49 | # CONFIG_SGI_IP22 is not set | ||
50 | # CONFIG_SGI_IP27 is not set | ||
51 | # CONFIG_SGI_IP32 is not set | ||
52 | # CONFIG_SIBYTE_BIGSUR is not set | ||
53 | # CONFIG_SIBYTE_SWARM is not set | ||
54 | # CONFIG_SIBYTE_SENTOSA is not set | ||
55 | # CONFIG_SIBYTE_RHONE is not set | ||
56 | # CONFIG_SIBYTE_CARMEL is not set | ||
57 | # CONFIG_SIBYTE_PTSWARM is not set | ||
58 | # CONFIG_SIBYTE_LITTLESUR is not set | ||
59 | # CONFIG_SIBYTE_CRHINE is not set | ||
60 | # CONFIG_SIBYTE_CRHONE is not set | ||
61 | # CONFIG_SNI_RM200_PCI is not set | ||
62 | # CONFIG_TOSHIBA_JMR3927 is not set | ||
63 | # CONFIG_TOSHIBA_RBTX4927 is not set | ||
64 | # CONFIG_TOSHIBA_RBTX4938 is not set | ||
65 | # CONFIG_KEXEC is not set | ||
66 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
67 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
68 | CONFIG_GENERIC_HWEIGHT=y | ||
69 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
70 | CONFIG_GENERIC_TIME=y | ||
71 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
72 | CONFIG_DMA_NONCOHERENT=y | ||
73 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
74 | # CONFIG_CPU_BIG_ENDIAN is not set | ||
75 | CONFIG_CPU_LITTLE_ENDIAN=y | ||
76 | CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y | ||
77 | CONFIG_PNX8550=y | ||
78 | CONFIG_SOC_PNX8550=y | ||
79 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | ||
80 | |||
81 | # | ||
82 | # CPU selection | ||
83 | # | ||
84 | CONFIG_CPU_MIPS32_R1=y | ||
85 | # CONFIG_CPU_MIPS32_R2 is not set | ||
86 | # CONFIG_CPU_MIPS64_R1 is not set | ||
87 | # CONFIG_CPU_MIPS64_R2 is not set | ||
88 | # CONFIG_CPU_R3000 is not set | ||
89 | # CONFIG_CPU_TX39XX is not set | ||
90 | # CONFIG_CPU_VR41XX is not set | ||
91 | # CONFIG_CPU_R4300 is not set | ||
92 | # CONFIG_CPU_R4X00 is not set | ||
93 | # CONFIG_CPU_TX49XX is not set | ||
94 | # CONFIG_CPU_R5000 is not set | ||
95 | # CONFIG_CPU_R5432 is not set | ||
96 | # CONFIG_CPU_R6000 is not set | ||
97 | # CONFIG_CPU_NEVADA is not set | ||
98 | # CONFIG_CPU_R8000 is not set | ||
99 | # CONFIG_CPU_R10000 is not set | ||
100 | # CONFIG_CPU_RM7000 is not set | ||
101 | # CONFIG_CPU_RM9000 is not set | ||
102 | # CONFIG_CPU_SB1 is not set | ||
103 | CONFIG_SYS_HAS_CPU_MIPS32_R1=y | ||
104 | CONFIG_CPU_MIPS32=y | ||
105 | CONFIG_CPU_MIPSR1=y | ||
106 | CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y | ||
107 | CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y | ||
108 | |||
109 | # | ||
110 | # Kernel type | ||
111 | # | ||
112 | CONFIG_32BIT=y | ||
113 | # CONFIG_64BIT is not set | ||
114 | CONFIG_PAGE_SIZE_4KB=y | ||
115 | # CONFIG_PAGE_SIZE_8KB is not set | ||
116 | # CONFIG_PAGE_SIZE_16KB is not set | ||
117 | # CONFIG_PAGE_SIZE_64KB is not set | ||
118 | CONFIG_CPU_HAS_PREFETCH=y | ||
119 | CONFIG_MIPS_MT_DISABLED=y | ||
120 | # CONFIG_MIPS_MT_SMP is not set | ||
121 | # CONFIG_MIPS_MT_SMTC is not set | ||
122 | # CONFIG_MIPS_VPE_LOADER is not set | ||
123 | # CONFIG_64BIT_PHYS_ADDR is not set | ||
124 | CONFIG_CPU_HAS_LLSC=y | ||
125 | CONFIG_CPU_HAS_SYNC=y | ||
126 | CONFIG_GENERIC_HARDIRQS=y | ||
127 | CONFIG_GENERIC_IRQ_PROBE=y | ||
128 | CONFIG_CPU_SUPPORTS_HIGHMEM=y | ||
129 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
130 | CONFIG_SELECT_MEMORY_MODEL=y | ||
131 | CONFIG_FLATMEM_MANUAL=y | ||
132 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
133 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
134 | CONFIG_FLATMEM=y | ||
135 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
136 | # CONFIG_SPARSEMEM_STATIC is not set | ||
137 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
138 | # CONFIG_RESOURCES_64BIT is not set | ||
139 | # CONFIG_HZ_48 is not set | ||
140 | # CONFIG_HZ_100 is not set | ||
141 | # CONFIG_HZ_128 is not set | ||
142 | CONFIG_HZ_250=y | ||
143 | # CONFIG_HZ_256 is not set | ||
144 | # CONFIG_HZ_1000 is not set | ||
145 | # CONFIG_HZ_1024 is not set | ||
146 | CONFIG_SYS_SUPPORTS_ARBIT_HZ=y | ||
147 | CONFIG_HZ=250 | ||
148 | CONFIG_PREEMPT_NONE=y | ||
149 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
150 | # CONFIG_PREEMPT is not set | ||
151 | CONFIG_LOCKDEP_SUPPORT=y | ||
152 | CONFIG_STACKTRACE_SUPPORT=y | ||
153 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
154 | |||
155 | # | ||
156 | # Code maturity level options | ||
157 | # | ||
158 | CONFIG_EXPERIMENTAL=y | ||
159 | CONFIG_BROKEN_ON_SMP=y | ||
160 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
161 | |||
162 | # | ||
163 | # General setup | ||
164 | # | ||
165 | CONFIG_LOCALVERSION="" | ||
166 | CONFIG_LOCALVERSION_AUTO=y | ||
167 | CONFIG_SWAP=y | ||
168 | CONFIG_SYSVIPC=y | ||
169 | # CONFIG_IPC_NS is not set | ||
170 | # CONFIG_POSIX_MQUEUE is not set | ||
171 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
172 | # CONFIG_TASKSTATS is not set | ||
173 | # CONFIG_UTS_NS is not set | ||
174 | # CONFIG_AUDIT is not set | ||
175 | CONFIG_IKCONFIG=y | ||
176 | CONFIG_IKCONFIG_PROC=y | ||
177 | CONFIG_SYSFS_DEPRECATED=y | ||
178 | # CONFIG_RELAY is not set | ||
179 | CONFIG_INITRAMFS_SOURCE="" | ||
180 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
181 | CONFIG_SYSCTL=y | ||
182 | CONFIG_EMBEDDED=y | ||
183 | # CONFIG_SYSCTL_SYSCALL is not set | ||
184 | CONFIG_KALLSYMS=y | ||
185 | # CONFIG_KALLSYMS_ALL is not set | ||
186 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
187 | # CONFIG_HOTPLUG is not set | ||
188 | CONFIG_PRINTK=y | ||
189 | CONFIG_BUG=y | ||
190 | CONFIG_ELF_CORE=y | ||
191 | CONFIG_BASE_FULL=y | ||
192 | CONFIG_FUTEX=y | ||
193 | CONFIG_EPOLL=y | ||
194 | CONFIG_SHMEM=y | ||
195 | CONFIG_SLAB=y | ||
196 | CONFIG_VM_EVENT_COUNTERS=y | ||
197 | CONFIG_RT_MUTEXES=y | ||
198 | # CONFIG_TINY_SHMEM is not set | ||
199 | CONFIG_BASE_SMALL=0 | ||
200 | # CONFIG_SLOB is not set | ||
201 | |||
202 | # | ||
203 | # Loadable module support | ||
204 | # | ||
205 | CONFIG_MODULES=y | ||
206 | # CONFIG_MODULE_UNLOAD is not set | ||
207 | # CONFIG_MODVERSIONS is not set | ||
208 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
209 | CONFIG_KMOD=y | ||
210 | |||
211 | # | ||
212 | # Block layer | ||
213 | # | ||
214 | CONFIG_BLOCK=y | ||
215 | # CONFIG_LBD is not set | ||
216 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
217 | # CONFIG_LSF is not set | ||
218 | |||
219 | # | ||
220 | # IO Schedulers | ||
221 | # | ||
222 | CONFIG_IOSCHED_NOOP=y | ||
223 | CONFIG_IOSCHED_AS=y | ||
224 | CONFIG_IOSCHED_DEADLINE=y | ||
225 | CONFIG_IOSCHED_CFQ=y | ||
226 | CONFIG_DEFAULT_AS=y | ||
227 | # CONFIG_DEFAULT_DEADLINE is not set | ||
228 | # CONFIG_DEFAULT_CFQ is not set | ||
229 | # CONFIG_DEFAULT_NOOP is not set | ||
230 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
231 | |||
232 | # | ||
233 | # Bus options (PCI, PCMCIA, EISA, ISA, TC) | ||
234 | # | ||
235 | CONFIG_HW_HAS_PCI=y | ||
236 | CONFIG_PCI=y | ||
237 | # CONFIG_PCI_MULTITHREAD_PROBE is not set | ||
238 | # CONFIG_PCI_DEBUG is not set | ||
239 | CONFIG_MMU=y | ||
240 | |||
241 | # | ||
242 | # PCCARD (PCMCIA/CardBus) support | ||
243 | # | ||
244 | |||
245 | # | ||
246 | # PCI Hotplug Support | ||
247 | # | ||
248 | |||
249 | # | ||
250 | # Executable file formats | ||
251 | # | ||
252 | CONFIG_BINFMT_ELF=y | ||
253 | # CONFIG_BINFMT_MISC is not set | ||
254 | CONFIG_TRAD_SIGNALS=y | ||
255 | |||
256 | # | ||
257 | # Networking | ||
258 | # | ||
259 | CONFIG_NET=y | ||
260 | |||
261 | # | ||
262 | # Networking options | ||
263 | # | ||
264 | # CONFIG_NETDEBUG is not set | ||
265 | CONFIG_PACKET=y | ||
266 | # CONFIG_PACKET_MMAP is not set | ||
267 | CONFIG_UNIX=y | ||
268 | CONFIG_XFRM=y | ||
269 | # CONFIG_XFRM_USER is not set | ||
270 | # CONFIG_XFRM_SUB_POLICY is not set | ||
271 | # CONFIG_NET_KEY is not set | ||
272 | CONFIG_INET=y | ||
273 | # CONFIG_IP_MULTICAST is not set | ||
274 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
275 | CONFIG_IP_FIB_HASH=y | ||
276 | CONFIG_IP_PNP=y | ||
277 | CONFIG_IP_PNP_DHCP=y | ||
278 | CONFIG_IP_PNP_BOOTP=y | ||
279 | # CONFIG_IP_PNP_RARP is not set | ||
280 | # CONFIG_NET_IPIP is not set | ||
281 | # CONFIG_NET_IPGRE is not set | ||
282 | # CONFIG_ARPD is not set | ||
283 | # CONFIG_SYN_COOKIES is not set | ||
284 | # CONFIG_INET_AH is not set | ||
285 | # CONFIG_INET_ESP is not set | ||
286 | # CONFIG_INET_IPCOMP is not set | ||
287 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
288 | # CONFIG_INET_TUNNEL is not set | ||
289 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
290 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
291 | CONFIG_INET_XFRM_MODE_BEET=y | ||
292 | CONFIG_INET_DIAG=y | ||
293 | CONFIG_INET_TCP_DIAG=y | ||
294 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
295 | CONFIG_TCP_CONG_CUBIC=y | ||
296 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
297 | # CONFIG_TCP_MD5SIG is not set | ||
298 | # CONFIG_IPV6 is not set | ||
299 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
300 | # CONFIG_INET6_TUNNEL is not set | ||
301 | # CONFIG_NETWORK_SECMARK is not set | ||
302 | # CONFIG_NETFILTER is not set | ||
303 | |||
304 | # | ||
305 | # DCCP Configuration (EXPERIMENTAL) | ||
306 | # | ||
307 | # CONFIG_IP_DCCP is not set | ||
308 | |||
309 | # | ||
310 | # SCTP Configuration (EXPERIMENTAL) | ||
311 | # | ||
312 | # CONFIG_IP_SCTP is not set | ||
313 | |||
314 | # | ||
315 | # TIPC Configuration (EXPERIMENTAL) | ||
316 | # | ||
317 | # CONFIG_TIPC is not set | ||
318 | # CONFIG_ATM is not set | ||
319 | # CONFIG_BRIDGE is not set | ||
320 | # CONFIG_VLAN_8021Q is not set | ||
321 | # CONFIG_DECNET is not set | ||
322 | # CONFIG_LLC2 is not set | ||
323 | # CONFIG_IPX is not set | ||
324 | # CONFIG_ATALK is not set | ||
325 | # CONFIG_X25 is not set | ||
326 | # CONFIG_LAPB is not set | ||
327 | # CONFIG_ECONET is not set | ||
328 | # CONFIG_WAN_ROUTER is not set | ||
329 | |||
330 | # | ||
331 | # QoS and/or fair queueing | ||
332 | # | ||
333 | # CONFIG_NET_SCHED is not set | ||
334 | |||
335 | # | ||
336 | # Network testing | ||
337 | # | ||
338 | # CONFIG_NET_PKTGEN is not set | ||
339 | # CONFIG_HAMRADIO is not set | ||
340 | # CONFIG_IRDA is not set | ||
341 | # CONFIG_BT is not set | ||
342 | # CONFIG_IEEE80211 is not set | ||
343 | |||
344 | # | ||
345 | # Device Drivers | ||
346 | # | ||
347 | |||
348 | # | ||
349 | # Generic Driver Options | ||
350 | # | ||
351 | CONFIG_STANDALONE=y | ||
352 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
353 | # CONFIG_DEBUG_DRIVER is not set | ||
354 | # CONFIG_SYS_HYPERVISOR is not set | ||
355 | |||
356 | # | ||
357 | # Connector - unified userspace <-> kernelspace linker | ||
358 | # | ||
359 | # CONFIG_CONNECTOR is not set | ||
360 | |||
361 | # | ||
362 | # Memory Technology Devices (MTD) | ||
363 | # | ||
364 | # CONFIG_MTD is not set | ||
365 | |||
366 | # | ||
367 | # Parallel port support | ||
368 | # | ||
369 | # CONFIG_PARPORT is not set | ||
370 | |||
371 | # | ||
372 | # Plug and Play support | ||
373 | # | ||
374 | |||
375 | # | ||
376 | # Block devices | ||
377 | # | ||
378 | # CONFIG_BLK_CPQ_DA is not set | ||
379 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
380 | # CONFIG_BLK_DEV_DAC960 is not set | ||
381 | # CONFIG_BLK_DEV_UMEM is not set | ||
382 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
383 | CONFIG_BLK_DEV_LOOP=y | ||
384 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
385 | # CONFIG_BLK_DEV_NBD is not set | ||
386 | # CONFIG_BLK_DEV_SX8 is not set | ||
387 | # CONFIG_BLK_DEV_UB is not set | ||
388 | CONFIG_BLK_DEV_RAM=y | ||
389 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
390 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
391 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
392 | CONFIG_BLK_DEV_INITRD=y | ||
393 | # CONFIG_CDROM_PKTCDVD is not set | ||
394 | # CONFIG_ATA_OVER_ETH is not set | ||
395 | |||
396 | # | ||
397 | # Misc devices | ||
398 | # | ||
399 | # CONFIG_SGI_IOC4 is not set | ||
400 | # CONFIG_TIFM_CORE is not set | ||
401 | |||
402 | # | ||
403 | # ATA/ATAPI/MFM/RLL support | ||
404 | # | ||
405 | CONFIG_IDE=y | ||
406 | CONFIG_IDE_MAX_HWIFS=4 | ||
407 | CONFIG_BLK_DEV_IDE=y | ||
408 | |||
409 | # | ||
410 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
411 | # | ||
412 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
413 | CONFIG_BLK_DEV_IDEDISK=y | ||
414 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
415 | CONFIG_BLK_DEV_IDECD=m | ||
416 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
417 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
418 | CONFIG_BLK_DEV_IDESCSI=y | ||
419 | # CONFIG_IDE_TASK_IOCTL is not set | ||
420 | |||
421 | # | ||
422 | # IDE chipset support/bugfixes | ||
423 | # | ||
424 | CONFIG_IDE_GENERIC=y | ||
425 | CONFIG_BLK_DEV_IDEPCI=y | ||
426 | CONFIG_IDEPCI_SHARE_IRQ=y | ||
427 | CONFIG_BLK_DEV_OFFBOARD=y | ||
428 | CONFIG_BLK_DEV_GENERIC=y | ||
429 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
430 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
431 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
432 | # CONFIG_IDEDMA_PCI_AUTO is not set | ||
433 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
434 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
435 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
436 | # CONFIG_BLK_DEV_CMD64X is not set | ||
437 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
438 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
439 | # CONFIG_BLK_DEV_CS5520 is not set | ||
440 | # CONFIG_BLK_DEV_CS5530 is not set | ||
441 | # CONFIG_BLK_DEV_HPT34X is not set | ||
442 | CONFIG_BLK_DEV_HPT366=y | ||
443 | # CONFIG_BLK_DEV_JMICRON is not set | ||
444 | # CONFIG_BLK_DEV_SC1200 is not set | ||
445 | # CONFIG_BLK_DEV_PIIX is not set | ||
446 | # CONFIG_BLK_DEV_IT821X is not set | ||
447 | # CONFIG_BLK_DEV_NS87415 is not set | ||
448 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
449 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
450 | # CONFIG_BLK_DEV_SVWKS is not set | ||
451 | # CONFIG_BLK_DEV_SIIMAGE is not set | ||
452 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
453 | # CONFIG_BLK_DEV_TRM290 is not set | ||
454 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
455 | # CONFIG_IDE_ARM is not set | ||
456 | CONFIG_BLK_DEV_IDEDMA=y | ||
457 | # CONFIG_IDEDMA_IVB is not set | ||
458 | # CONFIG_IDEDMA_AUTO is not set | ||
459 | # CONFIG_BLK_DEV_HD is not set | ||
460 | |||
461 | # | ||
462 | # SCSI device support | ||
463 | # | ||
464 | # CONFIG_RAID_ATTRS is not set | ||
465 | CONFIG_SCSI=y | ||
466 | # CONFIG_SCSI_NETLINK is not set | ||
467 | CONFIG_SCSI_PROC_FS=y | ||
468 | |||
469 | # | ||
470 | # SCSI support type (disk, tape, CD-ROM) | ||
471 | # | ||
472 | CONFIG_BLK_DEV_SD=y | ||
473 | # CONFIG_CHR_DEV_ST is not set | ||
474 | # CONFIG_CHR_DEV_OSST is not set | ||
475 | # CONFIG_BLK_DEV_SR is not set | ||
476 | # CONFIG_CHR_DEV_SG is not set | ||
477 | # CONFIG_CHR_DEV_SCH is not set | ||
478 | |||
479 | # | ||
480 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
481 | # | ||
482 | # CONFIG_SCSI_MULTI_LUN is not set | ||
483 | CONFIG_SCSI_CONSTANTS=y | ||
484 | # CONFIG_SCSI_LOGGING is not set | ||
485 | |||
486 | # | ||
487 | # SCSI Transports | ||
488 | # | ||
489 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
490 | # CONFIG_SCSI_FC_ATTRS is not set | ||
491 | CONFIG_SCSI_ISCSI_ATTRS=m | ||
492 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
493 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
494 | |||
495 | # | ||
496 | # SCSI low-level drivers | ||
497 | # | ||
498 | CONFIG_ISCSI_TCP=m | ||
499 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
500 | # CONFIG_SCSI_3W_9XXX is not set | ||
501 | # CONFIG_SCSI_ACARD is not set | ||
502 | # CONFIG_SCSI_AACRAID is not set | ||
503 | # CONFIG_SCSI_AIC7XXX is not set | ||
504 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
505 | # CONFIG_SCSI_AIC79XX is not set | ||
506 | # CONFIG_SCSI_AIC94XX is not set | ||
507 | # CONFIG_SCSI_DPT_I2O is not set | ||
508 | # CONFIG_SCSI_ARCMSR is not set | ||
509 | # CONFIG_MEGARAID_NEWGEN is not set | ||
510 | # CONFIG_MEGARAID_LEGACY is not set | ||
511 | # CONFIG_MEGARAID_SAS is not set | ||
512 | # CONFIG_SCSI_HPTIOP is not set | ||
513 | # CONFIG_SCSI_DMX3191D is not set | ||
514 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
515 | # CONFIG_SCSI_IPS is not set | ||
516 | # CONFIG_SCSI_INITIO is not set | ||
517 | # CONFIG_SCSI_INIA100 is not set | ||
518 | # CONFIG_SCSI_STEX is not set | ||
519 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
520 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
521 | # CONFIG_SCSI_QLA_FC is not set | ||
522 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
523 | # CONFIG_SCSI_LPFC is not set | ||
524 | # CONFIG_SCSI_DC395x is not set | ||
525 | # CONFIG_SCSI_DC390T is not set | ||
526 | # CONFIG_SCSI_NSP32 is not set | ||
527 | # CONFIG_SCSI_DEBUG is not set | ||
528 | |||
529 | # | ||
530 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
531 | # | ||
532 | # CONFIG_ATA is not set | ||
533 | |||
534 | # | ||
535 | # Multi-device support (RAID and LVM) | ||
536 | # | ||
537 | # CONFIG_MD is not set | ||
538 | |||
539 | # | ||
540 | # Fusion MPT device support | ||
541 | # | ||
542 | # CONFIG_FUSION is not set | ||
543 | # CONFIG_FUSION_SPI is not set | ||
544 | # CONFIG_FUSION_FC is not set | ||
545 | # CONFIG_FUSION_SAS is not set | ||
546 | |||
547 | # | ||
548 | # IEEE 1394 (FireWire) support | ||
549 | # | ||
550 | # CONFIG_IEEE1394 is not set | ||
551 | |||
552 | # | ||
553 | # I2O device support | ||
554 | # | ||
555 | # CONFIG_I2O is not set | ||
556 | |||
557 | # | ||
558 | # Network device support | ||
559 | # | ||
560 | CONFIG_NETDEVICES=y | ||
561 | # CONFIG_DUMMY is not set | ||
562 | # CONFIG_BONDING is not set | ||
563 | # CONFIG_EQUALIZER is not set | ||
564 | # CONFIG_TUN is not set | ||
565 | |||
566 | # | ||
567 | # ARCnet devices | ||
568 | # | ||
569 | # CONFIG_ARCNET is not set | ||
570 | |||
571 | # | ||
572 | # PHY device support | ||
573 | # | ||
574 | # CONFIG_PHYLIB is not set | ||
575 | |||
576 | # | ||
577 | # Ethernet (10 or 100Mbit) | ||
578 | # | ||
579 | CONFIG_NET_ETHERNET=y | ||
580 | CONFIG_MII=y | ||
581 | # CONFIG_HAPPYMEAL is not set | ||
582 | # CONFIG_SUNGEM is not set | ||
583 | # CONFIG_CASSINI is not set | ||
584 | # CONFIG_NET_VENDOR_3COM is not set | ||
585 | # CONFIG_DM9000 is not set | ||
586 | |||
587 | # | ||
588 | # Tulip family network device support | ||
589 | # | ||
590 | # CONFIG_NET_TULIP is not set | ||
591 | # CONFIG_HP100 is not set | ||
592 | CONFIG_NET_PCI=y | ||
593 | # CONFIG_PCNET32 is not set | ||
594 | # CONFIG_AMD8111_ETH is not set | ||
595 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
596 | # CONFIG_B44 is not set | ||
597 | # CONFIG_FORCEDETH is not set | ||
598 | # CONFIG_DGRS is not set | ||
599 | # CONFIG_EEPRO100 is not set | ||
600 | # CONFIG_E100 is not set | ||
601 | # CONFIG_FEALNX is not set | ||
602 | CONFIG_NATSEMI=y | ||
603 | # CONFIG_NE2K_PCI is not set | ||
604 | # CONFIG_8139CP is not set | ||
605 | # CONFIG_8139TOO is not set | ||
606 | # CONFIG_SIS900 is not set | ||
607 | # CONFIG_EPIC100 is not set | ||
608 | # CONFIG_SUNDANCE is not set | ||
609 | # CONFIG_TLAN is not set | ||
610 | # CONFIG_VIA_RHINE is not set | ||
611 | |||
612 | # | ||
613 | # Ethernet (1000 Mbit) | ||
614 | # | ||
615 | # CONFIG_ACENIC is not set | ||
616 | # CONFIG_DL2K is not set | ||
617 | # CONFIG_E1000 is not set | ||
618 | # CONFIG_NS83820 is not set | ||
619 | # CONFIG_HAMACHI is not set | ||
620 | # CONFIG_YELLOWFIN is not set | ||
621 | # CONFIG_R8169 is not set | ||
622 | # CONFIG_SIS190 is not set | ||
623 | # CONFIG_SKGE is not set | ||
624 | # CONFIG_SKY2 is not set | ||
625 | # CONFIG_SK98LIN is not set | ||
626 | # CONFIG_VIA_VELOCITY is not set | ||
627 | # CONFIG_TIGON3 is not set | ||
628 | # CONFIG_BNX2 is not set | ||
629 | # CONFIG_QLA3XXX is not set | ||
630 | |||
631 | # | ||
632 | # Ethernet (10000 Mbit) | ||
633 | # | ||
634 | # CONFIG_CHELSIO_T1 is not set | ||
635 | # CONFIG_IXGB is not set | ||
636 | # CONFIG_S2IO is not set | ||
637 | # CONFIG_MYRI10GE is not set | ||
638 | # CONFIG_NETXEN_NIC is not set | ||
639 | |||
640 | # | ||
641 | # Token Ring devices | ||
642 | # | ||
643 | # CONFIG_TR is not set | ||
644 | |||
645 | # | ||
646 | # Wireless LAN (non-hamradio) | ||
647 | # | ||
648 | # CONFIG_NET_RADIO is not set | ||
649 | |||
650 | # | ||
651 | # Wan interfaces | ||
652 | # | ||
653 | # CONFIG_WAN is not set | ||
654 | # CONFIG_FDDI is not set | ||
655 | # CONFIG_HIPPI is not set | ||
656 | # CONFIG_PPP is not set | ||
657 | # CONFIG_SLIP is not set | ||
658 | # CONFIG_NET_FC is not set | ||
659 | # CONFIG_SHAPER is not set | ||
660 | # CONFIG_NETCONSOLE is not set | ||
661 | # CONFIG_NETPOLL is not set | ||
662 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
663 | |||
664 | # | ||
665 | # ISDN subsystem | ||
666 | # | ||
667 | # CONFIG_ISDN is not set | ||
668 | |||
669 | # | ||
670 | # Telephony Support | ||
671 | # | ||
672 | # CONFIG_PHONE is not set | ||
673 | |||
674 | # | ||
675 | # Input device support | ||
676 | # | ||
677 | CONFIG_INPUT=y | ||
678 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
679 | |||
680 | # | ||
681 | # Userland interfaces | ||
682 | # | ||
683 | # CONFIG_INPUT_MOUSEDEV is not set | ||
684 | # CONFIG_INPUT_JOYDEV is not set | ||
685 | # CONFIG_INPUT_TSDEV is not set | ||
686 | # CONFIG_INPUT_EVDEV is not set | ||
687 | # CONFIG_INPUT_EVBUG is not set | ||
688 | |||
689 | # | ||
690 | # Input Device Drivers | ||
691 | # | ||
692 | # CONFIG_INPUT_KEYBOARD is not set | ||
693 | # CONFIG_INPUT_MOUSE is not set | ||
694 | # CONFIG_INPUT_JOYSTICK is not set | ||
695 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
696 | # CONFIG_INPUT_MISC is not set | ||
697 | |||
698 | # | ||
699 | # Hardware I/O ports | ||
700 | # | ||
701 | CONFIG_SERIO=y | ||
702 | # CONFIG_SERIO_I8042 is not set | ||
703 | # CONFIG_SERIO_SERPORT is not set | ||
704 | # CONFIG_SERIO_PCIPS2 is not set | ||
705 | CONFIG_SERIO_LIBPS2=y | ||
706 | # CONFIG_SERIO_RAW is not set | ||
707 | # CONFIG_GAMEPORT is not set | ||
708 | |||
709 | # | ||
710 | # Character devices | ||
711 | # | ||
712 | CONFIG_VT=y | ||
713 | CONFIG_VT_CONSOLE=y | ||
714 | CONFIG_HW_CONSOLE=y | ||
715 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
716 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
717 | |||
718 | # | ||
719 | # Serial drivers | ||
720 | # | ||
721 | # CONFIG_SERIAL_8250 is not set | ||
722 | |||
723 | # | ||
724 | # Non-8250 serial port support | ||
725 | # | ||
726 | # CONFIG_SERIAL_PNX8XXX is not set | ||
727 | # CONFIG_SERIAL_JSM is not set | ||
728 | CONFIG_UNIX98_PTYS=y | ||
729 | CONFIG_LEGACY_PTYS=y | ||
730 | CONFIG_LEGACY_PTY_COUNT=256 | ||
731 | |||
732 | # | ||
733 | # IPMI | ||
734 | # | ||
735 | # CONFIG_IPMI_HANDLER is not set | ||
736 | |||
737 | # | ||
738 | # Watchdog Cards | ||
739 | # | ||
740 | # CONFIG_WATCHDOG is not set | ||
741 | CONFIG_HW_RANDOM=y | ||
742 | # CONFIG_RTC is not set | ||
743 | # CONFIG_GEN_RTC is not set | ||
744 | # CONFIG_DTLK is not set | ||
745 | # CONFIG_R3964 is not set | ||
746 | # CONFIG_APPLICOM is not set | ||
747 | # CONFIG_DRM is not set | ||
748 | # CONFIG_RAW_DRIVER is not set | ||
749 | |||
750 | # | ||
751 | # TPM devices | ||
752 | # | ||
753 | # CONFIG_TCG_TPM is not set | ||
754 | |||
755 | # | ||
756 | # I2C support | ||
757 | # | ||
758 | # CONFIG_I2C is not set | ||
759 | |||
760 | # | ||
761 | # SPI support | ||
762 | # | ||
763 | # CONFIG_SPI is not set | ||
764 | # CONFIG_SPI_MASTER is not set | ||
765 | |||
766 | # | ||
767 | # Dallas's 1-wire bus | ||
768 | # | ||
769 | # CONFIG_W1 is not set | ||
770 | |||
771 | # | ||
772 | # Hardware Monitoring support | ||
773 | # | ||
774 | CONFIG_HWMON=y | ||
775 | # CONFIG_HWMON_VID is not set | ||
776 | # CONFIG_SENSORS_ABITUGURU is not set | ||
777 | # CONFIG_SENSORS_F71805F is not set | ||
778 | # CONFIG_SENSORS_VT1211 is not set | ||
779 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
780 | |||
781 | # | ||
782 | # Multimedia devices | ||
783 | # | ||
784 | # CONFIG_VIDEO_DEV is not set | ||
785 | |||
786 | # | ||
787 | # Digital Video Broadcasting Devices | ||
788 | # | ||
789 | # CONFIG_DVB is not set | ||
790 | # CONFIG_USB_DABUSB is not set | ||
791 | |||
792 | # | ||
793 | # Graphics support | ||
794 | # | ||
795 | CONFIG_FIRMWARE_EDID=y | ||
796 | # CONFIG_FB is not set | ||
797 | |||
798 | # | ||
799 | # Console display driver support | ||
800 | # | ||
801 | # CONFIG_VGA_CONSOLE is not set | ||
802 | CONFIG_DUMMY_CONSOLE=y | ||
803 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
804 | |||
805 | # | ||
806 | # Sound | ||
807 | # | ||
808 | # CONFIG_SOUND is not set | ||
809 | |||
810 | # | ||
811 | # USB support | ||
812 | # | ||
813 | CONFIG_USB_ARCH_HAS_HCD=y | ||
814 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
815 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
816 | CONFIG_USB=y | ||
817 | # CONFIG_USB_DEBUG is not set | ||
818 | |||
819 | # | ||
820 | # Miscellaneous USB options | ||
821 | # | ||
822 | # CONFIG_USB_DEVICEFS is not set | ||
823 | # CONFIG_USB_BANDWIDTH is not set | ||
824 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
825 | # CONFIG_USB_MULTITHREAD_PROBE is not set | ||
826 | # CONFIG_USB_OTG is not set | ||
827 | |||
828 | # | ||
829 | # USB Host Controller Drivers | ||
830 | # | ||
831 | # CONFIG_USB_EHCI_HCD is not set | ||
832 | # CONFIG_USB_ISP116X_HCD is not set | ||
833 | CONFIG_USB_OHCI_HCD=y | ||
834 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
835 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
836 | # CONFIG_USB_UHCI_HCD is not set | ||
837 | # CONFIG_USB_SL811_HCD is not set | ||
838 | |||
839 | # | ||
840 | # USB Device Class drivers | ||
841 | # | ||
842 | # CONFIG_USB_ACM is not set | ||
843 | # CONFIG_USB_PRINTER is not set | ||
844 | |||
845 | # | ||
846 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
847 | # | ||
848 | |||
849 | # | ||
850 | # may also be needed; see USB_STORAGE Help for more information | ||
851 | # | ||
852 | CONFIG_USB_STORAGE=y | ||
853 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
854 | CONFIG_USB_STORAGE_DATAFAB=y | ||
855 | CONFIG_USB_STORAGE_FREECOM=y | ||
856 | CONFIG_USB_STORAGE_ISD200=y | ||
857 | CONFIG_USB_STORAGE_DPCM=y | ||
858 | CONFIG_USB_STORAGE_USBAT=y | ||
859 | CONFIG_USB_STORAGE_SDDR09=y | ||
860 | CONFIG_USB_STORAGE_SDDR55=y | ||
861 | CONFIG_USB_STORAGE_JUMPSHOT=y | ||
862 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
863 | # CONFIG_USB_STORAGE_KARMA is not set | ||
864 | # CONFIG_USB_LIBUSUAL is not set | ||
865 | |||
866 | # | ||
867 | # USB Input Devices | ||
868 | # | ||
869 | # CONFIG_USB_HID is not set | ||
870 | |||
871 | # | ||
872 | # USB HID Boot Protocol drivers | ||
873 | # | ||
874 | # CONFIG_USB_KBD is not set | ||
875 | # CONFIG_USB_MOUSE is not set | ||
876 | # CONFIG_USB_AIPTEK is not set | ||
877 | # CONFIG_USB_WACOM is not set | ||
878 | # CONFIG_USB_ACECAD is not set | ||
879 | # CONFIG_USB_KBTAB is not set | ||
880 | # CONFIG_USB_POWERMATE is not set | ||
881 | # CONFIG_USB_TOUCHSCREEN is not set | ||
882 | # CONFIG_USB_YEALINK is not set | ||
883 | # CONFIG_USB_XPAD is not set | ||
884 | # CONFIG_USB_ATI_REMOTE is not set | ||
885 | # CONFIG_USB_ATI_REMOTE2 is not set | ||
886 | # CONFIG_USB_KEYSPAN_REMOTE is not set | ||
887 | # CONFIG_USB_APPLETOUCH is not set | ||
888 | |||
889 | # | ||
890 | # USB Imaging devices | ||
891 | # | ||
892 | # CONFIG_USB_MDC800 is not set | ||
893 | # CONFIG_USB_MICROTEK is not set | ||
894 | |||
895 | # | ||
896 | # USB Network Adapters | ||
897 | # | ||
898 | # CONFIG_USB_CATC is not set | ||
899 | # CONFIG_USB_KAWETH is not set | ||
900 | # CONFIG_USB_PEGASUS is not set | ||
901 | # CONFIG_USB_RTL8150 is not set | ||
902 | # CONFIG_USB_USBNET_MII is not set | ||
903 | # CONFIG_USB_USBNET is not set | ||
904 | CONFIG_USB_MON=y | ||
905 | |||
906 | # | ||
907 | # USB port drivers | ||
908 | # | ||
909 | |||
910 | # | ||
911 | # USB Serial Converter support | ||
912 | # | ||
913 | # CONFIG_USB_SERIAL is not set | ||
914 | |||
915 | # | ||
916 | # USB Miscellaneous drivers | ||
917 | # | ||
918 | # CONFIG_USB_EMI62 is not set | ||
919 | # CONFIG_USB_EMI26 is not set | ||
920 | # CONFIG_USB_ADUTUX is not set | ||
921 | # CONFIG_USB_AUERSWALD is not set | ||
922 | # CONFIG_USB_RIO500 is not set | ||
923 | # CONFIG_USB_LEGOTOWER is not set | ||
924 | # CONFIG_USB_LCD is not set | ||
925 | # CONFIG_USB_LED is not set | ||
926 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
927 | # CONFIG_USB_CYTHERM is not set | ||
928 | # CONFIG_USB_PHIDGET is not set | ||
929 | # CONFIG_USB_IDMOUSE is not set | ||
930 | # CONFIG_USB_FTDI_ELAN is not set | ||
931 | # CONFIG_USB_APPLEDISPLAY is not set | ||
932 | # CONFIG_USB_LD is not set | ||
933 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
934 | |||
935 | # | ||
936 | # USB DSL modem support | ||
937 | # | ||
938 | |||
939 | # | ||
940 | # USB Gadget Support | ||
941 | # | ||
942 | # CONFIG_USB_GADGET is not set | ||
943 | |||
944 | # | ||
945 | # MMC/SD Card support | ||
946 | # | ||
947 | # CONFIG_MMC is not set | ||
948 | |||
949 | # | ||
950 | # LED devices | ||
951 | # | ||
952 | # CONFIG_NEW_LEDS is not set | ||
953 | |||
954 | # | ||
955 | # LED drivers | ||
956 | # | ||
957 | |||
958 | # | ||
959 | # LED Triggers | ||
960 | # | ||
961 | |||
962 | # | ||
963 | # InfiniBand support | ||
964 | # | ||
965 | # CONFIG_INFINIBAND is not set | ||
966 | |||
967 | # | ||
968 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
969 | # | ||
970 | |||
971 | # | ||
972 | # Real Time Clock | ||
973 | # | ||
974 | # CONFIG_RTC_CLASS is not set | ||
975 | |||
976 | # | ||
977 | # DMA Engine support | ||
978 | # | ||
979 | # CONFIG_DMA_ENGINE is not set | ||
980 | |||
981 | # | ||
982 | # DMA Clients | ||
983 | # | ||
984 | |||
985 | # | ||
986 | # DMA Devices | ||
987 | # | ||
988 | |||
989 | # | ||
990 | # File systems | ||
991 | # | ||
992 | CONFIG_EXT2_FS=y | ||
993 | # CONFIG_EXT2_FS_XATTR is not set | ||
994 | # CONFIG_EXT2_FS_XIP is not set | ||
995 | # CONFIG_EXT3_FS is not set | ||
996 | # CONFIG_EXT4DEV_FS is not set | ||
997 | # CONFIG_REISERFS_FS is not set | ||
998 | # CONFIG_JFS_FS is not set | ||
999 | # CONFIG_FS_POSIX_ACL is not set | ||
1000 | # CONFIG_XFS_FS is not set | ||
1001 | # CONFIG_GFS2_FS is not set | ||
1002 | # CONFIG_OCFS2_FS is not set | ||
1003 | # CONFIG_MINIX_FS is not set | ||
1004 | # CONFIG_ROMFS_FS is not set | ||
1005 | CONFIG_INOTIFY=y | ||
1006 | CONFIG_INOTIFY_USER=y | ||
1007 | # CONFIG_QUOTA is not set | ||
1008 | # CONFIG_DNOTIFY is not set | ||
1009 | # CONFIG_AUTOFS_FS is not set | ||
1010 | # CONFIG_AUTOFS4_FS is not set | ||
1011 | # CONFIG_FUSE_FS is not set | ||
1012 | |||
1013 | # | ||
1014 | # CD-ROM/DVD Filesystems | ||
1015 | # | ||
1016 | # CONFIG_ISO9660_FS is not set | ||
1017 | # CONFIG_UDF_FS is not set | ||
1018 | |||
1019 | # | ||
1020 | # DOS/FAT/NT Filesystems | ||
1021 | # | ||
1022 | CONFIG_FAT_FS=y | ||
1023 | CONFIG_MSDOS_FS=y | ||
1024 | CONFIG_VFAT_FS=y | ||
1025 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1026 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
1027 | # CONFIG_NTFS_FS is not set | ||
1028 | |||
1029 | # | ||
1030 | # Pseudo filesystems | ||
1031 | # | ||
1032 | CONFIG_PROC_FS=y | ||
1033 | # CONFIG_PROC_KCORE is not set | ||
1034 | CONFIG_PROC_SYSCTL=y | ||
1035 | CONFIG_SYSFS=y | ||
1036 | CONFIG_TMPFS=y | ||
1037 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
1038 | # CONFIG_HUGETLB_PAGE is not set | ||
1039 | CONFIG_RAMFS=y | ||
1040 | # CONFIG_CONFIGFS_FS is not set | ||
1041 | |||
1042 | # | ||
1043 | # Miscellaneous filesystems | ||
1044 | # | ||
1045 | # CONFIG_ADFS_FS is not set | ||
1046 | # CONFIG_AFFS_FS is not set | ||
1047 | # CONFIG_HFS_FS is not set | ||
1048 | # CONFIG_HFSPLUS_FS is not set | ||
1049 | # CONFIG_BEFS_FS is not set | ||
1050 | # CONFIG_BFS_FS is not set | ||
1051 | # CONFIG_EFS_FS is not set | ||
1052 | # CONFIG_CRAMFS is not set | ||
1053 | # CONFIG_VXFS_FS is not set | ||
1054 | # CONFIG_HPFS_FS is not set | ||
1055 | # CONFIG_QNX4FS_FS is not set | ||
1056 | # CONFIG_SYSV_FS is not set | ||
1057 | # CONFIG_UFS_FS is not set | ||
1058 | |||
1059 | # | ||
1060 | # Network File Systems | ||
1061 | # | ||
1062 | CONFIG_NFS_FS=y | ||
1063 | CONFIG_NFS_V3=y | ||
1064 | # CONFIG_NFS_V3_ACL is not set | ||
1065 | # CONFIG_NFS_V4 is not set | ||
1066 | # CONFIG_NFS_DIRECTIO is not set | ||
1067 | CONFIG_NFSD=m | ||
1068 | # CONFIG_NFSD_V3 is not set | ||
1069 | # CONFIG_NFSD_TCP is not set | ||
1070 | CONFIG_ROOT_NFS=y | ||
1071 | CONFIG_LOCKD=y | ||
1072 | CONFIG_LOCKD_V4=y | ||
1073 | CONFIG_EXPORTFS=m | ||
1074 | CONFIG_NFS_COMMON=y | ||
1075 | CONFIG_SUNRPC=y | ||
1076 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
1077 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1078 | # CONFIG_SMB_FS is not set | ||
1079 | # CONFIG_CIFS is not set | ||
1080 | # CONFIG_NCP_FS is not set | ||
1081 | # CONFIG_CODA_FS is not set | ||
1082 | # CONFIG_AFS_FS is not set | ||
1083 | # CONFIG_9P_FS is not set | ||
1084 | |||
1085 | # | ||
1086 | # Partition Types | ||
1087 | # | ||
1088 | # CONFIG_PARTITION_ADVANCED is not set | ||
1089 | CONFIG_MSDOS_PARTITION=y | ||
1090 | |||
1091 | # | ||
1092 | # Native Language Support | ||
1093 | # | ||
1094 | CONFIG_NLS=y | ||
1095 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1096 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
1097 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1098 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1099 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1100 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1101 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1102 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1103 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1104 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1105 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1106 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1107 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1108 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1109 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1110 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1111 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1112 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1113 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1114 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1115 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1116 | # CONFIG_NLS_ISO8859_8 is not set | ||
1117 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1118 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1119 | # CONFIG_NLS_ASCII is not set | ||
1120 | # CONFIG_NLS_ISO8859_1 is not set | ||
1121 | # CONFIG_NLS_ISO8859_2 is not set | ||
1122 | # CONFIG_NLS_ISO8859_3 is not set | ||
1123 | # CONFIG_NLS_ISO8859_4 is not set | ||
1124 | # CONFIG_NLS_ISO8859_5 is not set | ||
1125 | # CONFIG_NLS_ISO8859_6 is not set | ||
1126 | # CONFIG_NLS_ISO8859_7 is not set | ||
1127 | # CONFIG_NLS_ISO8859_9 is not set | ||
1128 | # CONFIG_NLS_ISO8859_13 is not set | ||
1129 | # CONFIG_NLS_ISO8859_14 is not set | ||
1130 | # CONFIG_NLS_ISO8859_15 is not set | ||
1131 | # CONFIG_NLS_KOI8_R is not set | ||
1132 | # CONFIG_NLS_KOI8_U is not set | ||
1133 | # CONFIG_NLS_UTF8 is not set | ||
1134 | |||
1135 | # | ||
1136 | # Profiling support | ||
1137 | # | ||
1138 | # CONFIG_PROFILING is not set | ||
1139 | |||
1140 | # | ||
1141 | # Kernel hacking | ||
1142 | # | ||
1143 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
1144 | # CONFIG_PRINTK_TIME is not set | ||
1145 | CONFIG_ENABLE_MUST_CHECK=y | ||
1146 | CONFIG_MAGIC_SYSRQ=y | ||
1147 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1148 | CONFIG_DEBUG_KERNEL=y | ||
1149 | CONFIG_LOG_BUF_SHIFT=14 | ||
1150 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1151 | # CONFIG_SCHEDSTATS is not set | ||
1152 | CONFIG_DEBUG_SLAB=y | ||
1153 | # CONFIG_DEBUG_SLAB_LEAK is not set | ||
1154 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
1155 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1156 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1157 | # CONFIG_DEBUG_MUTEXES is not set | ||
1158 | # CONFIG_DEBUG_RWSEMS is not set | ||
1159 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1160 | # CONFIG_PROVE_LOCKING is not set | ||
1161 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1162 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
1163 | # CONFIG_DEBUG_KOBJECT is not set | ||
1164 | # CONFIG_DEBUG_INFO is not set | ||
1165 | # CONFIG_DEBUG_FS is not set | ||
1166 | # CONFIG_DEBUG_VM is not set | ||
1167 | # CONFIG_DEBUG_LIST is not set | ||
1168 | CONFIG_FORCED_INLINING=y | ||
1169 | CONFIG_HEADERS_CHECK=y | ||
1170 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1171 | CONFIG_CROSSCOMPILE=y | ||
1172 | CONFIG_CMDLINE="console=ttyS1,38400n8 kgdb=ttyS0 root=/dev/nfs ip=bootp" | ||
1173 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
1174 | # CONFIG_KGDB is not set | ||
1175 | # CONFIG_RUNTIME_DEBUG is not set | ||
1176 | # CONFIG_MIPS_UNCACHED is not set | ||
1177 | |||
1178 | # | ||
1179 | # Security options | ||
1180 | # | ||
1181 | # CONFIG_KEYS is not set | ||
1182 | # CONFIG_SECURITY is not set | ||
1183 | |||
1184 | # | ||
1185 | # Cryptographic options | ||
1186 | # | ||
1187 | CONFIG_CRYPTO=y | ||
1188 | CONFIG_CRYPTO_ALGAPI=m | ||
1189 | CONFIG_CRYPTO_BLKCIPHER=m | ||
1190 | CONFIG_CRYPTO_MANAGER=m | ||
1191 | # CONFIG_CRYPTO_HMAC is not set | ||
1192 | # CONFIG_CRYPTO_NULL is not set | ||
1193 | # CONFIG_CRYPTO_MD4 is not set | ||
1194 | CONFIG_CRYPTO_MD5=m | ||
1195 | # CONFIG_CRYPTO_SHA1 is not set | ||
1196 | # CONFIG_CRYPTO_SHA256 is not set | ||
1197 | # CONFIG_CRYPTO_SHA512 is not set | ||
1198 | # CONFIG_CRYPTO_WP512 is not set | ||
1199 | # CONFIG_CRYPTO_TGR192 is not set | ||
1200 | CONFIG_CRYPTO_ECB=m | ||
1201 | CONFIG_CRYPTO_CBC=m | ||
1202 | # CONFIG_CRYPTO_DES is not set | ||
1203 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1204 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1205 | # CONFIG_CRYPTO_SERPENT is not set | ||
1206 | # CONFIG_CRYPTO_AES is not set | ||
1207 | # CONFIG_CRYPTO_CAST5 is not set | ||
1208 | # CONFIG_CRYPTO_CAST6 is not set | ||
1209 | # CONFIG_CRYPTO_TEA is not set | ||
1210 | # CONFIG_CRYPTO_ARC4 is not set | ||
1211 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1212 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1213 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1214 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1215 | CONFIG_CRYPTO_CRC32C=m | ||
1216 | # CONFIG_CRYPTO_TEST is not set | ||
1217 | |||
1218 | # | ||
1219 | # Hardware crypto devices | ||
1220 | # | ||
1221 | |||
1222 | # | ||
1223 | # Library routines | ||
1224 | # | ||
1225 | CONFIG_CRC_CCITT=m | ||
1226 | # CONFIG_CRC16 is not set | ||
1227 | CONFIG_CRC32=y | ||
1228 | CONFIG_LIBCRC32C=m | ||
1229 | CONFIG_PLIST=y | ||
diff --git a/arch/mips/configs/pnx8550-v2pci_defconfig b/arch/mips/configs/pnx8550-v2pci_defconfig index 64b9fbf44a64..5bc3248e50e4 100644 --- a/arch/mips/configs/pnx8550-v2pci_defconfig +++ b/arch/mips/configs/pnx8550-v2pci_defconfig | |||
@@ -57,7 +57,7 @@ CONFIG_PNX8550_V2PCI=y | |||
57 | # CONFIG_SIBYTE_LITTLESUR is not set | 57 | # CONFIG_SIBYTE_LITTLESUR is not set |
58 | # CONFIG_SIBYTE_CRHINE is not set | 58 | # CONFIG_SIBYTE_CRHINE is not set |
59 | # CONFIG_SIBYTE_CRHONE is not set | 59 | # CONFIG_SIBYTE_CRHONE is not set |
60 | # CONFIG_SNI_RM200_PCI is not set | 60 | # CONFIG_SNI_RM is not set |
61 | # CONFIG_TOSHIBA_JMR3927 is not set | 61 | # CONFIG_TOSHIBA_JMR3927 is not set |
62 | # CONFIG_TOSHIBA_RBTX4927 is not set | 62 | # CONFIG_TOSHIBA_RBTX4927 is not set |
63 | # CONFIG_TOSHIBA_RBTX4938 is not set | 63 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/qemu_defconfig b/arch/mips/configs/qemu_defconfig index 9b0dab822bd0..aa61f0f030a5 100644 --- a/arch/mips/configs/qemu_defconfig +++ b/arch/mips/configs/qemu_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_QEMU=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/rbhma4500_defconfig b/arch/mips/configs/rbhma4500_defconfig index dd0296036026..f9e8f41d17f2 100644 --- a/arch/mips/configs/rbhma4500_defconfig +++ b/arch/mips/configs/rbhma4500_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | CONFIG_TOSHIBA_RBTX4938=y | 65 | CONFIG_TOSHIBA_RBTX4938=y |
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig index d8a498d64d62..496aa67b9f82 100644 --- a/arch/mips/configs/rm200_defconfig +++ b/arch/mips/configs/rm200_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | CONFIG_SNI_RM200_PCI=y | 62 | CONFIG_SNI_RM=y |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig index 805a4fe450f5..e33c17200b39 100644 --- a/arch/mips/configs/sb1250-swarm_defconfig +++ b/arch/mips/configs/sb1250-swarm_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_SIBYTE_SWARM=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/sead_defconfig b/arch/mips/configs/sead_defconfig index 6fcb656d8d87..83fb932f9d4b 100644 --- a/arch/mips/configs/sead_defconfig +++ b/arch/mips/configs/sead_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_SEAD=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig index dc312f19ada7..e9d4eae45bfa 100644 --- a/arch/mips/configs/tb0226_defconfig +++ b/arch/mips/configs/tb0226_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_VR41XX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/tb0229_defconfig b/arch/mips/configs/tb0229_defconfig index 85615d99b01a..c19597fb0c32 100644 --- a/arch/mips/configs/tb0229_defconfig +++ b/arch/mips/configs/tb0229_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_VR41XX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/tb0287_defconfig b/arch/mips/configs/tb0287_defconfig index f7e8194809a1..97d94f96990f 100644 --- a/arch/mips/configs/tb0287_defconfig +++ b/arch/mips/configs/tb0287_defconfig | |||
@@ -57,7 +57,7 @@ CONFIG_MACH_VR41XX=y | |||
57 | # CONFIG_SIBYTE_LITTLESUR is not set | 57 | # CONFIG_SIBYTE_LITTLESUR is not set |
58 | # CONFIG_SIBYTE_CRHINE is not set | 58 | # CONFIG_SIBYTE_CRHINE is not set |
59 | # CONFIG_SIBYTE_CRHONE is not set | 59 | # CONFIG_SIBYTE_CRHONE is not set |
60 | # CONFIG_SNI_RM200_PCI is not set | 60 | # CONFIG_SNI_RM is not set |
61 | # CONFIG_TOSHIBA_JMR3927 is not set | 61 | # CONFIG_TOSHIBA_JMR3927 is not set |
62 | # CONFIG_TOSHIBA_RBTX4927 is not set | 62 | # CONFIG_TOSHIBA_RBTX4927 is not set |
63 | # CONFIG_TOSHIBA_RBTX4938 is not set | 63 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig index 863f6a7cadfd..553734a47b62 100644 --- a/arch/mips/configs/workpad_defconfig +++ b/arch/mips/configs/workpad_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_VR41XX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/wrppmc_defconfig b/arch/mips/configs/wrppmc_defconfig index c10267d61cc9..d3dfb702bb7c 100644 --- a/arch/mips/configs/wrppmc_defconfig +++ b/arch/mips/configs/wrppmc_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_WR_PPMC=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/yosemite_defconfig b/arch/mips/configs/yosemite_defconfig index 4d3c1329f3cf..b9f74d6745ee 100644 --- a/arch/mips/configs/yosemite_defconfig +++ b/arch/mips/configs/yosemite_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_PMC_YOSEMITE=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/defconfig b/arch/mips/defconfig index 21d53e0c9ee8..f9812d1e4579 100644 --- a/arch/mips/defconfig +++ b/arch/mips/defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_SGI_IP22=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index a2e095adaa3f..9a7811d13db2 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S | |||
@@ -138,7 +138,7 @@ | |||
138 | EXPORT(stext) # used for profiling | 138 | EXPORT(stext) # used for profiling |
139 | EXPORT(_stext) | 139 | EXPORT(_stext) |
140 | 140 | ||
141 | #if defined(CONFIG_QEMU) || defined(CONFIG_MIPS_SIM) | 141 | #ifdef CONFIG_MIPS_SIM |
142 | /* | 142 | /* |
143 | * Give us a fighting chance of running if execution beings at the | 143 | * Give us a fighting chance of running if execution beings at the |
144 | * kernel load address. This is needed because this platform does | 144 | * kernel load address. This is needed because this platform does |
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index 1bbefbf43373..37cad5de515c 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c | |||
@@ -1145,7 +1145,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file) | |||
1145 | psinfo.pr_pid = prstatus.pr_pid = current->pid; | 1145 | psinfo.pr_pid = prstatus.pr_pid = current->pid; |
1146 | psinfo.pr_ppid = prstatus.pr_ppid = current->parent->pid; | 1146 | psinfo.pr_ppid = prstatus.pr_ppid = current->parent->pid; |
1147 | psinfo.pr_pgrp = prstatus.pr_pgrp = process_group(current); | 1147 | psinfo.pr_pgrp = prstatus.pr_pgrp = process_group(current); |
1148 | psinfo.pr_sid = prstatus.pr_sid = current->signal->session; | 1148 | psinfo.pr_sid = prstatus.pr_sid = process_session(current); |
1149 | if (current->pid == current->tgid) { | 1149 | if (current->pid == current->tgid) { |
1150 | /* | 1150 | /* |
1151 | * This is the record for the group leader. Add in the | 1151 | * This is the record for the group leader. Add in the |
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c index 2c82412b9efe..5929f883e46b 100644 --- a/arch/mips/kernel/kspd.c +++ b/arch/mips/kernel/kspd.c | |||
@@ -301,7 +301,7 @@ static void sp_cleanup(void) | |||
301 | for (;;) { | 301 | for (;;) { |
302 | unsigned long set; | 302 | unsigned long set; |
303 | i = j * __NFDBITS; | 303 | i = j * __NFDBITS; |
304 | if (i >= fdt->max_fdset || i >= fdt->max_fds) | 304 | if (i >= fdt->max_fds) |
305 | break; | 305 | break; |
306 | set = fdt->open_fds->fds_bits[j++]; | 306 | set = fdt->open_fds->fds_bits[j++]; |
307 | while (set) { | 307 | while (set) { |
diff --git a/arch/mips/kernel/reset.c b/arch/mips/kernel/reset.c index 621037db2290..060563a712b6 100644 --- a/arch/mips/kernel/reset.c +++ b/arch/mips/kernel/reset.c | |||
@@ -23,6 +23,8 @@ void (*_machine_restart)(char *command); | |||
23 | void (*_machine_halt)(void); | 23 | void (*_machine_halt)(void); |
24 | void (*pm_power_off)(void); | 24 | void (*pm_power_off)(void); |
25 | 25 | ||
26 | EXPORT_SYMBOL(pm_power_off); | ||
27 | |||
26 | void machine_restart(char *command) | 28 | void machine_restart(char *command) |
27 | { | 29 | { |
28 | if (_machine_restart) | 30 | if (_machine_restart) |
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c index 8c8c8324f775..5a99e3e0c96d 100644 --- a/arch/mips/kernel/rtlx.c +++ b/arch/mips/kernel/rtlx.c | |||
@@ -415,7 +415,7 @@ static unsigned int file_poll(struct file *file, poll_table * wait) | |||
415 | int minor; | 415 | int minor; |
416 | unsigned int mask = 0; | 416 | unsigned int mask = 0; |
417 | 417 | ||
418 | minor = iminor(file->f_dentry->d_inode); | 418 | minor = iminor(file->f_path.dentry->d_inode); |
419 | 419 | ||
420 | poll_wait(file, &channel_wqs[minor].rt_queue, wait); | 420 | poll_wait(file, &channel_wqs[minor].rt_queue, wait); |
421 | poll_wait(file, &channel_wqs[minor].lx_queue, wait); | 421 | poll_wait(file, &channel_wqs[minor].lx_queue, wait); |
@@ -437,7 +437,7 @@ static unsigned int file_poll(struct file *file, poll_table * wait) | |||
437 | static ssize_t file_read(struct file *file, char __user * buffer, size_t count, | 437 | static ssize_t file_read(struct file *file, char __user * buffer, size_t count, |
438 | loff_t * ppos) | 438 | loff_t * ppos) |
439 | { | 439 | { |
440 | int minor = iminor(file->f_dentry->d_inode); | 440 | int minor = iminor(file->f_path.dentry->d_inode); |
441 | 441 | ||
442 | /* data available? */ | 442 | /* data available? */ |
443 | if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1)) { | 443 | if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1)) { |
@@ -454,7 +454,7 @@ static ssize_t file_write(struct file *file, const char __user * buffer, | |||
454 | struct rtlx_channel *rt; | 454 | struct rtlx_channel *rt; |
455 | DECLARE_WAITQUEUE(wait, current); | 455 | DECLARE_WAITQUEUE(wait, current); |
456 | 456 | ||
457 | minor = iminor(file->f_dentry->d_inode); | 457 | minor = iminor(file->f_path.dentry->d_inode); |
458 | rt = &rtlx->channel[minor]; | 458 | rt = &rtlx->channel[minor]; |
459 | 459 | ||
460 | /* any space left... */ | 460 | /* any space left... */ |
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c index 93c74fefff76..6c2406a93f2b 100644 --- a/arch/mips/kernel/sysirix.c +++ b/arch/mips/kernel/sysirix.c | |||
@@ -732,7 +732,7 @@ asmlinkage int irix_fstatfs(unsigned int fd, struct irix_statfs __user *buf) | |||
732 | goto out; | 732 | goto out; |
733 | } | 733 | } |
734 | 734 | ||
735 | error = vfs_statfs(file->f_dentry, &kbuf); | 735 | error = vfs_statfs(file->f_path.dentry, &kbuf); |
736 | if (error) | 736 | if (error) |
737 | goto out_f; | 737 | goto out_f; |
738 | 738 | ||
@@ -1041,7 +1041,7 @@ asmlinkage unsigned long irix_mmap32(unsigned long addr, size_t len, int prot, | |||
1041 | unsigned long old_pos; | 1041 | unsigned long old_pos; |
1042 | long max_size = offset + len; | 1042 | long max_size = offset + len; |
1043 | 1043 | ||
1044 | if (max_size > file->f_dentry->d_inode->i_size) { | 1044 | if (max_size > file->f_path.dentry->d_inode->i_size) { |
1045 | old_pos = sys_lseek (fd, max_size - 1, 0); | 1045 | old_pos = sys_lseek (fd, max_size - 1, 0); |
1046 | sys_write (fd, (void __user *) "", 1); | 1046 | sys_write (fd, (void __user *) "", 1); |
1047 | sys_lseek (fd, old_pos, 0); | 1047 | sys_lseek (fd, old_pos, 0); |
@@ -1406,7 +1406,7 @@ asmlinkage int irix_fstatvfs(int fd, struct irix_statvfs __user *buf) | |||
1406 | error = -EBADF; | 1406 | error = -EBADF; |
1407 | goto out; | 1407 | goto out; |
1408 | } | 1408 | } |
1409 | error = vfs_statfs(file->f_dentry, &kbuf); | 1409 | error = vfs_statfs(file->f_path.dentry, &kbuf); |
1410 | if (error) | 1410 | if (error) |
1411 | goto out_f; | 1411 | goto out_f; |
1412 | 1412 | ||
@@ -1526,7 +1526,7 @@ asmlinkage int irix_mmap64(struct pt_regs *regs) | |||
1526 | unsigned long old_pos; | 1526 | unsigned long old_pos; |
1527 | long max_size = off2 + len; | 1527 | long max_size = off2 + len; |
1528 | 1528 | ||
1529 | if (max_size > file->f_dentry->d_inode->i_size) { | 1529 | if (max_size > file->f_path.dentry->d_inode->i_size) { |
1530 | old_pos = sys_lseek (fd, max_size - 1, 0); | 1530 | old_pos = sys_lseek (fd, max_size - 1, 0); |
1531 | sys_write (fd, (void __user *) "", 1); | 1531 | sys_write (fd, (void __user *) "", 1); |
1532 | sys_lseek (fd, old_pos, 0); | 1532 | sys_lseek (fd, old_pos, 0); |
@@ -1658,7 +1658,7 @@ asmlinkage int irix_fstatvfs64(int fd, struct irix_statvfs __user *buf) | |||
1658 | error = -EBADF; | 1658 | error = -EBADF; |
1659 | goto out; | 1659 | goto out; |
1660 | } | 1660 | } |
1661 | error = vfs_statfs(file->f_dentry, &kbuf); | 1661 | error = vfs_statfs(file->f_path.dentry, &kbuf); |
1662 | if (error) | 1662 | if (error) |
1663 | goto out_f; | 1663 | goto out_f; |
1664 | 1664 | ||
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 79f0317d84ac..cecff24cc972 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -112,6 +112,7 @@ SECTIONS | |||
112 | /* .exit.text is discarded at runtime, not link time, to deal with | 112 | /* .exit.text is discarded at runtime, not link time, to deal with |
113 | references from .rodata */ | 113 | references from .rodata */ |
114 | .exit.text : { *(.exit.text) } | 114 | .exit.text : { *(.exit.text) } |
115 | .exit.data : { *(.exit.data) } | ||
115 | . = ALIGN(_PAGE_SIZE); | 116 | . = ALIGN(_PAGE_SIZE); |
116 | __initramfs_start = .; | 117 | __initramfs_start = .; |
117 | .init.ramfs : { *(.init.ramfs) } | 118 | .init.ramfs : { *(.init.ramfs) } |
@@ -139,7 +140,6 @@ SECTIONS | |||
139 | 140 | ||
140 | /* Sections to be discarded */ | 141 | /* Sections to be discarded */ |
141 | /DISCARD/ : { | 142 | /DISCARD/ : { |
142 | *(.exit.data) | ||
143 | *(.exitcall.exit) | 143 | *(.exitcall.exit) |
144 | 144 | ||
145 | /* ABI crap starts here */ | 145 | /* ABI crap starts here */ |
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index 51ddd2166898..666bef484dcb 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
@@ -1179,7 +1179,7 @@ static ssize_t vpe_write(struct file *file, const char __user * buffer, | |||
1179 | size_t ret = count; | 1179 | size_t ret = count; |
1180 | struct vpe *v; | 1180 | struct vpe *v; |
1181 | 1181 | ||
1182 | minor = iminor(file->f_dentry->d_inode); | 1182 | minor = iminor(file->f_path.dentry->d_inode); |
1183 | if ((v = get_vpe(minor)) == NULL) | 1183 | if ((v = get_vpe(minor)) == NULL) |
1184 | return -ENODEV; | 1184 | return -ENODEV; |
1185 | 1185 | ||
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c index 6dd7ae1b7c25..12878359f2c8 100644 --- a/arch/mips/lasat/sysctl.c +++ b/arch/mips/lasat/sysctl.c | |||
@@ -40,12 +40,12 @@ static DEFINE_MUTEX(lasat_info_mutex); | |||
40 | /* Strategy function to write EEPROM after changing string entry */ | 40 | /* Strategy function to write EEPROM after changing string entry */ |
41 | int sysctl_lasatstring(ctl_table *table, int *name, int nlen, | 41 | int sysctl_lasatstring(ctl_table *table, int *name, int nlen, |
42 | void *oldval, size_t *oldlenp, | 42 | void *oldval, size_t *oldlenp, |
43 | void *newval, size_t newlen, void **context) | 43 | void *newval, size_t newlen) |
44 | { | 44 | { |
45 | int r; | 45 | int r; |
46 | mutex_lock(&lasat_info_mutex); | 46 | mutex_lock(&lasat_info_mutex); |
47 | r = sysctl_string(table, name, | 47 | r = sysctl_string(table, name, |
48 | nlen, oldval, oldlenp, newval, newlen, context); | 48 | nlen, oldval, oldlenp, newval, newlen); |
49 | if (r < 0) { | 49 | if (r < 0) { |
50 | mutex_unlock(&lasat_info_mutex); | 50 | mutex_unlock(&lasat_info_mutex); |
51 | return r; | 51 | return r; |
@@ -119,11 +119,11 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, | |||
119 | /* Sysctl for setting the IP addresses */ | 119 | /* Sysctl for setting the IP addresses */ |
120 | int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, | 120 | int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, |
121 | void *oldval, size_t *oldlenp, | 121 | void *oldval, size_t *oldlenp, |
122 | void *newval, size_t newlen, void **context) | 122 | void *newval, size_t newlen) |
123 | { | 123 | { |
124 | int r; | 124 | int r; |
125 | mutex_lock(&lasat_info_mutex); | 125 | mutex_lock(&lasat_info_mutex); |
126 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen, context); | 126 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); |
127 | if (r < 0) { | 127 | if (r < 0) { |
128 | mutex_unlock(&lasat_info_mutex); | 128 | mutex_unlock(&lasat_info_mutex); |
129 | return r; | 129 | return r; |
@@ -139,14 +139,14 @@ int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, | |||
139 | /* Same for RTC */ | 139 | /* Same for RTC */ |
140 | int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen, | 140 | int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen, |
141 | void *oldval, size_t *oldlenp, | 141 | void *oldval, size_t *oldlenp, |
142 | void *newval, size_t newlen, void **context) | 142 | void *newval, size_t newlen) |
143 | { | 143 | { |
144 | int r; | 144 | int r; |
145 | mutex_lock(&lasat_info_mutex); | 145 | mutex_lock(&lasat_info_mutex); |
146 | rtctmp = ds1603_read(); | 146 | rtctmp = ds1603_read(); |
147 | if (rtctmp < 0) | 147 | if (rtctmp < 0) |
148 | rtctmp = 0; | 148 | rtctmp = 0; |
149 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen, context); | 149 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); |
150 | if (r < 0) { | 150 | if (r < 0) { |
151 | mutex_unlock(&lasat_info_mutex); | 151 | mutex_unlock(&lasat_info_mutex); |
152 | return r; | 152 | return r; |
@@ -251,13 +251,12 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp, | |||
251 | 251 | ||
252 | static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen, | 252 | static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen, |
253 | void *oldval, size_t *oldlenp, | 253 | void *oldval, size_t *oldlenp, |
254 | void *newval, size_t newlen, | 254 | void *newval, size_t newlen) |
255 | void **context) | ||
256 | { | 255 | { |
257 | int r; | 256 | int r; |
258 | 257 | ||
259 | mutex_lock(&lasat_info_mutex); | 258 | mutex_lock(&lasat_info_mutex); |
260 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen, context); | 259 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); |
261 | if (r < 0) { | 260 | if (r < 0) { |
262 | mutex_unlock(&lasat_info_mutex); | 261 | mutex_unlock(&lasat_info_mutex); |
263 | return r; | 262 | return r; |
@@ -286,11 +285,11 @@ int proc_lasat_eeprom_value(ctl_table *table, int write, struct file *filp, | |||
286 | mutex_unlock(&lasat_info_mutex); | 285 | mutex_unlock(&lasat_info_mutex); |
287 | return r; | 286 | return r; |
288 | } | 287 | } |
289 | if (filp && filp->f_dentry) | 288 | if (filp && filp->f_path.dentry) |
290 | { | 289 | { |
291 | if (!strcmp(filp->f_dentry->d_name.name, "prid")) | 290 | if (!strcmp(filp->f_path.dentry->d_name.name, "prid")) |
292 | lasat_board_info.li_eeprom_info.prid = lasat_board_info.li_prid; | 291 | lasat_board_info.li_eeprom_info.prid = lasat_board_info.li_prid; |
293 | if (!strcmp(filp->f_dentry->d_name.name, "debugaccess")) | 292 | if (!strcmp(filp->f_path.dentry->d_name.name, "debugaccess")) |
294 | lasat_board_info.li_eeprom_info.debugaccess = lasat_board_info.li_debugaccess; | 293 | lasat_board_info.li_eeprom_info.debugaccess = lasat_board_info.li_debugaccess; |
295 | } | 294 | } |
296 | lasat_write_eeprom_info(); | 295 | lasat_write_eeprom_info(); |
diff --git a/arch/mips/lib/csum_partial.S b/arch/mips/lib/csum_partial.S index 15611d9df7ac..9db357294be1 100644 --- a/arch/mips/lib/csum_partial.S +++ b/arch/mips/lib/csum_partial.S | |||
@@ -12,43 +12,66 @@ | |||
12 | #include <asm/regdef.h> | 12 | #include <asm/regdef.h> |
13 | 13 | ||
14 | #ifdef CONFIG_64BIT | 14 | #ifdef CONFIG_64BIT |
15 | #define T0 ta0 | 15 | /* |
16 | #define T1 ta1 | 16 | * As we are sharing code base with the mips32 tree (which use the o32 ABI |
17 | #define T2 ta2 | 17 | * register definitions). We need to redefine the register definitions from |
18 | #define T3 ta3 | 18 | * the n64 ABI register naming to the o32 ABI register naming. |
19 | #define T4 t0 | 19 | */ |
20 | #define T7 t3 | 20 | #undef t0 |
21 | #else | 21 | #undef t1 |
22 | #define T0 t0 | 22 | #undef t2 |
23 | #define T1 t1 | 23 | #undef t3 |
24 | #define T2 t2 | 24 | #define t0 $8 |
25 | #define T3 t3 | 25 | #define t1 $9 |
26 | #define T4 t4 | 26 | #define t2 $10 |
27 | #define T7 t7 | 27 | #define t3 $11 |
28 | #define t4 $12 | ||
29 | #define t5 $13 | ||
30 | #define t6 $14 | ||
31 | #define t7 $15 | ||
32 | |||
33 | #define USE_DOUBLE | ||
28 | #endif | 34 | #endif |
29 | 35 | ||
36 | #ifdef USE_DOUBLE | ||
37 | |||
38 | #define LOAD ld | ||
39 | #define ADD daddu | ||
40 | #define NBYTES 8 | ||
41 | |||
42 | #else | ||
43 | |||
44 | #define LOAD lw | ||
45 | #define ADD addu | ||
46 | #define NBYTES 4 | ||
47 | |||
48 | #endif /* USE_DOUBLE */ | ||
49 | |||
50 | #define UNIT(unit) ((unit)*NBYTES) | ||
51 | |||
30 | #define ADDC(sum,reg) \ | 52 | #define ADDC(sum,reg) \ |
31 | addu sum, reg; \ | 53 | ADD sum, reg; \ |
32 | sltu v1, sum, reg; \ | 54 | sltu v1, sum, reg; \ |
33 | addu sum, v1 | 55 | ADD sum, v1 |
34 | 56 | ||
35 | #define CSUM_BIGCHUNK(src, offset, sum, _t0, _t1, _t2, _t3) \ | 57 | #define CSUM_BIGCHUNK1(src, offset, sum, _t0, _t1, _t2, _t3) \ |
36 | lw _t0, (offset + 0x00)(src); \ | 58 | LOAD _t0, (offset + UNIT(0))(src); \ |
37 | lw _t1, (offset + 0x04)(src); \ | 59 | LOAD _t1, (offset + UNIT(1))(src); \ |
38 | lw _t2, (offset + 0x08)(src); \ | 60 | LOAD _t2, (offset + UNIT(2))(src); \ |
39 | lw _t3, (offset + 0x0c)(src); \ | 61 | LOAD _t3, (offset + UNIT(3))(src); \ |
40 | ADDC(sum, _t0); \ | ||
41 | ADDC(sum, _t1); \ | ||
42 | ADDC(sum, _t2); \ | ||
43 | ADDC(sum, _t3); \ | ||
44 | lw _t0, (offset + 0x10)(src); \ | ||
45 | lw _t1, (offset + 0x14)(src); \ | ||
46 | lw _t2, (offset + 0x18)(src); \ | ||
47 | lw _t3, (offset + 0x1c)(src); \ | ||
48 | ADDC(sum, _t0); \ | 62 | ADDC(sum, _t0); \ |
49 | ADDC(sum, _t1); \ | 63 | ADDC(sum, _t1); \ |
50 | ADDC(sum, _t2); \ | 64 | ADDC(sum, _t2); \ |
51 | ADDC(sum, _t3); \ | 65 | ADDC(sum, _t3) |
66 | |||
67 | #ifdef USE_DOUBLE | ||
68 | #define CSUM_BIGCHUNK(src, offset, sum, _t0, _t1, _t2, _t3) \ | ||
69 | CSUM_BIGCHUNK1(src, offset, sum, _t0, _t1, _t2, _t3) | ||
70 | #else | ||
71 | #define CSUM_BIGCHUNK(src, offset, sum, _t0, _t1, _t2, _t3) \ | ||
72 | CSUM_BIGCHUNK1(src, offset, sum, _t0, _t1, _t2, _t3); \ | ||
73 | CSUM_BIGCHUNK1(src, offset + 0x10, sum, _t0, _t1, _t2, _t3) | ||
74 | #endif | ||
52 | 75 | ||
53 | /* | 76 | /* |
54 | * a0: source address | 77 | * a0: source address |
@@ -61,86 +84,27 @@ | |||
61 | 84 | ||
62 | .text | 85 | .text |
63 | .set noreorder | 86 | .set noreorder |
64 | |||
65 | /* unknown src alignment and < 8 bytes to go */ | ||
66 | small_csumcpy: | ||
67 | move a1, T2 | ||
68 | |||
69 | andi T0, a1, 4 | ||
70 | beqz T0, 1f | ||
71 | andi T0, a1, 2 | ||
72 | |||
73 | /* Still a full word to go */ | ||
74 | ulw T1, (src) | ||
75 | PTR_ADDIU src, 4 | ||
76 | ADDC(sum, T1) | ||
77 | |||
78 | 1: move T1, zero | ||
79 | beqz T0, 1f | ||
80 | andi T0, a1, 1 | ||
81 | |||
82 | /* Still a halfword to go */ | ||
83 | ulhu T1, (src) | ||
84 | PTR_ADDIU src, 2 | ||
85 | |||
86 | 1: beqz T0, 1f | ||
87 | sll T1, T1, 16 | ||
88 | |||
89 | lbu T2, (src) | ||
90 | nop | ||
91 | |||
92 | #ifdef __MIPSEB__ | ||
93 | sll T2, T2, 8 | ||
94 | #endif | ||
95 | or T1, T2 | ||
96 | |||
97 | 1: ADDC(sum, T1) | ||
98 | |||
99 | /* fold checksum */ | ||
100 | sll v1, sum, 16 | ||
101 | addu sum, v1 | ||
102 | sltu v1, sum, v1 | ||
103 | srl sum, sum, 16 | ||
104 | addu sum, v1 | ||
105 | |||
106 | /* odd buffer alignment? */ | ||
107 | beqz T7, 1f | ||
108 | nop | ||
109 | sll v1, sum, 8 | ||
110 | srl sum, sum, 8 | ||
111 | or sum, v1 | ||
112 | andi sum, 0xffff | ||
113 | 1: | ||
114 | .set reorder | ||
115 | /* Add the passed partial csum. */ | ||
116 | ADDC(sum, a2) | ||
117 | jr ra | ||
118 | .set noreorder | ||
119 | |||
120 | /* ------------------------------------------------------------------------- */ | ||
121 | |||
122 | .align 5 | 87 | .align 5 |
123 | LEAF(csum_partial) | 88 | LEAF(csum_partial) |
124 | move sum, zero | 89 | move sum, zero |
125 | move T7, zero | 90 | move t7, zero |
126 | 91 | ||
127 | sltiu t8, a1, 0x8 | 92 | sltiu t8, a1, 0x8 |
128 | bnez t8, small_csumcpy /* < 8 bytes to copy */ | 93 | bnez t8, small_csumcpy /* < 8 bytes to copy */ |
129 | move T2, a1 | 94 | move t2, a1 |
130 | 95 | ||
131 | beqz a1, out | 96 | andi t7, src, 0x1 /* odd buffer? */ |
132 | andi T7, src, 0x1 /* odd buffer? */ | ||
133 | 97 | ||
134 | hword_align: | 98 | hword_align: |
135 | beqz T7, word_align | 99 | beqz t7, word_align |
136 | andi t8, src, 0x2 | 100 | andi t8, src, 0x2 |
137 | 101 | ||
138 | lbu T0, (src) | 102 | lbu t0, (src) |
139 | LONG_SUBU a1, a1, 0x1 | 103 | LONG_SUBU a1, a1, 0x1 |
140 | #ifdef __MIPSEL__ | 104 | #ifdef __MIPSEL__ |
141 | sll T0, T0, 8 | 105 | sll t0, t0, 8 |
142 | #endif | 106 | #endif |
143 | ADDC(sum, T0) | 107 | ADDC(sum, t0) |
144 | PTR_ADDU src, src, 0x1 | 108 | PTR_ADDU src, src, 0x1 |
145 | andi t8, src, 0x2 | 109 | andi t8, src, 0x2 |
146 | 110 | ||
@@ -148,9 +112,9 @@ word_align: | |||
148 | beqz t8, dword_align | 112 | beqz t8, dword_align |
149 | sltiu t8, a1, 56 | 113 | sltiu t8, a1, 56 |
150 | 114 | ||
151 | lhu T0, (src) | 115 | lhu t0, (src) |
152 | LONG_SUBU a1, a1, 0x2 | 116 | LONG_SUBU a1, a1, 0x2 |
153 | ADDC(sum, T0) | 117 | ADDC(sum, t0) |
154 | sltiu t8, a1, 56 | 118 | sltiu t8, a1, 56 |
155 | PTR_ADDU src, src, 0x2 | 119 | PTR_ADDU src, src, 0x2 |
156 | 120 | ||
@@ -162,9 +126,9 @@ dword_align: | |||
162 | beqz t8, qword_align | 126 | beqz t8, qword_align |
163 | andi t8, src, 0x8 | 127 | andi t8, src, 0x8 |
164 | 128 | ||
165 | lw T0, 0x00(src) | 129 | lw t0, 0x00(src) |
166 | LONG_SUBU a1, a1, 0x4 | 130 | LONG_SUBU a1, a1, 0x4 |
167 | ADDC(sum, T0) | 131 | ADDC(sum, t0) |
168 | PTR_ADDU src, src, 0x4 | 132 | PTR_ADDU src, src, 0x4 |
169 | andi t8, src, 0x8 | 133 | andi t8, src, 0x8 |
170 | 134 | ||
@@ -172,11 +136,17 @@ qword_align: | |||
172 | beqz t8, oword_align | 136 | beqz t8, oword_align |
173 | andi t8, src, 0x10 | 137 | andi t8, src, 0x10 |
174 | 138 | ||
175 | lw T0, 0x00(src) | 139 | #ifdef USE_DOUBLE |
176 | lw T1, 0x04(src) | 140 | ld t0, 0x00(src) |
141 | LONG_SUBU a1, a1, 0x8 | ||
142 | ADDC(sum, t0) | ||
143 | #else | ||
144 | lw t0, 0x00(src) | ||
145 | lw t1, 0x04(src) | ||
177 | LONG_SUBU a1, a1, 0x8 | 146 | LONG_SUBU a1, a1, 0x8 |
178 | ADDC(sum, T0) | 147 | ADDC(sum, t0) |
179 | ADDC(sum, T1) | 148 | ADDC(sum, t1) |
149 | #endif | ||
180 | PTR_ADDU src, src, 0x8 | 150 | PTR_ADDU src, src, 0x8 |
181 | andi t8, src, 0x10 | 151 | andi t8, src, 0x10 |
182 | 152 | ||
@@ -184,75 +154,120 @@ oword_align: | |||
184 | beqz t8, begin_movement | 154 | beqz t8, begin_movement |
185 | LONG_SRL t8, a1, 0x7 | 155 | LONG_SRL t8, a1, 0x7 |
186 | 156 | ||
187 | lw T3, 0x08(src) | 157 | #ifdef USE_DOUBLE |
188 | lw T4, 0x0c(src) | 158 | ld t0, 0x00(src) |
189 | lw T0, 0x00(src) | 159 | ld t1, 0x08(src) |
190 | lw T1, 0x04(src) | 160 | ADDC(sum, t0) |
191 | ADDC(sum, T3) | 161 | ADDC(sum, t1) |
192 | ADDC(sum, T4) | 162 | #else |
193 | ADDC(sum, T0) | 163 | CSUM_BIGCHUNK1(src, 0x00, sum, t0, t1, t3, t4) |
194 | ADDC(sum, T1) | 164 | #endif |
195 | LONG_SUBU a1, a1, 0x10 | 165 | LONG_SUBU a1, a1, 0x10 |
196 | PTR_ADDU src, src, 0x10 | 166 | PTR_ADDU src, src, 0x10 |
197 | LONG_SRL t8, a1, 0x7 | 167 | LONG_SRL t8, a1, 0x7 |
198 | 168 | ||
199 | begin_movement: | 169 | begin_movement: |
200 | beqz t8, 1f | 170 | beqz t8, 1f |
201 | andi T2, a1, 0x40 | 171 | andi t2, a1, 0x40 |
202 | 172 | ||
203 | move_128bytes: | 173 | move_128bytes: |
204 | CSUM_BIGCHUNK(src, 0x00, sum, T0, T1, T3, T4) | 174 | CSUM_BIGCHUNK(src, 0x00, sum, t0, t1, t3, t4) |
205 | CSUM_BIGCHUNK(src, 0x20, sum, T0, T1, T3, T4) | 175 | CSUM_BIGCHUNK(src, 0x20, sum, t0, t1, t3, t4) |
206 | CSUM_BIGCHUNK(src, 0x40, sum, T0, T1, T3, T4) | 176 | CSUM_BIGCHUNK(src, 0x40, sum, t0, t1, t3, t4) |
207 | CSUM_BIGCHUNK(src, 0x60, sum, T0, T1, T3, T4) | 177 | CSUM_BIGCHUNK(src, 0x60, sum, t0, t1, t3, t4) |
208 | LONG_SUBU t8, t8, 0x01 | 178 | LONG_SUBU t8, t8, 0x01 |
209 | bnez t8, move_128bytes | 179 | bnez t8, move_128bytes |
210 | PTR_ADDU src, src, 0x80 | 180 | PTR_ADDU src, src, 0x80 |
211 | 181 | ||
212 | 1: | 182 | 1: |
213 | beqz T2, 1f | 183 | beqz t2, 1f |
214 | andi T2, a1, 0x20 | 184 | andi t2, a1, 0x20 |
215 | 185 | ||
216 | move_64bytes: | 186 | move_64bytes: |
217 | CSUM_BIGCHUNK(src, 0x00, sum, T0, T1, T3, T4) | 187 | CSUM_BIGCHUNK(src, 0x00, sum, t0, t1, t3, t4) |
218 | CSUM_BIGCHUNK(src, 0x20, sum, T0, T1, T3, T4) | 188 | CSUM_BIGCHUNK(src, 0x20, sum, t0, t1, t3, t4) |
219 | PTR_ADDU src, src, 0x40 | 189 | PTR_ADDU src, src, 0x40 |
220 | 190 | ||
221 | 1: | 191 | 1: |
222 | beqz T2, do_end_words | 192 | beqz t2, do_end_words |
223 | andi t8, a1, 0x1c | 193 | andi t8, a1, 0x1c |
224 | 194 | ||
225 | move_32bytes: | 195 | move_32bytes: |
226 | CSUM_BIGCHUNK(src, 0x00, sum, T0, T1, T3, T4) | 196 | CSUM_BIGCHUNK(src, 0x00, sum, t0, t1, t3, t4) |
227 | andi t8, a1, 0x1c | 197 | andi t8, a1, 0x1c |
228 | PTR_ADDU src, src, 0x20 | 198 | PTR_ADDU src, src, 0x20 |
229 | 199 | ||
230 | do_end_words: | 200 | do_end_words: |
231 | beqz t8, maybe_end_cruft | 201 | beqz t8, small_csumcpy |
232 | LONG_SRL t8, t8, 0x2 | 202 | andi t2, a1, 0x3 |
203 | LONG_SRL t8, t8, 0x2 | ||
233 | 204 | ||
234 | end_words: | 205 | end_words: |
235 | lw T0, (src) | 206 | lw t0, (src) |
236 | LONG_SUBU t8, t8, 0x1 | 207 | LONG_SUBU t8, t8, 0x1 |
237 | ADDC(sum, T0) | 208 | ADDC(sum, t0) |
238 | bnez t8, end_words | 209 | bnez t8, end_words |
239 | PTR_ADDU src, src, 0x4 | 210 | PTR_ADDU src, src, 0x4 |
240 | 211 | ||
241 | maybe_end_cruft: | 212 | /* unknown src alignment and < 8 bytes to go */ |
242 | andi T2, a1, 0x3 | 213 | small_csumcpy: |
214 | move a1, t2 | ||
243 | 215 | ||
244 | small_memcpy: | 216 | andi t0, a1, 4 |
245 | j small_csumcpy; move a1, T2 /* XXX ??? */ | 217 | beqz t0, 1f |
246 | beqz t2, out | 218 | andi t0, a1, 2 |
247 | move a1, T2 | ||
248 | 219 | ||
249 | end_bytes: | 220 | /* Still a full word to go */ |
250 | lb T0, (src) | 221 | ulw t1, (src) |
251 | LONG_SUBU a1, a1, 0x1 | 222 | PTR_ADDIU src, 4 |
252 | bnez a2, end_bytes | 223 | ADDC(sum, t1) |
253 | PTR_ADDU src, src, 0x1 | 224 | |
225 | 1: move t1, zero | ||
226 | beqz t0, 1f | ||
227 | andi t0, a1, 1 | ||
228 | |||
229 | /* Still a halfword to go */ | ||
230 | ulhu t1, (src) | ||
231 | PTR_ADDIU src, 2 | ||
232 | |||
233 | 1: beqz t0, 1f | ||
234 | sll t1, t1, 16 | ||
235 | |||
236 | lbu t2, (src) | ||
237 | nop | ||
254 | 238 | ||
255 | out: | 239 | #ifdef __MIPSEB__ |
240 | sll t2, t2, 8 | ||
241 | #endif | ||
242 | or t1, t2 | ||
243 | |||
244 | 1: ADDC(sum, t1) | ||
245 | |||
246 | /* fold checksum */ | ||
247 | #ifdef USE_DOUBLE | ||
248 | dsll32 v1, sum, 0 | ||
249 | daddu sum, v1 | ||
250 | sltu v1, sum, v1 | ||
251 | dsra32 sum, sum, 0 | ||
252 | addu sum, v1 | ||
253 | #endif | ||
254 | sll v1, sum, 16 | ||
255 | addu sum, v1 | ||
256 | sltu v1, sum, v1 | ||
257 | srl sum, sum, 16 | ||
258 | addu sum, v1 | ||
259 | |||
260 | /* odd buffer alignment? */ | ||
261 | beqz t7, 1f | ||
262 | nop | ||
263 | sll v1, sum, 8 | ||
264 | srl sum, sum, 8 | ||
265 | or sum, v1 | ||
266 | andi sum, 0xffff | ||
267 | 1: | ||
268 | .set reorder | ||
269 | /* Add the passed partial csum. */ | ||
270 | ADDC(sum, a2) | ||
256 | jr ra | 271 | jr ra |
257 | move v0, sum | 272 | .set noreorder |
258 | END(csum_partial) | 273 | END(csum_partial) |
diff --git a/arch/mips/lib/csum_partial_copy.c b/arch/mips/lib/csum_partial_copy.c index 1720f2ceeeae..06771040a267 100644 --- a/arch/mips/lib/csum_partial_copy.c +++ b/arch/mips/lib/csum_partial_copy.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Copyright (C) 1998, 1999 Ralf Baechle | 7 | * Copyright (C) 1998, 1999 Ralf Baechle |
8 | */ | 8 | */ |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/module.h> | ||
10 | #include <linux/types.h> | 11 | #include <linux/types.h> |
11 | #include <asm/byteorder.h> | 12 | #include <asm/byteorder.h> |
12 | #include <asm/string.h> | 13 | #include <asm/string.h> |
@@ -29,6 +30,8 @@ __wsum csum_partial_copy_nocheck(const void *src, | |||
29 | return sum; | 30 | return sum; |
30 | } | 31 | } |
31 | 32 | ||
33 | EXPORT_SYMBOL(csum_partial_copy_nocheck); | ||
34 | |||
32 | /* | 35 | /* |
33 | * Copy from userspace and compute checksum. If we catch an exception | 36 | * Copy from userspace and compute checksum. If we catch an exception |
34 | * then zero the rest of the buffer. | 37 | * then zero the rest of the buffer. |
diff --git a/arch/mips/mips-boards/malta/Makefile b/arch/mips/mips-boards/malta/Makefile index 77ee5c6d33c1..b662c75fb28e 100644 --- a/arch/mips/mips-boards/malta/Makefile +++ b/arch/mips/mips-boards/malta/Makefile | |||
@@ -19,5 +19,5 @@ | |||
19 | # under Linux. | 19 | # under Linux. |
20 | # | 20 | # |
21 | 21 | ||
22 | obj-y := malta_int.o malta_setup.o | 22 | obj-y := malta_int.o malta_mtd.o malta_setup.o |
23 | obj-$(CONFIG_SMP) += malta_smp.o | 23 | obj-$(CONFIG_SMP) += malta_smp.o |
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index 282f3e52eea3..56ea76679cd4 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c | |||
@@ -21,13 +21,6 @@ | |||
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/screen_info.h> | 22 | #include <linux/screen_info.h> |
23 | 23 | ||
24 | #ifdef CONFIG_MTD | ||
25 | #include <linux/mtd/partitions.h> | ||
26 | #include <linux/mtd/physmap.h> | ||
27 | #include <linux/mtd/mtd.h> | ||
28 | #include <linux/mtd/map.h> | ||
29 | #endif | ||
30 | |||
31 | #include <asm/cpu.h> | 24 | #include <asm/cpu.h> |
32 | #include <asm/bootinfo.h> | 25 | #include <asm/bootinfo.h> |
33 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
@@ -58,30 +51,6 @@ struct resource standard_io_resources[] = { | |||
58 | { .name = "dma2", .start = 0xc0, .end = 0xdf, .flags = IORESOURCE_BUSY }, | 51 | { .name = "dma2", .start = 0xc0, .end = 0xdf, .flags = IORESOURCE_BUSY }, |
59 | }; | 52 | }; |
60 | 53 | ||
61 | #ifdef CONFIG_MTD | ||
62 | static struct mtd_partition malta_mtd_partitions[] = { | ||
63 | { | ||
64 | .name = "YAMON", | ||
65 | .offset = 0x0, | ||
66 | .size = 0x100000, | ||
67 | .mask_flags = MTD_WRITEABLE | ||
68 | }, | ||
69 | { | ||
70 | .name = "User FS", | ||
71 | .offset = 0x100000, | ||
72 | .size = 0x2e0000 | ||
73 | }, | ||
74 | { | ||
75 | .name = "Board Config", | ||
76 | .offset = 0x3e0000, | ||
77 | .size = 0x020000, | ||
78 | .mask_flags = MTD_WRITEABLE | ||
79 | } | ||
80 | }; | ||
81 | |||
82 | #define number_partitions (sizeof(malta_mtd_partitions)/sizeof(struct mtd_partition)) | ||
83 | #endif | ||
84 | |||
85 | const char *get_system_type(void) | 54 | const char *get_system_type(void) |
86 | { | 55 | { |
87 | return "MIPS Malta"; | 56 | return "MIPS Malta"; |
@@ -211,14 +180,6 @@ void __init plat_mem_setup(void) | |||
211 | #endif | 180 | #endif |
212 | #endif | 181 | #endif |
213 | 182 | ||
214 | #ifdef CONFIG_MTD | ||
215 | /* | ||
216 | * Support for MTD on Malta. Use the generic physmap driver | ||
217 | */ | ||
218 | physmap_configure(0x1e000000, 0x400000, 4, NULL); | ||
219 | physmap_set_partitions(malta_mtd_partitions, number_partitions); | ||
220 | #endif | ||
221 | |||
222 | mips_reboot_setup(); | 183 | mips_reboot_setup(); |
223 | 184 | ||
224 | board_time_init = mips_time_init; | 185 | board_time_init = mips_time_init; |
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index caf807ded514..1f954a238a63 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c | |||
@@ -32,6 +32,7 @@ void (*local_flush_data_cache_page)(void * addr); | |||
32 | void (*flush_data_cache_page)(unsigned long addr); | 32 | void (*flush_data_cache_page)(unsigned long addr); |
33 | void (*flush_icache_all)(void); | 33 | void (*flush_icache_all)(void); |
34 | 34 | ||
35 | EXPORT_SYMBOL_GPL(local_flush_data_cache_page); | ||
35 | EXPORT_SYMBOL(flush_data_cache_page); | 36 | EXPORT_SYMBOL(flush_data_cache_page); |
36 | 37 | ||
37 | #ifdef CONFIG_DMA_NONCOHERENT | 38 | #ifdef CONFIG_DMA_NONCOHERENT |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 9e29ba9205f0..ea2d15370bb7 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -316,7 +316,7 @@ static int __init page_is_ram(unsigned long pagenr) | |||
316 | void __init paging_init(void) | 316 | void __init paging_init(void) |
317 | { | 317 | { |
318 | unsigned long zones_size[MAX_NR_ZONES] = { 0, }; | 318 | unsigned long zones_size[MAX_NR_ZONES] = { 0, }; |
319 | unsigned long max_dma, high, low; | 319 | unsigned long max_dma, low; |
320 | #ifndef CONFIG_FLATMEM | 320 | #ifndef CONFIG_FLATMEM |
321 | unsigned long zholes_size[MAX_NR_ZONES] = { 0, }; | 321 | unsigned long zholes_size[MAX_NR_ZONES] = { 0, }; |
322 | unsigned long i, j, pfn; | 322 | unsigned long i, j, pfn; |
@@ -331,7 +331,6 @@ void __init paging_init(void) | |||
331 | 331 | ||
332 | max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; | 332 | max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; |
333 | low = max_low_pfn; | 333 | low = max_low_pfn; |
334 | high = highend_pfn; | ||
335 | 334 | ||
336 | #ifdef CONFIG_ISA | 335 | #ifdef CONFIG_ISA |
337 | if (low < max_dma) | 336 | if (low < max_dma) |
@@ -344,13 +343,13 @@ void __init paging_init(void) | |||
344 | zones_size[ZONE_DMA] = low; | 343 | zones_size[ZONE_DMA] = low; |
345 | #endif | 344 | #endif |
346 | #ifdef CONFIG_HIGHMEM | 345 | #ifdef CONFIG_HIGHMEM |
347 | if (cpu_has_dc_aliases) { | 346 | zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn; |
348 | printk(KERN_WARNING "This processor doesn't support highmem."); | 347 | |
349 | if (high - low) | 348 | if (cpu_has_dc_aliases && zones_size[ZONE_HIGHMEM]) { |
350 | printk(" %ldk highmem ignored", high - low); | 349 | printk(KERN_WARNING "This processor doesn't support highmem." |
351 | printk("\n"); | 350 | " %ldk highmem ignored\n", zones_size[ZONE_HIGHMEM]); |
352 | } else | 351 | zones_size[ZONE_HIGHMEM] = 0; |
353 | zones_size[ZONE_HIGHMEM] = high - low; | 352 | } |
354 | #endif | 353 | #endif |
355 | 354 | ||
356 | #ifdef CONFIG_FLATMEM | 355 | #ifdef CONFIG_FLATMEM |
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c index cea7d0ea36e4..fc2c96f0a1fd 100644 --- a/arch/mips/mm/ioremap.c +++ b/arch/mips/mm/ioremap.c | |||
@@ -6,98 +6,13 @@ | |||
6 | * (C) Copyright 1995 1996 Linus Torvalds | 6 | * (C) Copyright 1995 1996 Linus Torvalds |
7 | * (C) Copyright 2001, 2002 Ralf Baechle | 7 | * (C) Copyright 2001, 2002 Ralf Baechle |
8 | */ | 8 | */ |
9 | #include <linux/mm.h> | ||
9 | #include <linux/module.h> | 10 | #include <linux/module.h> |
10 | #include <asm/addrspace.h> | 11 | #include <asm/addrspace.h> |
11 | #include <asm/byteorder.h> | 12 | #include <asm/byteorder.h> |
12 | 13 | ||
13 | #include <linux/vmalloc.h> | 14 | #include <linux/vmalloc.h> |
14 | #include <asm/cacheflush.h> | 15 | #include <linux/io.h> |
15 | #include <asm/io.h> | ||
16 | #include <asm/tlbflush.h> | ||
17 | |||
18 | static inline void remap_area_pte(pte_t * pte, unsigned long address, | ||
19 | phys_t size, phys_t phys_addr, unsigned long flags) | ||
20 | { | ||
21 | phys_t end; | ||
22 | unsigned long pfn; | ||
23 | pgprot_t pgprot = __pgprot(_PAGE_GLOBAL | _PAGE_PRESENT | __READABLE | ||
24 | | __WRITEABLE | flags); | ||
25 | |||
26 | address &= ~PMD_MASK; | ||
27 | end = address + size; | ||
28 | if (end > PMD_SIZE) | ||
29 | end = PMD_SIZE; | ||
30 | if (address >= end) | ||
31 | BUG(); | ||
32 | pfn = phys_addr >> PAGE_SHIFT; | ||
33 | do { | ||
34 | if (!pte_none(*pte)) { | ||
35 | printk("remap_area_pte: page already exists\n"); | ||
36 | BUG(); | ||
37 | } | ||
38 | set_pte(pte, pfn_pte(pfn, pgprot)); | ||
39 | address += PAGE_SIZE; | ||
40 | pfn++; | ||
41 | pte++; | ||
42 | } while (address && (address < end)); | ||
43 | } | ||
44 | |||
45 | static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, | ||
46 | phys_t size, phys_t phys_addr, unsigned long flags) | ||
47 | { | ||
48 | phys_t end; | ||
49 | |||
50 | address &= ~PGDIR_MASK; | ||
51 | end = address + size; | ||
52 | if (end > PGDIR_SIZE) | ||
53 | end = PGDIR_SIZE; | ||
54 | phys_addr -= address; | ||
55 | if (address >= end) | ||
56 | BUG(); | ||
57 | do { | ||
58 | pte_t * pte = pte_alloc_kernel(pmd, address); | ||
59 | if (!pte) | ||
60 | return -ENOMEM; | ||
61 | remap_area_pte(pte, address, end - address, address + phys_addr, flags); | ||
62 | address = (address + PMD_SIZE) & PMD_MASK; | ||
63 | pmd++; | ||
64 | } while (address && (address < end)); | ||
65 | return 0; | ||
66 | } | ||
67 | |||
68 | static int remap_area_pages(unsigned long address, phys_t phys_addr, | ||
69 | phys_t size, unsigned long flags) | ||
70 | { | ||
71 | int error; | ||
72 | pgd_t * dir; | ||
73 | unsigned long end = address + size; | ||
74 | |||
75 | phys_addr -= address; | ||
76 | dir = pgd_offset(&init_mm, address); | ||
77 | flush_cache_all(); | ||
78 | if (address >= end) | ||
79 | BUG(); | ||
80 | do { | ||
81 | pud_t *pud; | ||
82 | pmd_t *pmd; | ||
83 | |||
84 | error = -ENOMEM; | ||
85 | pud = pud_alloc(&init_mm, dir, address); | ||
86 | if (!pud) | ||
87 | break; | ||
88 | pmd = pmd_alloc(&init_mm, pud, address); | ||
89 | if (!pmd) | ||
90 | break; | ||
91 | if (remap_area_pmd(pmd, address, end - address, | ||
92 | phys_addr + address, flags)) | ||
93 | break; | ||
94 | error = 0; | ||
95 | address = (address + PGDIR_SIZE) & PGDIR_MASK; | ||
96 | dir++; | ||
97 | } while (address && (address < end)); | ||
98 | flush_tlb_all(); | ||
99 | return error; | ||
100 | } | ||
101 | 16 | ||
102 | /* | 17 | /* |
103 | * Generic mapping function (not visible outside): | 18 | * Generic mapping function (not visible outside): |
@@ -121,6 +36,7 @@ void __iomem * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags) | |||
121 | unsigned long offset; | 36 | unsigned long offset; |
122 | phys_t last_addr; | 37 | phys_t last_addr; |
123 | void * addr; | 38 | void * addr; |
39 | pgprot_t pgprot; | ||
124 | 40 | ||
125 | phys_addr = fixup_bigphys_addr(phys_addr, size); | 41 | phys_addr = fixup_bigphys_addr(phys_addr, size); |
126 | 42 | ||
@@ -152,6 +68,9 @@ void __iomem * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags) | |||
152 | return NULL; | 68 | return NULL; |
153 | } | 69 | } |
154 | 70 | ||
71 | pgprot = __pgprot(_PAGE_GLOBAL | _PAGE_PRESENT | __READABLE | ||
72 | | __WRITEABLE | flags); | ||
73 | |||
155 | /* | 74 | /* |
156 | * Mappings have to be page-aligned | 75 | * Mappings have to be page-aligned |
157 | */ | 76 | */ |
@@ -166,7 +85,8 @@ void __iomem * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags) | |||
166 | if (!area) | 85 | if (!area) |
167 | return NULL; | 86 | return NULL; |
168 | addr = area->addr; | 87 | addr = area->addr; |
169 | if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { | 88 | if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, |
89 | phys_addr, pgprot)) { | ||
170 | vunmap(addr); | 90 | vunmap(addr); |
171 | return NULL; | 91 | return NULL; |
172 | } | 92 | } |
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile index 70cb55b89df6..82b20c28bef8 100644 --- a/arch/mips/pci/Makefile +++ b/arch/mips/pci/Makefile | |||
@@ -43,7 +43,7 @@ obj-$(CONFIG_SGI_IP32) += fixup-ip32.o ops-mace.o pci-ip32.o | |||
43 | obj-$(CONFIG_SIBYTE_SB1250) += fixup-sb1250.o pci-sb1250.o | 43 | obj-$(CONFIG_SIBYTE_SB1250) += fixup-sb1250.o pci-sb1250.o |
44 | obj-$(CONFIG_SIBYTE_BCM112X) += fixup-sb1250.o pci-sb1250.o | 44 | obj-$(CONFIG_SIBYTE_BCM112X) += fixup-sb1250.o pci-sb1250.o |
45 | obj-$(CONFIG_SIBYTE_BCM1x80) += pci-bcm1480.o pci-bcm1480ht.o | 45 | obj-$(CONFIG_SIBYTE_BCM1x80) += pci-bcm1480.o pci-bcm1480ht.o |
46 | obj-$(CONFIG_SNI_RM200_PCI) += fixup-sni.o ops-sni.o | 46 | obj-$(CONFIG_SNI_RM) += fixup-sni.o ops-sni.o |
47 | obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o | 47 | obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o |
48 | obj-$(CONFIG_TANBAC_TB0226) += fixup-tb0226.o | 48 | obj-$(CONFIG_TANBAC_TB0226) += fixup-tb0226.o |
49 | obj-$(CONFIG_TANBAC_TB0287) += fixup-tb0287.o | 49 | obj-$(CONFIG_TANBAC_TB0287) += fixup-tb0287.o |
diff --git a/arch/mips/pci/fixup-pnx8550.c b/arch/mips/pci/fixup-pnx8550.c index 4256b3b30b77..50546dab6689 100644 --- a/arch/mips/pci/fixup-pnx8550.c +++ b/arch/mips/pci/fixup-pnx8550.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #define DBG(x...) | 33 | #define DBG(x...) |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | extern char irq_tab_jbs[][5]; | 36 | extern char pnx8550_irq_tab[][5]; |
37 | 37 | ||
38 | void __init pcibios_fixup_resources(struct pci_dev *dev) | 38 | void __init pcibios_fixup_resources(struct pci_dev *dev) |
39 | { | 39 | { |
@@ -47,7 +47,7 @@ void __init pcibios_fixup(void) | |||
47 | 47 | ||
48 | int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 48 | int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
49 | { | 49 | { |
50 | return irq_tab_jbs[slot][pin]; | 50 | return pnx8550_irq_tab[slot][pin]; |
51 | } | 51 | } |
52 | 52 | ||
53 | /* Do platform specific device initialization at pci_enable_device() time */ | 53 | /* Do platform specific device initialization at pci_enable_device() time */ |
diff --git a/arch/mips/philips/pnx8550/common/prom.c b/arch/mips/philips/pnx8550/common/prom.c index f8952c1359cd..eb6ec11fef07 100644 --- a/arch/mips/philips/pnx8550/common/prom.c +++ b/arch/mips/philips/pnx8550/common/prom.c | |||
@@ -35,23 +35,15 @@ char * prom_getcmdline(void) | |||
35 | return &(arcs_cmdline[0]); | 35 | return &(arcs_cmdline[0]); |
36 | } | 36 | } |
37 | 37 | ||
38 | void prom_init_cmdline(void) | 38 | void __init prom_init_cmdline(void) |
39 | { | 39 | { |
40 | char *cp; | 40 | int i; |
41 | int actr; | ||
42 | |||
43 | actr = 1; /* Always ignore argv[0] */ | ||
44 | 41 | ||
45 | cp = &(arcs_cmdline[0]); | 42 | arcs_cmdline[0] = '\0'; |
46 | while(actr < prom_argc) { | 43 | for (i = 0; i < prom_argc; i++) { |
47 | strcpy(cp, prom_argv[actr]); | 44 | strcat(arcs_cmdline, prom_argv[i]); |
48 | cp += strlen(prom_argv[actr]); | 45 | strcat(arcs_cmdline, " "); |
49 | *cp++ = ' '; | ||
50 | actr++; | ||
51 | } | 46 | } |
52 | if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */ | ||
53 | --cp; | ||
54 | *cp = '\0'; | ||
55 | } | 47 | } |
56 | 48 | ||
57 | char *prom_getenv(char *envname) | 49 | char *prom_getenv(char *envname) |
diff --git a/arch/mips/philips/pnx8550/jbs/irqmap.c b/arch/mips/philips/pnx8550/jbs/irqmap.c index f78e0423dc98..98c3429e6e50 100644 --- a/arch/mips/philips/pnx8550/jbs/irqmap.c +++ b/arch/mips/philips/pnx8550/jbs/irqmap.c | |||
@@ -28,9 +28,9 @@ | |||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <int.h> | 29 | #include <int.h> |
30 | 30 | ||
31 | char irq_tab_jbs[][5] __initdata = { | 31 | char pnx8550_irq_tab[][5] __initdata = { |
32 | [8] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, | 32 | [8] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, |
33 | [9] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, | 33 | [9] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, |
34 | [17] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, | 34 | [17] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, |
35 | }; | 35 | }; |
36 | 36 | ||
diff --git a/arch/mips/philips/pnx8550/stb810/Makefile b/arch/mips/philips/pnx8550/stb810/Makefile new file mode 100644 index 000000000000..f14b592af398 --- /dev/null +++ b/arch/mips/philips/pnx8550/stb810/Makefile | |||
@@ -0,0 +1,4 @@ | |||
1 | |||
2 | # Makefile for the Philips STB810 Board. | ||
3 | |||
4 | lib-y := prom_init.o board_setup.o irqmap.o | ||
diff --git a/arch/mips/philips/pnx8550/stb810/board_setup.c b/arch/mips/philips/pnx8550/stb810/board_setup.c new file mode 100644 index 000000000000..345d71e53cf2 --- /dev/null +++ b/arch/mips/philips/pnx8550/stb810/board_setup.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * STB810 specific board startup routines. | ||
3 | * | ||
4 | * Based on the arch/mips/philips/pnx8550/jbs/board_setup.c | ||
5 | * | ||
6 | * Author: MontaVista Software, Inc. | ||
7 | * source@mvista.com | ||
8 | * | ||
9 | * Copyright 2005 MontaVista Software Inc. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | |||
17 | #include <linux/init.h> | ||
18 | #include <linux/sched.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/mm.h> | ||
21 | #include <linux/console.h> | ||
22 | #include <linux/mc146818rtc.h> | ||
23 | #include <linux/delay.h> | ||
24 | |||
25 | #include <asm/cpu.h> | ||
26 | #include <asm/bootinfo.h> | ||
27 | #include <asm/irq.h> | ||
28 | #include <asm/mipsregs.h> | ||
29 | #include <asm/reboot.h> | ||
30 | #include <asm/pgtable.h> | ||
31 | |||
32 | #include <glb.h> | ||
33 | |||
34 | void __init board_setup(void) | ||
35 | { | ||
36 | unsigned long config0, configpr; | ||
37 | |||
38 | config0 = read_c0_config(); | ||
39 | |||
40 | /* clear all three cache coherency fields */ | ||
41 | config0 &= ~(0x7 | (7<<25) | (7<<28)); | ||
42 | config0 |= (CONF_CM_DEFAULT | (CONF_CM_DEFAULT<<25) | | ||
43 | (CONF_CM_DEFAULT<<28)); | ||
44 | write_c0_config(config0); | ||
45 | |||
46 | configpr = read_c0_config7(); | ||
47 | configpr |= (1<<19); /* enable tlb */ | ||
48 | write_c0_config7(configpr); | ||
49 | } | ||
diff --git a/arch/mips/philips/pnx8550/stb810/irqmap.c b/arch/mips/philips/pnx8550/stb810/irqmap.c new file mode 100644 index 000000000000..5ee11e19975e --- /dev/null +++ b/arch/mips/philips/pnx8550/stb810/irqmap.c | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * Philips STB810 board irqmap. | ||
3 | * | ||
4 | * Author: MontaVista Software, Inc. | ||
5 | * source@mvista.com | ||
6 | * | ||
7 | * Copyright 2005 MontaVista Software Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <int.h> | ||
17 | |||
18 | char pnx8550_irq_tab[][5] __initdata = { | ||
19 | [8] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, | ||
20 | [9] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, | ||
21 | [10] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, | ||
22 | }; | ||
23 | |||
diff --git a/arch/mips/philips/pnx8550/stb810/prom_init.c b/arch/mips/philips/pnx8550/stb810/prom_init.c new file mode 100644 index 000000000000..ea5b4e0fb47d --- /dev/null +++ b/arch/mips/philips/pnx8550/stb810/prom_init.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * STB810 specific prom routines | ||
3 | * | ||
4 | * Author: MontaVista Software, Inc. | ||
5 | * source@mvista.com | ||
6 | * | ||
7 | * Copyright 2005 MontaVista Software Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/mm.h> | ||
17 | #include <linux/sched.h> | ||
18 | #include <linux/bootmem.h> | ||
19 | #include <asm/addrspace.h> | ||
20 | #include <asm/bootinfo.h> | ||
21 | #include <linux/string.h> | ||
22 | #include <linux/kernel.h> | ||
23 | |||
24 | int prom_argc; | ||
25 | char **prom_argv, **prom_envp; | ||
26 | extern void __init prom_init_cmdline(void); | ||
27 | extern char *prom_getenv(char *envname); | ||
28 | |||
29 | const char *get_system_type(void) | ||
30 | { | ||
31 | return "Philips PNX8550/STB810"; | ||
32 | } | ||
33 | |||
34 | void __init prom_init(void) | ||
35 | { | ||
36 | unsigned long memsize; | ||
37 | |||
38 | prom_argc = (int) fw_arg0; | ||
39 | prom_argv = (char **) fw_arg1; | ||
40 | prom_envp = (char **) fw_arg2; | ||
41 | |||
42 | prom_init_cmdline(); | ||
43 | |||
44 | mips_machgroup = MACH_GROUP_PHILIPS; | ||
45 | mips_machtype = MACH_PHILIPS_STB810; | ||
46 | |||
47 | memsize = 0x08000000; /* Trimedia uses memory above */ | ||
48 | add_memory_region(0, memsize, BOOT_MEM_RAM); | ||
49 | } | ||
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c index 5a5ea6c0b9f6..b54b529a29f9 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c +++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c | |||
@@ -158,7 +158,6 @@ JP7 is not bus master -- do NOT use -- only 4 pci bus master's allowed -- SouthB | |||
158 | #define TOSHIBA_RBTX4927_IRQ_ISA_ENABLE ( 1 << 23 ) | 158 | #define TOSHIBA_RBTX4927_IRQ_ISA_ENABLE ( 1 << 23 ) |
159 | #define TOSHIBA_RBTX4927_IRQ_ISA_DISABLE ( 1 << 24 ) | 159 | #define TOSHIBA_RBTX4927_IRQ_ISA_DISABLE ( 1 << 24 ) |
160 | #define TOSHIBA_RBTX4927_IRQ_ISA_MASK ( 1 << 25 ) | 160 | #define TOSHIBA_RBTX4927_IRQ_ISA_MASK ( 1 << 25 ) |
161 | #define TOSHIBA_RBTX4927_IRQ_ISA_ENDIRQ ( 1 << 26 ) | ||
162 | 161 | ||
163 | #define TOSHIBA_RBTX4927_SETUP_ALL 0xffffffff | 162 | #define TOSHIBA_RBTX4927_SETUP_ALL 0xffffffff |
164 | #endif | 163 | #endif |
@@ -175,7 +174,6 @@ static const u32 toshiba_rbtx4927_irq_debug_flag = | |||
175 | // | TOSHIBA_RBTX4927_IRQ_ISA_ENABLE | 174 | // | TOSHIBA_RBTX4927_IRQ_ISA_ENABLE |
176 | // | TOSHIBA_RBTX4927_IRQ_ISA_DISABLE | 175 | // | TOSHIBA_RBTX4927_IRQ_ISA_DISABLE |
177 | // | TOSHIBA_RBTX4927_IRQ_ISA_MASK | 176 | // | TOSHIBA_RBTX4927_IRQ_ISA_MASK |
178 | // | TOSHIBA_RBTX4927_IRQ_ISA_ENDIRQ | ||
179 | ); | 177 | ); |
180 | #endif | 178 | #endif |
181 | 179 | ||
@@ -226,7 +224,6 @@ static void toshiba_rbtx4927_irq_ioc_disable(unsigned int irq); | |||
226 | static void toshiba_rbtx4927_irq_isa_enable(unsigned int irq); | 224 | static void toshiba_rbtx4927_irq_isa_enable(unsigned int irq); |
227 | static void toshiba_rbtx4927_irq_isa_disable(unsigned int irq); | 225 | static void toshiba_rbtx4927_irq_isa_disable(unsigned int irq); |
228 | static void toshiba_rbtx4927_irq_isa_mask_and_ack(unsigned int irq); | 226 | static void toshiba_rbtx4927_irq_isa_mask_and_ack(unsigned int irq); |
229 | static void toshiba_rbtx4927_irq_isa_end(unsigned int irq); | ||
230 | #endif | 227 | #endif |
231 | 228 | ||
232 | #define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC" | 229 | #define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC" |
@@ -249,7 +246,6 @@ static struct irq_chip toshiba_rbtx4927_irq_isa_type = { | |||
249 | .mask = toshiba_rbtx4927_irq_isa_disable, | 246 | .mask = toshiba_rbtx4927_irq_isa_disable, |
250 | .mask_ack = toshiba_rbtx4927_irq_isa_mask_and_ack, | 247 | .mask_ack = toshiba_rbtx4927_irq_isa_mask_and_ack, |
251 | .unmask = toshiba_rbtx4927_irq_isa_enable, | 248 | .unmask = toshiba_rbtx4927_irq_isa_enable, |
252 | .end = toshiba_rbtx4927_irq_isa_end, | ||
253 | }; | 249 | }; |
254 | #endif | 250 | #endif |
255 | 251 | ||
@@ -402,7 +398,8 @@ static void __init toshiba_rbtx4927_irq_isa_init(void) | |||
402 | 398 | ||
403 | for (i = TOSHIBA_RBTX4927_IRQ_ISA_BEG; | 399 | for (i = TOSHIBA_RBTX4927_IRQ_ISA_BEG; |
404 | i <= TOSHIBA_RBTX4927_IRQ_ISA_END; i++) | 400 | i <= TOSHIBA_RBTX4927_IRQ_ISA_END; i++) |
405 | set_irq_chip(i, &toshiba_rbtx4927_irq_isa_type); | 401 | set_irq_chip_and_handler(i, &toshiba_rbtx4927_irq_isa_type, |
402 | handle_level_irq); | ||
406 | 403 | ||
407 | setup_irq(TOSHIBA_RBTX4927_IRQ_NEST_ISA_ON_IOC, | 404 | setup_irq(TOSHIBA_RBTX4927_IRQ_NEST_ISA_ON_IOC, |
408 | &toshiba_rbtx4927_irq_isa_master); | 405 | &toshiba_rbtx4927_irq_isa_master); |
@@ -470,26 +467,6 @@ static void toshiba_rbtx4927_irq_isa_mask_and_ack(unsigned int irq) | |||
470 | #endif | 467 | #endif |
471 | 468 | ||
472 | 469 | ||
473 | #ifdef CONFIG_TOSHIBA_FPCIB0 | ||
474 | static void toshiba_rbtx4927_irq_isa_end(unsigned int irq) | ||
475 | { | ||
476 | TOSHIBA_RBTX4927_IRQ_DPRINTK(TOSHIBA_RBTX4927_IRQ_ISA_ENDIRQ, | ||
477 | "irq=%d\n", irq); | ||
478 | |||
479 | if (irq < TOSHIBA_RBTX4927_IRQ_ISA_BEG | ||
480 | || irq > TOSHIBA_RBTX4927_IRQ_ISA_END) { | ||
481 | TOSHIBA_RBTX4927_IRQ_DPRINTK(TOSHIBA_RBTX4927_IRQ_EROR, | ||
482 | "bad irq=%d\n", irq); | ||
483 | panic("\n"); | ||
484 | } | ||
485 | |||
486 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) { | ||
487 | toshiba_rbtx4927_irq_isa_enable(irq); | ||
488 | } | ||
489 | } | ||
490 | #endif | ||
491 | |||
492 | |||
493 | void __init arch_init_irq(void) | 470 | void __init arch_init_irq(void) |
494 | { | 471 | { |
495 | extern void tx4927_irq_init(void); | 472 | extern void tx4927_irq_init(void); |
diff --git a/arch/mips/vr41xx/Kconfig b/arch/mips/vr41xx/Kconfig index c8dfd8092cab..92f41f6f934a 100644 --- a/arch/mips/vr41xx/Kconfig +++ b/arch/mips/vr41xx/Kconfig | |||
@@ -6,7 +6,6 @@ config CASIO_E55 | |||
6 | select ISA | 6 | select ISA |
7 | select SYS_SUPPORTS_32BIT_KERNEL | 7 | select SYS_SUPPORTS_32BIT_KERNEL |
8 | select SYS_SUPPORTS_LITTLE_ENDIAN | 8 | select SYS_SUPPORTS_LITTLE_ENDIAN |
9 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
10 | 9 | ||
11 | config IBM_WORKPAD | 10 | config IBM_WORKPAD |
12 | bool "Support for IBM WorkPad z50" | 11 | bool "Support for IBM WorkPad z50" |
@@ -16,7 +15,6 @@ config IBM_WORKPAD | |||
16 | select ISA | 15 | select ISA |
17 | select SYS_SUPPORTS_32BIT_KERNEL | 16 | select SYS_SUPPORTS_32BIT_KERNEL |
18 | select SYS_SUPPORTS_LITTLE_ENDIAN | 17 | select SYS_SUPPORTS_LITTLE_ENDIAN |
19 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
20 | 18 | ||
21 | config NEC_CMBVR4133 | 19 | config NEC_CMBVR4133 |
22 | bool "Support for NEC CMB-VR4133" | 20 | bool "Support for NEC CMB-VR4133" |
@@ -41,7 +39,6 @@ config TANBAC_TB022X | |||
41 | select IRQ_CPU | 39 | select IRQ_CPU |
42 | select SYS_SUPPORTS_32BIT_KERNEL | 40 | select SYS_SUPPORTS_32BIT_KERNEL |
43 | select SYS_SUPPORTS_LITTLE_ENDIAN | 41 | select SYS_SUPPORTS_LITTLE_ENDIAN |
44 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
45 | help | 42 | help |
46 | The TANBAC VR4131 multichip module(TB0225) and | 43 | The TANBAC VR4131 multichip module(TB0225) and |
47 | the TANBAC VR4131DIMM(TB0229) are MIPS-based platforms | 44 | the TANBAC VR4131DIMM(TB0229) are MIPS-based platforms |
@@ -74,7 +71,6 @@ config VICTOR_MPC30X | |||
74 | select IRQ_CPU | 71 | select IRQ_CPU |
75 | select SYS_SUPPORTS_32BIT_KERNEL | 72 | select SYS_SUPPORTS_32BIT_KERNEL |
76 | select SYS_SUPPORTS_LITTLE_ENDIAN | 73 | select SYS_SUPPORTS_LITTLE_ENDIAN |
77 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
78 | 74 | ||
79 | config ZAO_CAPCELLA | 75 | config ZAO_CAPCELLA |
80 | bool "Support for ZAO Networks Capcella" | 76 | bool "Support for ZAO Networks Capcella" |
@@ -84,7 +80,6 @@ config ZAO_CAPCELLA | |||
84 | select IRQ_CPU | 80 | select IRQ_CPU |
85 | select SYS_SUPPORTS_32BIT_KERNEL | 81 | select SYS_SUPPORTS_32BIT_KERNEL |
86 | select SYS_SUPPORTS_LITTLE_ENDIAN | 82 | select SYS_SUPPORTS_LITTLE_ENDIAN |
87 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
88 | 83 | ||
89 | config PCI_VR41XX | 84 | config PCI_VR41XX |
90 | bool "Add PCI control unit support of NEC VR4100 series" | 85 | bool "Add PCI control unit support of NEC VR4100 series" |
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/irq.c b/arch/mips/vr41xx/nec-cmbvr4133/irq.c index a039bb7251ff..128ed8d6f111 100644 --- a/arch/mips/vr41xx/nec-cmbvr4133/irq.c +++ b/arch/mips/vr41xx/nec-cmbvr4133/irq.c | |||
@@ -45,19 +45,12 @@ static void ack_i8259_irq(unsigned int irq) | |||
45 | mask_and_ack_8259A(irq - I8259_IRQ_BASE); | 45 | mask_and_ack_8259A(irq - I8259_IRQ_BASE); |
46 | } | 46 | } |
47 | 47 | ||
48 | static void end_i8259_irq(unsigned int irq) | ||
49 | { | ||
50 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
51 | enable_8259A_irq(irq - I8259_IRQ_BASE); | ||
52 | } | ||
53 | |||
54 | static struct irq_chip i8259_irq_type = { | 48 | static struct irq_chip i8259_irq_type = { |
55 | .typename = "XT-PIC", | 49 | .typename = "XT-PIC", |
56 | .ack = ack_i8259_irq, | 50 | .ack = ack_i8259_irq, |
57 | .mask = disable_i8259_irq, | 51 | .mask = disable_i8259_irq, |
58 | .mask_ack = ack_i8259_irq, | 52 | .mask_ack = ack_i8259_irq, |
59 | .unmask = enable_i8259_irq, | 53 | .unmask = enable_i8259_irq, |
60 | .end = end_i8259_irq, | ||
61 | }; | 54 | }; |
62 | 55 | ||
63 | static int i8259_get_irq_number(int irq) | 56 | static int i8259_get_irq_number(int irq) |
@@ -92,7 +85,7 @@ void __init rockhopper_init_irq(void) | |||
92 | } | 85 | } |
93 | 86 | ||
94 | for (i = I8259_IRQ_BASE; i <= I8259_IRQ_LAST; i++) | 87 | for (i = I8259_IRQ_BASE; i <= I8259_IRQ_LAST; i++) |
95 | set_irq_chip(i, &i8259_irq_type); | 88 | set_irq_chip_and_handler(i, &i8259_irq_type, handle_level_irq); |
96 | 89 | ||
97 | setup_irq(I8259_SLAVE_IRQ, &i8259_slave_cascade); | 90 | setup_irq(I8259_SLAVE_IRQ, &i8259_slave_cascade); |
98 | 91 | ||
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index d2101237442e..0f9ff618c6d7 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -25,6 +25,14 @@ config RWSEM_GENERIC_SPINLOCK | |||
25 | config RWSEM_XCHGADD_ALGORITHM | 25 | config RWSEM_XCHGADD_ALGORITHM |
26 | bool | 26 | bool |
27 | 27 | ||
28 | config ARCH_HAS_ILOG2_U32 | ||
29 | bool | ||
30 | default n | ||
31 | |||
32 | config ARCH_HAS_ILOG2_U64 | ||
33 | bool | ||
34 | default n | ||
35 | |||
28 | config GENERIC_FIND_NEXT_BIT | 36 | config GENERIC_FIND_NEXT_BIT |
29 | bool | 37 | bool |
30 | default y | 38 | default y |
diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c index 2e2dc4f2c853..d88309209f56 100644 --- a/arch/parisc/hpux/sys_hpux.c +++ b/arch/parisc/hpux/sys_hpux.c | |||
@@ -237,7 +237,7 @@ asmlinkage long hpux_fstatfs(unsigned int fd, struct hpux_statfs __user * buf) | |||
237 | file = fget(fd); | 237 | file = fget(fd); |
238 | if (!file) | 238 | if (!file) |
239 | goto out; | 239 | goto out; |
240 | error = vfs_statfs_hpux(file->f_dentry, &tmp); | 240 | error = vfs_statfs_hpux(file->f_path.dentry, &tmp); |
241 | if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) | 241 | if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) |
242 | error = -EFAULT; | 242 | error = -EFAULT; |
243 | fput(file); | 243 | fput(file); |
diff --git a/arch/parisc/mm/ioremap.c b/arch/parisc/mm/ioremap.c index 47a1d2ac9419..44b42c7f639d 100644 --- a/arch/parisc/mm/ioremap.c +++ b/arch/parisc/mm/ioremap.c | |||
@@ -9,110 +9,8 @@ | |||
9 | #include <linux/vmalloc.h> | 9 | #include <linux/vmalloc.h> |
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <asm/io.h> | 12 | #include <linux/io.h> |
13 | #include <asm/pgalloc.h> | 13 | #include <asm/pgalloc.h> |
14 | #include <asm/tlbflush.h> | ||
15 | #include <asm/cacheflush.h> | ||
16 | |||
17 | static inline void | ||
18 | remap_area_pte(pte_t *pte, unsigned long address, unsigned long size, | ||
19 | unsigned long phys_addr, unsigned long flags) | ||
20 | { | ||
21 | unsigned long end, pfn; | ||
22 | pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | | ||
23 | _PAGE_ACCESSED | flags); | ||
24 | |||
25 | address &= ~PMD_MASK; | ||
26 | |||
27 | end = address + size; | ||
28 | if (end > PMD_SIZE) | ||
29 | end = PMD_SIZE; | ||
30 | |||
31 | BUG_ON(address >= end); | ||
32 | |||
33 | pfn = phys_addr >> PAGE_SHIFT; | ||
34 | do { | ||
35 | BUG_ON(!pte_none(*pte)); | ||
36 | |||
37 | set_pte(pte, pfn_pte(pfn, pgprot)); | ||
38 | |||
39 | address += PAGE_SIZE; | ||
40 | pfn++; | ||
41 | pte++; | ||
42 | } while (address && (address < end)); | ||
43 | } | ||
44 | |||
45 | static inline int | ||
46 | remap_area_pmd(pmd_t *pmd, unsigned long address, unsigned long size, | ||
47 | unsigned long phys_addr, unsigned long flags) | ||
48 | { | ||
49 | unsigned long end; | ||
50 | |||
51 | address &= ~PGDIR_MASK; | ||
52 | |||
53 | end = address + size; | ||
54 | if (end > PGDIR_SIZE) | ||
55 | end = PGDIR_SIZE; | ||
56 | |||
57 | BUG_ON(address >= end); | ||
58 | |||
59 | phys_addr -= address; | ||
60 | do { | ||
61 | pte_t *pte = pte_alloc_kernel(pmd, address); | ||
62 | if (!pte) | ||
63 | return -ENOMEM; | ||
64 | |||
65 | remap_area_pte(pte, address, end - address, | ||
66 | address + phys_addr, flags); | ||
67 | |||
68 | address = (address + PMD_SIZE) & PMD_MASK; | ||
69 | pmd++; | ||
70 | } while (address && (address < end)); | ||
71 | |||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | static int | ||
76 | remap_area_pages(unsigned long address, unsigned long phys_addr, | ||
77 | unsigned long size, unsigned long flags) | ||
78 | { | ||
79 | pgd_t *dir; | ||
80 | int error = 0; | ||
81 | unsigned long end = address + size; | ||
82 | |||
83 | BUG_ON(address >= end); | ||
84 | |||
85 | phys_addr -= address; | ||
86 | dir = pgd_offset_k(address); | ||
87 | |||
88 | flush_cache_all(); | ||
89 | |||
90 | do { | ||
91 | pud_t *pud; | ||
92 | pmd_t *pmd; | ||
93 | |||
94 | error = -ENOMEM; | ||
95 | pud = pud_alloc(&init_mm, dir, address); | ||
96 | if (!pud) | ||
97 | break; | ||
98 | |||
99 | pmd = pmd_alloc(&init_mm, pud, address); | ||
100 | if (!pmd) | ||
101 | break; | ||
102 | |||
103 | if (remap_area_pmd(pmd, address, end - address, | ||
104 | phys_addr + address, flags)) | ||
105 | break; | ||
106 | |||
107 | error = 0; | ||
108 | address = (address + PGDIR_SIZE) & PGDIR_MASK; | ||
109 | dir++; | ||
110 | } while (address && (address < end)); | ||
111 | |||
112 | flush_tlb_all(); | ||
113 | |||
114 | return error; | ||
115 | } | ||
116 | 14 | ||
117 | /* | 15 | /* |
118 | * Generic mapping function (not visible outside): | 16 | * Generic mapping function (not visible outside): |
@@ -131,6 +29,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l | |||
131 | void *addr; | 29 | void *addr; |
132 | struct vm_struct *area; | 30 | struct vm_struct *area; |
133 | unsigned long offset, last_addr; | 31 | unsigned long offset, last_addr; |
32 | pgprot_t pgprot; | ||
134 | 33 | ||
135 | #ifdef CONFIG_EISA | 34 | #ifdef CONFIG_EISA |
136 | unsigned long end = phys_addr + size - 1; | 35 | unsigned long end = phys_addr + size - 1; |
@@ -164,6 +63,9 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l | |||
164 | } | 63 | } |
165 | } | 64 | } |
166 | 65 | ||
66 | pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | | ||
67 | _PAGE_ACCESSED | flags); | ||
68 | |||
167 | /* | 69 | /* |
168 | * Mappings have to be page-aligned | 70 | * Mappings have to be page-aligned |
169 | */ | 71 | */ |
@@ -179,7 +81,8 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l | |||
179 | return NULL; | 81 | return NULL; |
180 | 82 | ||
181 | addr = area->addr; | 83 | addr = area->addr; |
182 | if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { | 84 | if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, |
85 | phys_addr, pgprot)) { | ||
183 | vfree(addr); | 86 | vfree(addr); |
184 | return NULL; | 87 | return NULL; |
185 | } | 88 | } |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index f81d9f6f19f6..8699dadcd096 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -41,6 +41,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
41 | bool | 41 | bool |
42 | default y | 42 | default y |
43 | 43 | ||
44 | config ARCH_HAS_ILOG2_U32 | ||
45 | bool | ||
46 | default y | ||
47 | |||
48 | config ARCH_HAS_ILOG2_U64 | ||
49 | bool | ||
50 | default y if 64BIT | ||
51 | |||
44 | config GENERIC_HWEIGHT | 52 | config GENERIC_HWEIGHT |
45 | bool | 53 | bool |
46 | default y | 54 | default y |
diff --git a/arch/powerpc/kernel/proc_ppc64.c b/arch/powerpc/kernel/proc_ppc64.c index f598cb519539..dd7001cacf75 100644 --- a/arch/powerpc/kernel/proc_ppc64.c +++ b/arch/powerpc/kernel/proc_ppc64.c | |||
@@ -83,7 +83,7 @@ __initcall(proc_ppc64_init); | |||
83 | static loff_t page_map_seek( struct file *file, loff_t off, int whence) | 83 | static loff_t page_map_seek( struct file *file, loff_t off, int whence) |
84 | { | 84 | { |
85 | loff_t new; | 85 | loff_t new; |
86 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 86 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
87 | 87 | ||
88 | switch(whence) { | 88 | switch(whence) { |
89 | case 0: | 89 | case 0: |
@@ -106,13 +106,13 @@ static loff_t page_map_seek( struct file *file, loff_t off, int whence) | |||
106 | static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, | 106 | static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, |
107 | loff_t *ppos) | 107 | loff_t *ppos) |
108 | { | 108 | { |
109 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 109 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
110 | return simple_read_from_buffer(buf, nbytes, ppos, dp->data, dp->size); | 110 | return simple_read_from_buffer(buf, nbytes, ppos, dp->data, dp->size); |
111 | } | 111 | } |
112 | 112 | ||
113 | static int page_map_mmap( struct file *file, struct vm_area_struct *vma ) | 113 | static int page_map_mmap( struct file *file, struct vm_area_struct *vma ) |
114 | { | 114 | { |
115 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 115 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
116 | 116 | ||
117 | if ((vma->vm_end - vma->vm_start) > dp->size) | 117 | if ((vma->vm_end - vma->vm_start) > dp->size) |
118 | return -EINVAL; | 118 | return -EINVAL; |
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 7d0f13fecc0e..0c4fcd34bfe5 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -193,7 +193,7 @@ static void free_flash_list(struct flash_block_list *f) | |||
193 | 193 | ||
194 | static int rtas_flash_release(struct inode *inode, struct file *file) | 194 | static int rtas_flash_release(struct inode *inode, struct file *file) |
195 | { | 195 | { |
196 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 196 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
197 | struct rtas_update_flash_t *uf; | 197 | struct rtas_update_flash_t *uf; |
198 | 198 | ||
199 | uf = (struct rtas_update_flash_t *) dp->data; | 199 | uf = (struct rtas_update_flash_t *) dp->data; |
@@ -255,7 +255,7 @@ static void get_flash_status_msg(int status, char *buf) | |||
255 | static ssize_t rtas_flash_read(struct file *file, char __user *buf, | 255 | static ssize_t rtas_flash_read(struct file *file, char __user *buf, |
256 | size_t count, loff_t *ppos) | 256 | size_t count, loff_t *ppos) |
257 | { | 257 | { |
258 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 258 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
259 | struct rtas_update_flash_t *uf; | 259 | struct rtas_update_flash_t *uf; |
260 | char msg[RTAS_MSG_MAXLEN]; | 260 | char msg[RTAS_MSG_MAXLEN]; |
261 | int msglen; | 261 | int msglen; |
@@ -299,7 +299,7 @@ void rtas_block_ctor(void *ptr, struct kmem_cache *cache, unsigned long flags) | |||
299 | static ssize_t rtas_flash_write(struct file *file, const char __user *buffer, | 299 | static ssize_t rtas_flash_write(struct file *file, const char __user *buffer, |
300 | size_t count, loff_t *off) | 300 | size_t count, loff_t *off) |
301 | { | 301 | { |
302 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 302 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
303 | struct rtas_update_flash_t *uf; | 303 | struct rtas_update_flash_t *uf; |
304 | char *p; | 304 | char *p; |
305 | int next_free; | 305 | int next_free; |
@@ -391,7 +391,7 @@ static void manage_flash(struct rtas_manage_flash_t *args_buf) | |||
391 | static ssize_t manage_flash_read(struct file *file, char __user *buf, | 391 | static ssize_t manage_flash_read(struct file *file, char __user *buf, |
392 | size_t count, loff_t *ppos) | 392 | size_t count, loff_t *ppos) |
393 | { | 393 | { |
394 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 394 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
395 | struct rtas_manage_flash_t *args_buf; | 395 | struct rtas_manage_flash_t *args_buf; |
396 | char msg[RTAS_MSG_MAXLEN]; | 396 | char msg[RTAS_MSG_MAXLEN]; |
397 | int msglen; | 397 | int msglen; |
@@ -421,7 +421,7 @@ static ssize_t manage_flash_read(struct file *file, char __user *buf, | |||
421 | static ssize_t manage_flash_write(struct file *file, const char __user *buf, | 421 | static ssize_t manage_flash_write(struct file *file, const char __user *buf, |
422 | size_t count, loff_t *off) | 422 | size_t count, loff_t *off) |
423 | { | 423 | { |
424 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 424 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
425 | struct rtas_manage_flash_t *args_buf; | 425 | struct rtas_manage_flash_t *args_buf; |
426 | const char reject_str[] = "0"; | 426 | const char reject_str[] = "0"; |
427 | const char commit_str[] = "1"; | 427 | const char commit_str[] = "1"; |
@@ -492,7 +492,7 @@ static int get_validate_flash_msg(struct rtas_validate_flash_t *args_buf, | |||
492 | static ssize_t validate_flash_read(struct file *file, char __user *buf, | 492 | static ssize_t validate_flash_read(struct file *file, char __user *buf, |
493 | size_t count, loff_t *ppos) | 493 | size_t count, loff_t *ppos) |
494 | { | 494 | { |
495 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 495 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
496 | struct rtas_validate_flash_t *args_buf; | 496 | struct rtas_validate_flash_t *args_buf; |
497 | char msg[RTAS_MSG_MAXLEN]; | 497 | char msg[RTAS_MSG_MAXLEN]; |
498 | int msglen; | 498 | int msglen; |
@@ -520,7 +520,7 @@ static ssize_t validate_flash_read(struct file *file, char __user *buf, | |||
520 | static ssize_t validate_flash_write(struct file *file, const char __user *buf, | 520 | static ssize_t validate_flash_write(struct file *file, const char __user *buf, |
521 | size_t count, loff_t *off) | 521 | size_t count, loff_t *off) |
522 | { | 522 | { |
523 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 523 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
524 | struct rtas_validate_flash_t *args_buf; | 524 | struct rtas_validate_flash_t *args_buf; |
525 | int rc; | 525 | int rc; |
526 | 526 | ||
@@ -569,7 +569,7 @@ done: | |||
569 | 569 | ||
570 | static int validate_flash_release(struct inode *inode, struct file *file) | 570 | static int validate_flash_release(struct inode *inode, struct file *file) |
571 | { | 571 | { |
572 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 572 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
573 | struct rtas_validate_flash_t *args_buf; | 573 | struct rtas_validate_flash_t *args_buf; |
574 | 574 | ||
575 | args_buf = (struct rtas_validate_flash_t *) dp->data; | 575 | args_buf = (struct rtas_validate_flash_t *) dp->data; |
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index e3af9112c026..738b9244382f 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -205,7 +205,7 @@ static int spufs_dir_close(struct inode *inode, struct file *file) | |||
205 | struct dentry *dir; | 205 | struct dentry *dir; |
206 | int ret; | 206 | int ret; |
207 | 207 | ||
208 | dir = file->f_dentry; | 208 | dir = file->f_path.dentry; |
209 | parent = dir->d_parent->d_inode; | 209 | parent = dir->d_parent->d_inode; |
210 | ctx = SPUFS_I(dir->d_inode)->i_ctx; | 210 | ctx = SPUFS_I(dir->d_inode)->i_ctx; |
211 | 211 | ||
@@ -363,7 +363,7 @@ static int spufs_gang_close(struct inode *inode, struct file *file) | |||
363 | struct dentry *dir; | 363 | struct dentry *dir; |
364 | int ret; | 364 | int ret; |
365 | 365 | ||
366 | dir = file->f_dentry; | 366 | dir = file->f_path.dentry; |
367 | parent = dir->d_parent->d_inode; | 367 | parent = dir->d_parent->d_inode; |
368 | 368 | ||
369 | ret = spufs_rmgang(parent, dir); | 369 | ret = spufs_rmgang(parent, dir); |
diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c index a6d1ae4dc2a3..8e37bdf4dfda 100644 --- a/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c | |||
@@ -46,7 +46,7 @@ static long do_spu_run(struct file *filp, | |||
46 | if (filp->f_op != &spufs_context_fops) | 46 | if (filp->f_op != &spufs_context_fops) |
47 | goto out; | 47 | goto out; |
48 | 48 | ||
49 | i = SPUFS_I(filp->f_dentry->d_inode); | 49 | i = SPUFS_I(filp->f_path.dentry->d_inode); |
50 | ret = spufs_run_spu(filp, i->i_ctx, &npc, &status); | 50 | ret = spufs_run_spu(filp, i->i_ctx, &npc, &status); |
51 | 51 | ||
52 | if (put_user(npc, unpc)) | 52 | if (put_user(npc, unpc)) |
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index b5737d68d6c4..cff15ae24f6b 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c | |||
@@ -1178,7 +1178,7 @@ static ssize_t proc_mf_change_vmlinux(struct file *file, | |||
1178 | const char __user *buf, | 1178 | const char __user *buf, |
1179 | size_t count, loff_t *ppos) | 1179 | size_t count, loff_t *ppos) |
1180 | { | 1180 | { |
1181 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 1181 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
1182 | ssize_t rc; | 1182 | ssize_t rc; |
1183 | dma_addr_t dma_addr; | 1183 | dma_addr_t dma_addr; |
1184 | char *page; | 1184 | char *page; |
diff --git a/arch/powerpc/platforms/pseries/hvCall_inst.c b/arch/powerpc/platforms/pseries/hvCall_inst.c index 446e17d162a5..80181c4c49eb 100644 --- a/arch/powerpc/platforms/pseries/hvCall_inst.c +++ b/arch/powerpc/platforms/pseries/hvCall_inst.c | |||
@@ -85,7 +85,7 @@ static int hcall_inst_seq_open(struct inode *inode, struct file *file) | |||
85 | 85 | ||
86 | rc = seq_open(file, &hcall_inst_seq_ops); | 86 | rc = seq_open(file, &hcall_inst_seq_ops); |
87 | seq = file->private_data; | 87 | seq = file->private_data; |
88 | seq->private = file->f_dentry->d_inode->i_private; | 88 | seq->private = file->f_path.dentry->d_inode->i_private; |
89 | 89 | ||
90 | return rc; | 90 | return rc; |
91 | } | 91 | } |
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c index 77a5bb1d9c30..45368a57d7dd 100644 --- a/arch/powerpc/platforms/pseries/scanlog.c +++ b/arch/powerpc/platforms/pseries/scanlog.c | |||
@@ -47,7 +47,7 @@ static struct proc_dir_entry *proc_ppc64_scan_log_dump; /* The proc file */ | |||
47 | static ssize_t scanlog_read(struct file *file, char __user *buf, | 47 | static ssize_t scanlog_read(struct file *file, char __user *buf, |
48 | size_t count, loff_t *ppos) | 48 | size_t count, loff_t *ppos) |
49 | { | 49 | { |
50 | struct inode * inode = file->f_dentry->d_inode; | 50 | struct inode * inode = file->f_path.dentry->d_inode; |
51 | struct proc_dir_entry *dp; | 51 | struct proc_dir_entry *dp; |
52 | unsigned int *data; | 52 | unsigned int *data; |
53 | int status; | 53 | int status; |
diff --git a/arch/ppc/8xx_io/cs4218_tdm.c b/arch/ppc/8xx_io/cs4218_tdm.c index 959d31c26cbb..c71ef3c2e7bf 100644 --- a/arch/ppc/8xx_io/cs4218_tdm.c +++ b/arch/ppc/8xx_io/cs4218_tdm.c | |||
@@ -2165,7 +2165,7 @@ static int sq_release(struct inode *inode, struct file *file) | |||
2165 | int rc = 0; | 2165 | int rc = 0; |
2166 | 2166 | ||
2167 | if (sq.busy) | 2167 | if (sq.busy) |
2168 | rc = sq_fsync(file, file->f_dentry); | 2168 | rc = sq_fsync(file, file->f_path.dentry); |
2169 | sound.soft = sound.dsp; | 2169 | sound.soft = sound.dsp; |
2170 | sound.hard = sound.dsp; | 2170 | sound.hard = sound.dsp; |
2171 | sound_silence(); | 2171 | sound_silence(); |
@@ -2218,25 +2218,25 @@ static int sq_ioctl(struct inode *inode, struct file *file, u_int cmd, | |||
2218 | return 0; | 2218 | return 0; |
2219 | case SNDCTL_DSP_POST: | 2219 | case SNDCTL_DSP_POST: |
2220 | case SNDCTL_DSP_SYNC: | 2220 | case SNDCTL_DSP_SYNC: |
2221 | return sq_fsync(file, file->f_dentry); | 2221 | return sq_fsync(file, file->f_path.dentry); |
2222 | 2222 | ||
2223 | /* ++TeSche: before changing any of these it's | 2223 | /* ++TeSche: before changing any of these it's |
2224 | * probably wise to wait until sound playing has | 2224 | * probably wise to wait until sound playing has |
2225 | * settled down. */ | 2225 | * settled down. */ |
2226 | case SNDCTL_DSP_SPEED: | 2226 | case SNDCTL_DSP_SPEED: |
2227 | sq_fsync(file, file->f_dentry); | 2227 | sq_fsync(file, file->f_path.dentry); |
2228 | IOCTL_IN(arg, data); | 2228 | IOCTL_IN(arg, data); |
2229 | return IOCTL_OUT(arg, sound_set_speed(data)); | 2229 | return IOCTL_OUT(arg, sound_set_speed(data)); |
2230 | case SNDCTL_DSP_STEREO: | 2230 | case SNDCTL_DSP_STEREO: |
2231 | sq_fsync(file, file->f_dentry); | 2231 | sq_fsync(file, file->f_path.dentry); |
2232 | IOCTL_IN(arg, data); | 2232 | IOCTL_IN(arg, data); |
2233 | return IOCTL_OUT(arg, sound_set_stereo(data)); | 2233 | return IOCTL_OUT(arg, sound_set_stereo(data)); |
2234 | case SOUND_PCM_WRITE_CHANNELS: | 2234 | case SOUND_PCM_WRITE_CHANNELS: |
2235 | sq_fsync(file, file->f_dentry); | 2235 | sq_fsync(file, file->f_path.dentry); |
2236 | IOCTL_IN(arg, data); | 2236 | IOCTL_IN(arg, data); |
2237 | return IOCTL_OUT(arg, sound_set_stereo(data-1)+1); | 2237 | return IOCTL_OUT(arg, sound_set_stereo(data-1)+1); |
2238 | case SNDCTL_DSP_SETFMT: | 2238 | case SNDCTL_DSP_SETFMT: |
2239 | sq_fsync(file, file->f_dentry); | 2239 | sq_fsync(file, file->f_path.dentry); |
2240 | IOCTL_IN(arg, data); | 2240 | IOCTL_IN(arg, data); |
2241 | return IOCTL_OUT(arg, sound_set_format(data)); | 2241 | return IOCTL_OUT(arg, sound_set_format(data)); |
2242 | case SNDCTL_DSP_GETFMTS: | 2242 | case SNDCTL_DSP_GETFMTS: |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index edf71a4ecc95..692b5ba53209 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -19,6 +19,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
19 | bool | 19 | bool |
20 | default y | 20 | default y |
21 | 21 | ||
22 | config ARCH_HAS_ILOG2_U32 | ||
23 | bool | ||
24 | default y | ||
25 | |||
26 | config ARCH_HAS_ILOG2_U64 | ||
27 | bool | ||
28 | default n | ||
29 | |||
22 | config GENERIC_HWEIGHT | 30 | config GENERIC_HWEIGHT |
23 | bool | 31 | bool |
24 | default y | 32 | default y |
@@ -52,6 +60,11 @@ config ARCH_MAY_HAVE_PC_FDC | |||
52 | bool | 60 | bool |
53 | default y | 61 | default y |
54 | 62 | ||
63 | config GENERIC_BUG | ||
64 | bool | ||
65 | default y | ||
66 | depends on BUG | ||
67 | |||
55 | source "init/Kconfig" | 68 | source "init/Kconfig" |
56 | 69 | ||
57 | menu "Processor" | 70 | menu "Processor" |
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 2f835b9e95e4..810f7aa72e92 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/prctl.h> | 30 | #include <linux/prctl.h> |
31 | #include <linux/bug.h> | ||
31 | 32 | ||
32 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
33 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
@@ -559,64 +560,9 @@ static void emulate_single_step(struct pt_regs *regs) | |||
559 | } | 560 | } |
560 | } | 561 | } |
561 | 562 | ||
562 | /* | 563 | int is_valid_bugaddr(unsigned long addr) |
563 | * Look through the list of trap instructions that are used for BUG(), | ||
564 | * BUG_ON() and WARN_ON() and see if we hit one. At this point we know | ||
565 | * that the exception was caused by a trap instruction of some kind. | ||
566 | * Returns 1 if we should continue (i.e. it was a WARN_ON) or 0 | ||
567 | * otherwise. | ||
568 | */ | ||
569 | extern struct bug_entry __start___bug_table[], __stop___bug_table[]; | ||
570 | |||
571 | #ifndef CONFIG_MODULES | ||
572 | #define module_find_bug(x) NULL | ||
573 | #endif | ||
574 | |||
575 | struct bug_entry *find_bug(unsigned long bugaddr) | ||
576 | { | ||
577 | struct bug_entry *bug; | ||
578 | |||
579 | for (bug = __start___bug_table; bug < __stop___bug_table; ++bug) | ||
580 | if (bugaddr == bug->bug_addr) | ||
581 | return bug; | ||
582 | return module_find_bug(bugaddr); | ||
583 | } | ||
584 | |||
585 | int check_bug_trap(struct pt_regs *regs) | ||
586 | { | 564 | { |
587 | struct bug_entry *bug; | 565 | return addr >= PAGE_OFFSET; |
588 | unsigned long addr; | ||
589 | |||
590 | if (regs->msr & MSR_PR) | ||
591 | return 0; /* not in kernel */ | ||
592 | addr = regs->nip; /* address of trap instruction */ | ||
593 | if (addr < PAGE_OFFSET) | ||
594 | return 0; | ||
595 | bug = find_bug(regs->nip); | ||
596 | if (bug == NULL) | ||
597 | return 0; | ||
598 | if (bug->line & BUG_WARNING_TRAP) { | ||
599 | /* this is a WARN_ON rather than BUG/BUG_ON */ | ||
600 | #ifdef CONFIG_XMON | ||
601 | xmon_printf(KERN_ERR "Badness in %s at %s:%ld\n", | ||
602 | bug->function, bug->file, | ||
603 | bug->line & ~BUG_WARNING_TRAP); | ||
604 | #endif /* CONFIG_XMON */ | ||
605 | printk(KERN_ERR "Badness in %s at %s:%ld\n", | ||
606 | bug->function, bug->file, | ||
607 | bug->line & ~BUG_WARNING_TRAP); | ||
608 | dump_stack(); | ||
609 | return 1; | ||
610 | } | ||
611 | #ifdef CONFIG_XMON | ||
612 | xmon_printf(KERN_CRIT "kernel BUG in %s at %s:%ld!\n", | ||
613 | bug->function, bug->file, bug->line); | ||
614 | xmon(regs); | ||
615 | #endif /* CONFIG_XMON */ | ||
616 | printk(KERN_CRIT "kernel BUG in %s at %s:%ld!\n", | ||
617 | bug->function, bug->file, bug->line); | ||
618 | |||
619 | return 0; | ||
620 | } | 566 | } |
621 | 567 | ||
622 | void program_check_exception(struct pt_regs *regs) | 568 | void program_check_exception(struct pt_regs *regs) |
@@ -671,7 +617,9 @@ void program_check_exception(struct pt_regs *regs) | |||
671 | /* trap exception */ | 617 | /* trap exception */ |
672 | if (debugger_bpt(regs)) | 618 | if (debugger_bpt(regs)) |
673 | return; | 619 | return; |
674 | if (check_bug_trap(regs)) { | 620 | |
621 | if (!(regs->msr & MSR_PR) && /* not user-mode */ | ||
622 | report_bug(regs->nip) == BUG_TRAP_TYPE_WARN) { | ||
675 | regs->nip += 4; | 623 | regs->nip += 4; |
676 | return; | 624 | return; |
677 | } | 625 | } |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 583d9ff0a571..ff690564edbd 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -22,6 +22,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
22 | bool | 22 | bool |
23 | default y | 23 | default y |
24 | 24 | ||
25 | config ARCH_HAS_ILOG2_U32 | ||
26 | bool | ||
27 | default n | ||
28 | |||
29 | config ARCH_HAS_ILOG2_U64 | ||
30 | bool | ||
31 | default n | ||
32 | |||
25 | config GENERIC_HWEIGHT | 33 | config GENERIC_HWEIGHT |
26 | bool | 34 | bool |
27 | default y | 35 | default y |
@@ -233,8 +241,14 @@ config WARN_STACK_SIZE | |||
233 | This allows you to specify the maximum frame size a function may | 241 | This allows you to specify the maximum frame size a function may |
234 | have without the compiler complaining about it. | 242 | have without the compiler complaining about it. |
235 | 243 | ||
244 | config ARCH_POPULATES_NODE_MAP | ||
245 | def_bool y | ||
246 | |||
236 | source "mm/Kconfig" | 247 | source "mm/Kconfig" |
237 | 248 | ||
249 | config HOLES_IN_ZONE | ||
250 | def_bool y | ||
251 | |||
238 | comment "I/O subsystem configuration" | 252 | comment "I/O subsystem configuration" |
239 | 253 | ||
240 | config MACHCHK_WARNING | 254 | config MACHCHK_WARNING |
@@ -258,14 +272,6 @@ config QDIO | |||
258 | 272 | ||
259 | If unsure, say Y. | 273 | If unsure, say Y. |
260 | 274 | ||
261 | config QDIO_PERF_STATS | ||
262 | bool "Performance statistics in /proc" | ||
263 | depends on QDIO | ||
264 | help | ||
265 | Say Y here to get performance statistics in /proc/qdio_perf | ||
266 | |||
267 | If unsure, say N. | ||
268 | |||
269 | config QDIO_DEBUG | 275 | config QDIO_DEBUG |
270 | bool "Extended debugging information" | 276 | bool "Extended debugging information" |
271 | depends on QDIO | 277 | depends on QDIO |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 7cd51e73e274..a6ec919ba83f 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -134,7 +134,6 @@ CONFIG_RESOURCES_64BIT=y | |||
134 | # | 134 | # |
135 | CONFIG_MACHCHK_WARNING=y | 135 | CONFIG_MACHCHK_WARNING=y |
136 | CONFIG_QDIO=y | 136 | CONFIG_QDIO=y |
137 | # CONFIG_QDIO_PERF_STATS is not set | ||
138 | # CONFIG_QDIO_DEBUG is not set | 137 | # CONFIG_QDIO_DEBUG is not set |
139 | 138 | ||
140 | # | 139 | # |
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index cd702ae45d6d..b6716c4b9934 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c | |||
@@ -109,7 +109,7 @@ static void hypfs_drop_inode(struct inode *inode) | |||
109 | 109 | ||
110 | static int hypfs_open(struct inode *inode, struct file *filp) | 110 | static int hypfs_open(struct inode *inode, struct file *filp) |
111 | { | 111 | { |
112 | char *data = filp->f_dentry->d_inode->i_private; | 112 | char *data = filp->f_path.dentry->d_inode->i_private; |
113 | struct hypfs_sb_info *fs_info; | 113 | struct hypfs_sb_info *fs_info; |
114 | 114 | ||
115 | if (filp->f_mode & FMODE_WRITE) { | 115 | if (filp->f_mode & FMODE_WRITE) { |
@@ -174,7 +174,7 @@ static ssize_t hypfs_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
174 | struct hypfs_sb_info *fs_info; | 174 | struct hypfs_sb_info *fs_info; |
175 | size_t count = iov_length(iov, nr_segs); | 175 | size_t count = iov_length(iov, nr_segs); |
176 | 176 | ||
177 | sb = iocb->ki_filp->f_dentry->d_inode->i_sb; | 177 | sb = iocb->ki_filp->f_path.dentry->d_inode->i_sb; |
178 | fs_info = sb->s_fs_info; | 178 | fs_info = sb->s_fs_info; |
179 | /* | 179 | /* |
180 | * Currently we only allow one update per second for two reasons: | 180 | * Currently we only allow one update per second for two reasons: |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 43f3d0c7e132..ef5266fbce62 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -603,13 +603,13 @@ debug_open(struct inode *inode, struct file *file) | |||
603 | debug_info_t *debug_info, *debug_info_snapshot; | 603 | debug_info_t *debug_info, *debug_info_snapshot; |
604 | 604 | ||
605 | down(&debug_lock); | 605 | down(&debug_lock); |
606 | debug_info = file->f_dentry->d_inode->i_private; | 606 | debug_info = file->f_path.dentry->d_inode->i_private; |
607 | /* find debug view */ | 607 | /* find debug view */ |
608 | for (i = 0; i < DEBUG_MAX_VIEWS; i++) { | 608 | for (i = 0; i < DEBUG_MAX_VIEWS; i++) { |
609 | if (!debug_info->views[i]) | 609 | if (!debug_info->views[i]) |
610 | continue; | 610 | continue; |
611 | else if (debug_info->debugfs_entries[i] == | 611 | else if (debug_info->debugfs_entries[i] == |
612 | file->f_dentry) { | 612 | file->f_path.dentry) { |
613 | goto found; /* found view ! */ | 613 | goto found; /* found view ! */ |
614 | } | 614 | } |
615 | } | 615 | } |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index b928fecdc743..49ef206ec880 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -64,9 +64,8 @@ unsigned int console_devno = -1; | |||
64 | unsigned int console_irq = -1; | 64 | unsigned int console_irq = -1; |
65 | unsigned long machine_flags = 0; | 65 | unsigned long machine_flags = 0; |
66 | 66 | ||
67 | struct mem_chunk memory_chunk[MEMORY_CHUNKS]; | 67 | struct mem_chunk __initdata memory_chunk[MEMORY_CHUNKS]; |
68 | volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */ | 68 | volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */ |
69 | unsigned long __initdata zholes_size[MAX_NR_ZONES]; | ||
70 | static unsigned long __initdata memory_end; | 69 | static unsigned long __initdata memory_end; |
71 | 70 | ||
72 | /* | 71 | /* |
@@ -354,21 +353,6 @@ void machine_power_off(void) | |||
354 | */ | 353 | */ |
355 | void (*pm_power_off)(void) = machine_power_off; | 354 | void (*pm_power_off)(void) = machine_power_off; |
356 | 355 | ||
357 | static void __init | ||
358 | add_memory_hole(unsigned long start, unsigned long end) | ||
359 | { | ||
360 | unsigned long dma_pfn = MAX_DMA_ADDRESS >> PAGE_SHIFT; | ||
361 | |||
362 | if (end <= dma_pfn) | ||
363 | zholes_size[ZONE_DMA] += end - start + 1; | ||
364 | else if (start > dma_pfn) | ||
365 | zholes_size[ZONE_NORMAL] += end - start + 1; | ||
366 | else { | ||
367 | zholes_size[ZONE_DMA] += dma_pfn - start + 1; | ||
368 | zholes_size[ZONE_NORMAL] += end - dma_pfn; | ||
369 | } | ||
370 | } | ||
371 | |||
372 | static int __init early_parse_mem(char *p) | 356 | static int __init early_parse_mem(char *p) |
373 | { | 357 | { |
374 | memory_end = memparse(p, &p); | 358 | memory_end = memparse(p, &p); |
@@ -521,7 +505,6 @@ setup_memory(void) | |||
521 | { | 505 | { |
522 | unsigned long bootmap_size; | 506 | unsigned long bootmap_size; |
523 | unsigned long start_pfn, end_pfn, init_pfn; | 507 | unsigned long start_pfn, end_pfn, init_pfn; |
524 | unsigned long last_rw_end; | ||
525 | int i; | 508 | int i; |
526 | 509 | ||
527 | /* | 510 | /* |
@@ -577,39 +560,27 @@ setup_memory(void) | |||
577 | /* | 560 | /* |
578 | * Register RAM areas with the bootmem allocator. | 561 | * Register RAM areas with the bootmem allocator. |
579 | */ | 562 | */ |
580 | last_rw_end = start_pfn; | ||
581 | 563 | ||
582 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { | 564 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { |
583 | unsigned long start_chunk, end_chunk; | 565 | unsigned long start_chunk, end_chunk, pfn; |
584 | 566 | ||
585 | if (memory_chunk[i].type != CHUNK_READ_WRITE) | 567 | if (memory_chunk[i].type != CHUNK_READ_WRITE) |
586 | continue; | 568 | continue; |
587 | start_chunk = (memory_chunk[i].addr + PAGE_SIZE - 1); | 569 | start_chunk = PFN_DOWN(memory_chunk[i].addr); |
588 | start_chunk >>= PAGE_SHIFT; | 570 | end_chunk = start_chunk + PFN_DOWN(memory_chunk[i].size) - 1; |
589 | end_chunk = (memory_chunk[i].addr + memory_chunk[i].size); | 571 | end_chunk = min(end_chunk, end_pfn); |
590 | end_chunk >>= PAGE_SHIFT; | 572 | if (start_chunk >= end_chunk) |
591 | if (start_chunk < start_pfn) | 573 | continue; |
592 | start_chunk = start_pfn; | 574 | add_active_range(0, start_chunk, end_chunk); |
593 | if (end_chunk > end_pfn) | 575 | pfn = max(start_chunk, start_pfn); |
594 | end_chunk = end_pfn; | 576 | for (; pfn <= end_chunk; pfn++) |
595 | if (start_chunk < end_chunk) { | 577 | page_set_storage_key(PFN_PHYS(pfn), PAGE_DEFAULT_KEY); |
596 | /* Initialize storage key for RAM pages */ | ||
597 | for (init_pfn = start_chunk ; init_pfn < end_chunk; | ||
598 | init_pfn++) | ||
599 | page_set_storage_key(init_pfn << PAGE_SHIFT, | ||
600 | PAGE_DEFAULT_KEY); | ||
601 | free_bootmem(start_chunk << PAGE_SHIFT, | ||
602 | (end_chunk - start_chunk) << PAGE_SHIFT); | ||
603 | if (last_rw_end < start_chunk) | ||
604 | add_memory_hole(last_rw_end, start_chunk - 1); | ||
605 | last_rw_end = end_chunk; | ||
606 | } | ||
607 | } | 578 | } |
608 | 579 | ||
609 | psw_set_key(PAGE_DEFAULT_KEY); | 580 | psw_set_key(PAGE_DEFAULT_KEY); |
610 | 581 | ||
611 | if (last_rw_end < end_pfn - 1) | 582 | free_bootmem_with_active_regions(0, max_pfn); |
612 | add_memory_hole(last_rw_end, end_pfn - 1); | 583 | reserve_bootmem(0, PFN_PHYS(start_pfn)); |
613 | 584 | ||
614 | /* | 585 | /* |
615 | * Reserve the bootmem bitmap itself as well. We do this in two | 586 | * Reserve the bootmem bitmap itself as well. We do this in two |
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c index 8741bdc09299..633249c3ba91 100644 --- a/arch/s390/lib/uaccess_pt.c +++ b/arch/s390/lib/uaccess_pt.c | |||
@@ -8,8 +8,8 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <asm/uaccess.h> | ||
12 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <asm/uaccess.h> | ||
13 | #include <asm/futex.h> | 13 | #include <asm/futex.h> |
14 | 14 | ||
15 | static inline int __handle_fault(struct mm_struct *mm, unsigned long address, | 15 | static inline int __handle_fault(struct mm_struct *mm, unsigned long address, |
@@ -60,8 +60,9 @@ out: | |||
60 | 60 | ||
61 | out_of_memory: | 61 | out_of_memory: |
62 | up_read(&mm->mmap_sem); | 62 | up_read(&mm->mmap_sem); |
63 | if (current->pid == 1) { | 63 | if (is_init(current)) { |
64 | yield(); | 64 | yield(); |
65 | down_read(&mm->mmap_sem); | ||
65 | goto survive; | 66 | goto survive; |
66 | } | 67 | } |
67 | printk("VM: killing process %s\n", current->comm); | 68 | printk("VM: killing process %s\n", current->comm); |
diff --git a/arch/s390/mm/Makefile b/arch/s390/mm/Makefile index aa9a42b6e62d..8e09db1edbb9 100644 --- a/arch/s390/mm/Makefile +++ b/arch/s390/mm/Makefile | |||
@@ -2,6 +2,6 @@ | |||
2 | # Makefile for the linux s390-specific parts of the memory manager. | 2 | # Makefile for the linux s390-specific parts of the memory manager. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := init.o fault.o ioremap.o extmem.o mmap.o | 5 | obj-y := init.o fault.o ioremap.o extmem.o mmap.o vmem.o |
6 | obj-$(CONFIG_CMM) += cmm.o | 6 | obj-$(CONFIG_CMM) += cmm.o |
7 | 7 | ||
diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c index 9e9bc48463a5..775bf19e742b 100644 --- a/arch/s390/mm/extmem.c +++ b/arch/s390/mm/extmem.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/bootmem.h> | 16 | #include <linux/bootmem.h> |
17 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | #include <asm/pgtable.h> | ||
19 | #include <asm/ebcdic.h> | 20 | #include <asm/ebcdic.h> |
20 | #include <asm/errno.h> | 21 | #include <asm/errno.h> |
21 | #include <asm/extmem.h> | 22 | #include <asm/extmem.h> |
@@ -238,65 +239,6 @@ query_segment_type (struct dcss_segment *seg) | |||
238 | } | 239 | } |
239 | 240 | ||
240 | /* | 241 | /* |
241 | * check if the given segment collides with guest storage. | ||
242 | * returns 1 if this is the case, 0 if no collision was found | ||
243 | */ | ||
244 | static int | ||
245 | segment_overlaps_storage(struct dcss_segment *seg) | ||
246 | { | ||
247 | int i; | ||
248 | |||
249 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { | ||
250 | if (memory_chunk[i].type != CHUNK_READ_WRITE) | ||
251 | continue; | ||
252 | if ((memory_chunk[i].addr >> 20) > (seg->end >> 20)) | ||
253 | continue; | ||
254 | if (((memory_chunk[i].addr + memory_chunk[i].size - 1) >> 20) | ||
255 | < (seg->start_addr >> 20)) | ||
256 | continue; | ||
257 | return 1; | ||
258 | } | ||
259 | return 0; | ||
260 | } | ||
261 | |||
262 | /* | ||
263 | * check if segment collides with other segments that are currently loaded | ||
264 | * returns 1 if this is the case, 0 if no collision was found | ||
265 | */ | ||
266 | static int | ||
267 | segment_overlaps_others (struct dcss_segment *seg) | ||
268 | { | ||
269 | struct list_head *l; | ||
270 | struct dcss_segment *tmp; | ||
271 | |||
272 | BUG_ON(!mutex_is_locked(&dcss_lock)); | ||
273 | list_for_each(l, &dcss_list) { | ||
274 | tmp = list_entry(l, struct dcss_segment, list); | ||
275 | if ((tmp->start_addr >> 20) > (seg->end >> 20)) | ||
276 | continue; | ||
277 | if ((tmp->end >> 20) < (seg->start_addr >> 20)) | ||
278 | continue; | ||
279 | if (seg == tmp) | ||
280 | continue; | ||
281 | return 1; | ||
282 | } | ||
283 | return 0; | ||
284 | } | ||
285 | |||
286 | /* | ||
287 | * check if segment exceeds the kernel mapping range (detected or set via mem=) | ||
288 | * returns 1 if this is the case, 0 if segment fits into the range | ||
289 | */ | ||
290 | static inline int | ||
291 | segment_exceeds_range (struct dcss_segment *seg) | ||
292 | { | ||
293 | int seg_last_pfn = (seg->end) >> PAGE_SHIFT; | ||
294 | if (seg_last_pfn > max_pfn) | ||
295 | return 1; | ||
296 | return 0; | ||
297 | } | ||
298 | |||
299 | /* | ||
300 | * get info about a segment | 242 | * get info about a segment |
301 | * possible return values: | 243 | * possible return values: |
302 | * -ENOSYS : we are not running on VM | 244 | * -ENOSYS : we are not running on VM |
@@ -341,24 +283,26 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long | |||
341 | rc = query_segment_type (seg); | 283 | rc = query_segment_type (seg); |
342 | if (rc < 0) | 284 | if (rc < 0) |
343 | goto out_free; | 285 | goto out_free; |
344 | if (segment_exceeds_range(seg)) { | 286 | |
345 | PRINT_WARN ("segment_load: not loading segment %s - exceeds" | 287 | rc = add_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1); |
346 | " kernel mapping range\n",name); | 288 | |
347 | rc = -ERANGE; | 289 | switch (rc) { |
290 | case 0: | ||
291 | break; | ||
292 | case -ENOSPC: | ||
293 | PRINT_WARN("segment_load: not loading segment %s - overlaps " | ||
294 | "storage/segment\n", name); | ||
348 | goto out_free; | 295 | goto out_free; |
349 | } | 296 | case -ERANGE: |
350 | if (segment_overlaps_storage(seg)) { | 297 | PRINT_WARN("segment_load: not loading segment %s - exceeds " |
351 | PRINT_WARN ("segment_load: not loading segment %s - overlaps" | 298 | "kernel mapping range\n", name); |
352 | " storage\n",name); | ||
353 | rc = -ENOSPC; | ||
354 | goto out_free; | 299 | goto out_free; |
355 | } | 300 | default: |
356 | if (segment_overlaps_others(seg)) { | 301 | PRINT_WARN("segment_load: not loading segment %s (rc: %d)\n", |
357 | PRINT_WARN ("segment_load: not loading segment %s - overlaps" | 302 | name, rc); |
358 | " other segments\n",name); | ||
359 | rc = -EBUSY; | ||
360 | goto out_free; | 303 | goto out_free; |
361 | } | 304 | } |
305 | |||
362 | if (do_nonshared) | 306 | if (do_nonshared) |
363 | dcss_command = DCSS_LOADNSR; | 307 | dcss_command = DCSS_LOADNSR; |
364 | else | 308 | else |
@@ -372,7 +316,7 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long | |||
372 | rc = dcss_diag_translate_rc (seg->end); | 316 | rc = dcss_diag_translate_rc (seg->end); |
373 | dcss_diag(DCSS_PURGESEG, seg->dcss_name, | 317 | dcss_diag(DCSS_PURGESEG, seg->dcss_name, |
374 | &seg->start_addr, &seg->end); | 318 | &seg->start_addr, &seg->end); |
375 | goto out_free; | 319 | goto out_shared; |
376 | } | 320 | } |
377 | seg->do_nonshared = do_nonshared; | 321 | seg->do_nonshared = do_nonshared; |
378 | atomic_set(&seg->ref_count, 1); | 322 | atomic_set(&seg->ref_count, 1); |
@@ -391,6 +335,8 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long | |||
391 | (void*)seg->start_addr, (void*)seg->end, | 335 | (void*)seg->start_addr, (void*)seg->end, |
392 | segtype_string[seg->vm_segtype]); | 336 | segtype_string[seg->vm_segtype]); |
393 | goto out; | 337 | goto out; |
338 | out_shared: | ||
339 | remove_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1); | ||
394 | out_free: | 340 | out_free: |
395 | kfree(seg); | 341 | kfree(seg); |
396 | out: | 342 | out: |
@@ -530,12 +476,12 @@ segment_unload(char *name) | |||
530 | "please report to linux390@de.ibm.com\n",name); | 476 | "please report to linux390@de.ibm.com\n",name); |
531 | goto out_unlock; | 477 | goto out_unlock; |
532 | } | 478 | } |
533 | if (atomic_dec_return(&seg->ref_count) == 0) { | 479 | if (atomic_dec_return(&seg->ref_count) != 0) |
534 | list_del(&seg->list); | 480 | goto out_unlock; |
535 | dcss_diag(DCSS_PURGESEG, seg->dcss_name, | 481 | remove_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1); |
536 | &dummy, &dummy); | 482 | list_del(&seg->list); |
537 | kfree(seg); | 483 | dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy); |
538 | } | 484 | kfree(seg); |
539 | out_unlock: | 485 | out_unlock: |
540 | mutex_unlock(&dcss_lock); | 486 | mutex_unlock(&dcss_lock); |
541 | } | 487 | } |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index e1881c31b1cb..4bb21be3b007 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/pagemap.h> | 24 | #include <linux/pagemap.h> |
25 | #include <linux/bootmem.h> | 25 | #include <linux/bootmem.h> |
26 | #include <linux/pfn.h> | 26 | #include <linux/pfn.h> |
27 | #include <linux/poison.h> | ||
27 | 28 | ||
28 | #include <asm/processor.h> | 29 | #include <asm/processor.h> |
29 | #include <asm/system.h> | 30 | #include <asm/system.h> |
@@ -69,6 +70,8 @@ void show_mem(void) | |||
69 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); | 70 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); |
70 | i = max_mapnr; | 71 | i = max_mapnr; |
71 | while (i-- > 0) { | 72 | while (i-- > 0) { |
73 | if (!pfn_valid(i)) | ||
74 | continue; | ||
72 | page = pfn_to_page(i); | 75 | page = pfn_to_page(i); |
73 | total++; | 76 | total++; |
74 | if (PageReserved(page)) | 77 | if (PageReserved(page)) |
@@ -84,150 +87,52 @@ void show_mem(void) | |||
84 | printk("%d pages swap cached\n",cached); | 87 | printk("%d pages swap cached\n",cached); |
85 | } | 88 | } |
86 | 89 | ||
87 | extern unsigned long __initdata zholes_size[]; | 90 | static void __init setup_ro_region(void) |
88 | /* | ||
89 | * paging_init() sets up the page tables | ||
90 | */ | ||
91 | |||
92 | #ifndef CONFIG_64BIT | ||
93 | void __init paging_init(void) | ||
94 | { | 91 | { |
95 | pgd_t * pg_dir; | 92 | pgd_t *pgd; |
96 | pte_t * pg_table; | 93 | pmd_t *pmd; |
97 | pte_t pte; | 94 | pte_t *pte; |
98 | int i; | 95 | pte_t new_pte; |
99 | unsigned long tmp; | 96 | unsigned long address, end; |
100 | unsigned long pfn = 0; | 97 | |
101 | unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE; | 98 | address = ((unsigned long)&__start_rodata) & PAGE_MASK; |
102 | static const int ssm_mask = 0x04000000L; | 99 | end = PFN_ALIGN((unsigned long)&__end_rodata); |
103 | unsigned long ro_start_pfn, ro_end_pfn; | 100 | |
104 | unsigned long zones_size[MAX_NR_ZONES]; | 101 | for (; address < end; address += PAGE_SIZE) { |
105 | 102 | pgd = pgd_offset_k(address); | |
106 | ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); | 103 | pmd = pmd_offset(pgd, address); |
107 | ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); | 104 | pte = pte_offset_kernel(pmd, address); |
108 | 105 | new_pte = mk_pte_phys(address, __pgprot(_PAGE_RO)); | |
109 | memset(zones_size, 0, sizeof(zones_size)); | 106 | set_pte(pte, new_pte); |
110 | zones_size[ZONE_DMA] = max_low_pfn; | 107 | } |
111 | free_area_init_node(0, &contig_page_data, zones_size, | ||
112 | __pa(PAGE_OFFSET) >> PAGE_SHIFT, | ||
113 | zholes_size); | ||
114 | |||
115 | /* unmap whole virtual address space */ | ||
116 | |||
117 | pg_dir = swapper_pg_dir; | ||
118 | |||
119 | for (i = 0; i < PTRS_PER_PGD; i++) | ||
120 | pmd_clear((pmd_t *) pg_dir++); | ||
121 | |||
122 | /* | ||
123 | * map whole physical memory to virtual memory (identity mapping) | ||
124 | */ | ||
125 | |||
126 | pg_dir = swapper_pg_dir; | ||
127 | |||
128 | while (pfn < max_low_pfn) { | ||
129 | /* | ||
130 | * pg_table is physical at this point | ||
131 | */ | ||
132 | pg_table = (pte_t *) alloc_bootmem_pages(PAGE_SIZE); | ||
133 | |||
134 | pmd_populate_kernel(&init_mm, (pmd_t *) pg_dir, pg_table); | ||
135 | pg_dir++; | ||
136 | |||
137 | for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) { | ||
138 | if (pfn >= ro_start_pfn && pfn < ro_end_pfn) | ||
139 | pte = pfn_pte(pfn, __pgprot(_PAGE_RO)); | ||
140 | else | ||
141 | pte = pfn_pte(pfn, PAGE_KERNEL); | ||
142 | if (pfn >= max_low_pfn) | ||
143 | pte_val(pte) = _PAGE_TYPE_EMPTY; | ||
144 | set_pte(pg_table, pte); | ||
145 | pfn++; | ||
146 | } | ||
147 | } | ||
148 | |||
149 | S390_lowcore.kernel_asce = pgdir_k; | ||
150 | |||
151 | /* enable virtual mapping in kernel mode */ | ||
152 | __ctl_load(pgdir_k, 1, 1); | ||
153 | __ctl_load(pgdir_k, 7, 7); | ||
154 | __ctl_load(pgdir_k, 13, 13); | ||
155 | __raw_local_irq_ssm(ssm_mask); | ||
156 | |||
157 | local_flush_tlb(); | ||
158 | } | 108 | } |
159 | 109 | ||
160 | #else /* CONFIG_64BIT */ | 110 | extern void vmem_map_init(void); |
161 | 111 | ||
112 | /* | ||
113 | * paging_init() sets up the page tables | ||
114 | */ | ||
162 | void __init paging_init(void) | 115 | void __init paging_init(void) |
163 | { | 116 | { |
164 | pgd_t * pg_dir; | 117 | pgd_t *pg_dir; |
165 | pmd_t * pm_dir; | 118 | int i; |
166 | pte_t * pt_dir; | 119 | unsigned long pgdir_k; |
167 | pte_t pte; | ||
168 | int i,j,k; | ||
169 | unsigned long pfn = 0; | ||
170 | unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | | ||
171 | _KERN_REGION_TABLE; | ||
172 | static const int ssm_mask = 0x04000000L; | 120 | static const int ssm_mask = 0x04000000L; |
173 | unsigned long zones_size[MAX_NR_ZONES]; | 121 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
174 | unsigned long dma_pfn, high_pfn; | ||
175 | unsigned long ro_start_pfn, ro_end_pfn; | ||
176 | |||
177 | memset(zones_size, 0, sizeof(zones_size)); | ||
178 | dma_pfn = MAX_DMA_ADDRESS >> PAGE_SHIFT; | ||
179 | high_pfn = max_low_pfn; | ||
180 | ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); | ||
181 | ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); | ||
182 | |||
183 | if (dma_pfn > high_pfn) | ||
184 | zones_size[ZONE_DMA] = high_pfn; | ||
185 | else { | ||
186 | zones_size[ZONE_DMA] = dma_pfn; | ||
187 | zones_size[ZONE_NORMAL] = high_pfn - dma_pfn; | ||
188 | } | ||
189 | |||
190 | /* Initialize mem_map[]. */ | ||
191 | free_area_init_node(0, &contig_page_data, zones_size, | ||
192 | __pa(PAGE_OFFSET) >> PAGE_SHIFT, zholes_size); | ||
193 | 122 | ||
194 | /* | 123 | pg_dir = swapper_pg_dir; |
195 | * map whole physical memory to virtual memory (identity mapping) | ||
196 | */ | ||
197 | |||
198 | pg_dir = swapper_pg_dir; | ||
199 | |||
200 | for (i = 0 ; i < PTRS_PER_PGD ; i++,pg_dir++) { | ||
201 | 124 | ||
202 | if (pfn >= max_low_pfn) { | 125 | #ifdef CONFIG_64BIT |
203 | pgd_clear(pg_dir); | 126 | pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERN_REGION_TABLE; |
204 | continue; | 127 | for (i = 0; i < PTRS_PER_PGD; i++) |
205 | } | 128 | pgd_clear(pg_dir + i); |
206 | 129 | #else | |
207 | pm_dir = (pmd_t *) alloc_bootmem_pages(PAGE_SIZE * 4); | 130 | pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE; |
208 | pgd_populate(&init_mm, pg_dir, pm_dir); | 131 | for (i = 0; i < PTRS_PER_PGD; i++) |
209 | 132 | pmd_clear((pmd_t *)(pg_dir + i)); | |
210 | for (j = 0 ; j < PTRS_PER_PMD ; j++,pm_dir++) { | 133 | #endif |
211 | if (pfn >= max_low_pfn) { | 134 | vmem_map_init(); |
212 | pmd_clear(pm_dir); | 135 | setup_ro_region(); |
213 | continue; | ||
214 | } | ||
215 | |||
216 | pt_dir = (pte_t *) alloc_bootmem_pages(PAGE_SIZE); | ||
217 | pmd_populate_kernel(&init_mm, pm_dir, pt_dir); | ||
218 | |||
219 | for (k = 0 ; k < PTRS_PER_PTE ; k++,pt_dir++) { | ||
220 | if (pfn >= ro_start_pfn && pfn < ro_end_pfn) | ||
221 | pte = pfn_pte(pfn, __pgprot(_PAGE_RO)); | ||
222 | else | ||
223 | pte = pfn_pte(pfn, PAGE_KERNEL); | ||
224 | if (pfn >= max_low_pfn) | ||
225 | pte_val(pte) = _PAGE_TYPE_EMPTY; | ||
226 | set_pte(pt_dir, pte); | ||
227 | pfn++; | ||
228 | } | ||
229 | } | ||
230 | } | ||
231 | 136 | ||
232 | S390_lowcore.kernel_asce = pgdir_k; | 137 | S390_lowcore.kernel_asce = pgdir_k; |
233 | 138 | ||
@@ -237,9 +142,11 @@ void __init paging_init(void) | |||
237 | __ctl_load(pgdir_k, 13, 13); | 142 | __ctl_load(pgdir_k, 13, 13); |
238 | __raw_local_irq_ssm(ssm_mask); | 143 | __raw_local_irq_ssm(ssm_mask); |
239 | 144 | ||
240 | local_flush_tlb(); | 145 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
146 | max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS); | ||
147 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; | ||
148 | free_area_init_nodes(max_zone_pfns); | ||
241 | } | 149 | } |
242 | #endif /* CONFIG_64BIT */ | ||
243 | 150 | ||
244 | void __init mem_init(void) | 151 | void __init mem_init(void) |
245 | { | 152 | { |
@@ -269,6 +176,8 @@ void __init mem_init(void) | |||
269 | printk("Write protected kernel read-only data: %#lx - %#lx\n", | 176 | printk("Write protected kernel read-only data: %#lx - %#lx\n", |
270 | (unsigned long)&__start_rodata, | 177 | (unsigned long)&__start_rodata, |
271 | PFN_ALIGN((unsigned long)&__end_rodata) - 1); | 178 | PFN_ALIGN((unsigned long)&__end_rodata) - 1); |
179 | printk("Virtual memmap size: %ldk\n", | ||
180 | (max_pfn * sizeof(struct page)) >> 10); | ||
272 | } | 181 | } |
273 | 182 | ||
274 | void free_initmem(void) | 183 | void free_initmem(void) |
@@ -279,6 +188,7 @@ void free_initmem(void) | |||
279 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | 188 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { |
280 | ClearPageReserved(virt_to_page(addr)); | 189 | ClearPageReserved(virt_to_page(addr)); |
281 | init_page_count(virt_to_page(addr)); | 190 | init_page_count(virt_to_page(addr)); |
191 | memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); | ||
282 | free_page(addr); | 192 | free_page(addr); |
283 | totalram_pages++; | 193 | totalram_pages++; |
284 | } | 194 | } |
diff --git a/arch/s390/mm/ioremap.c b/arch/s390/mm/ioremap.c index 0f6e9ecbefe2..3d2100a4e209 100644 --- a/arch/s390/mm/ioremap.c +++ b/arch/s390/mm/ioremap.c | |||
@@ -15,87 +15,8 @@ | |||
15 | 15 | ||
16 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <asm/io.h> | 18 | #include <linux/io.h> |
19 | #include <asm/pgalloc.h> | 19 | #include <asm/pgalloc.h> |
20 | #include <asm/cacheflush.h> | ||
21 | #include <asm/tlbflush.h> | ||
22 | |||
23 | static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, | ||
24 | unsigned long phys_addr, unsigned long flags) | ||
25 | { | ||
26 | unsigned long end; | ||
27 | unsigned long pfn; | ||
28 | |||
29 | address &= ~PMD_MASK; | ||
30 | end = address + size; | ||
31 | if (end > PMD_SIZE) | ||
32 | end = PMD_SIZE; | ||
33 | if (address >= end) | ||
34 | BUG(); | ||
35 | pfn = phys_addr >> PAGE_SHIFT; | ||
36 | do { | ||
37 | if (!pte_none(*pte)) { | ||
38 | printk("remap_area_pte: page already exists\n"); | ||
39 | BUG(); | ||
40 | } | ||
41 | set_pte(pte, pfn_pte(pfn, __pgprot(flags))); | ||
42 | address += PAGE_SIZE; | ||
43 | pfn++; | ||
44 | pte++; | ||
45 | } while (address && (address < end)); | ||
46 | } | ||
47 | |||
48 | static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, | ||
49 | unsigned long phys_addr, unsigned long flags) | ||
50 | { | ||
51 | unsigned long end; | ||
52 | |||
53 | address &= ~PGDIR_MASK; | ||
54 | end = address + size; | ||
55 | if (end > PGDIR_SIZE) | ||
56 | end = PGDIR_SIZE; | ||
57 | phys_addr -= address; | ||
58 | if (address >= end) | ||
59 | BUG(); | ||
60 | do { | ||
61 | pte_t * pte = pte_alloc_kernel(pmd, address); | ||
62 | if (!pte) | ||
63 | return -ENOMEM; | ||
64 | remap_area_pte(pte, address, end - address, address + phys_addr, flags); | ||
65 | address = (address + PMD_SIZE) & PMD_MASK; | ||
66 | pmd++; | ||
67 | } while (address && (address < end)); | ||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | static int remap_area_pages(unsigned long address, unsigned long phys_addr, | ||
72 | unsigned long size, unsigned long flags) | ||
73 | { | ||
74 | int error; | ||
75 | pgd_t * dir; | ||
76 | unsigned long end = address + size; | ||
77 | |||
78 | phys_addr -= address; | ||
79 | dir = pgd_offset(&init_mm, address); | ||
80 | flush_cache_all(); | ||
81 | if (address >= end) | ||
82 | BUG(); | ||
83 | do { | ||
84 | pmd_t *pmd; | ||
85 | pmd = pmd_alloc(&init_mm, dir, address); | ||
86 | error = -ENOMEM; | ||
87 | if (!pmd) | ||
88 | break; | ||
89 | if (remap_area_pmd(pmd, address, end - address, | ||
90 | phys_addr + address, flags)) | ||
91 | break; | ||
92 | error = 0; | ||
93 | address = (address + PGDIR_SIZE) & PGDIR_MASK; | ||
94 | dir++; | ||
95 | } while (address && (address < end)); | ||
96 | flush_tlb_all(); | ||
97 | return 0; | ||
98 | } | ||
99 | 20 | ||
100 | /* | 21 | /* |
101 | * Generic mapping function (not visible outside): | 22 | * Generic mapping function (not visible outside): |
@@ -122,7 +43,8 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag | |||
122 | if (!area) | 43 | if (!area) |
123 | return NULL; | 44 | return NULL; |
124 | addr = area->addr; | 45 | addr = area->addr; |
125 | if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { | 46 | if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, |
47 | phys_addr, __pgprot(flags))) { | ||
126 | vfree(addr); | 48 | vfree(addr); |
127 | return NULL; | 49 | return NULL; |
128 | } | 50 | } |
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c new file mode 100644 index 000000000000..7f2944d3ec2a --- /dev/null +++ b/arch/s390/mm/vmem.c | |||
@@ -0,0 +1,381 @@ | |||
1 | /* | ||
2 | * arch/s390/mm/vmem.c | ||
3 | * | ||
4 | * Copyright IBM Corp. 2006 | ||
5 | * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com> | ||
6 | */ | ||
7 | |||
8 | #include <linux/bootmem.h> | ||
9 | #include <linux/pfn.h> | ||
10 | #include <linux/mm.h> | ||
11 | #include <linux/module.h> | ||
12 | #include <linux/list.h> | ||
13 | #include <asm/pgalloc.h> | ||
14 | #include <asm/pgtable.h> | ||
15 | #include <asm/setup.h> | ||
16 | #include <asm/tlbflush.h> | ||
17 | |||
18 | unsigned long vmalloc_end; | ||
19 | EXPORT_SYMBOL(vmalloc_end); | ||
20 | |||
21 | static struct page *vmem_map; | ||
22 | static DEFINE_MUTEX(vmem_mutex); | ||
23 | |||
24 | struct memory_segment { | ||
25 | struct list_head list; | ||
26 | unsigned long start; | ||
27 | unsigned long size; | ||
28 | }; | ||
29 | |||
30 | static LIST_HEAD(mem_segs); | ||
31 | |||
32 | void memmap_init(unsigned long size, int nid, unsigned long zone, | ||
33 | unsigned long start_pfn) | ||
34 | { | ||
35 | struct page *start, *end; | ||
36 | struct page *map_start, *map_end; | ||
37 | int i; | ||
38 | |||
39 | start = pfn_to_page(start_pfn); | ||
40 | end = start + size; | ||
41 | |||
42 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { | ||
43 | unsigned long cstart, cend; | ||
44 | |||
45 | cstart = PFN_DOWN(memory_chunk[i].addr); | ||
46 | cend = cstart + PFN_DOWN(memory_chunk[i].size); | ||
47 | |||
48 | map_start = mem_map + cstart; | ||
49 | map_end = mem_map + cend; | ||
50 | |||
51 | if (map_start < start) | ||
52 | map_start = start; | ||
53 | if (map_end > end) | ||
54 | map_end = end; | ||
55 | |||
56 | map_start -= ((unsigned long) map_start & (PAGE_SIZE - 1)) | ||
57 | / sizeof(struct page); | ||
58 | map_end += ((PFN_ALIGN((unsigned long) map_end) | ||
59 | - (unsigned long) map_end) | ||
60 | / sizeof(struct page)); | ||
61 | |||
62 | if (map_start < map_end) | ||
63 | memmap_init_zone((unsigned long)(map_end - map_start), | ||
64 | nid, zone, page_to_pfn(map_start)); | ||
65 | } | ||
66 | } | ||
67 | |||
68 | static inline void *vmem_alloc_pages(unsigned int order) | ||
69 | { | ||
70 | if (slab_is_available()) | ||
71 | return (void *)__get_free_pages(GFP_KERNEL, order); | ||
72 | return alloc_bootmem_pages((1 << order) * PAGE_SIZE); | ||
73 | } | ||
74 | |||
75 | static inline pmd_t *vmem_pmd_alloc(void) | ||
76 | { | ||
77 | pmd_t *pmd; | ||
78 | int i; | ||
79 | |||
80 | pmd = vmem_alloc_pages(PMD_ALLOC_ORDER); | ||
81 | if (!pmd) | ||
82 | return NULL; | ||
83 | for (i = 0; i < PTRS_PER_PMD; i++) | ||
84 | pmd_clear(pmd + i); | ||
85 | return pmd; | ||
86 | } | ||
87 | |||
88 | static inline pte_t *vmem_pte_alloc(void) | ||
89 | { | ||
90 | pte_t *pte; | ||
91 | pte_t empty_pte; | ||
92 | int i; | ||
93 | |||
94 | pte = vmem_alloc_pages(PTE_ALLOC_ORDER); | ||
95 | if (!pte) | ||
96 | return NULL; | ||
97 | pte_val(empty_pte) = _PAGE_TYPE_EMPTY; | ||
98 | for (i = 0; i < PTRS_PER_PTE; i++) | ||
99 | set_pte(pte + i, empty_pte); | ||
100 | return pte; | ||
101 | } | ||
102 | |||
103 | /* | ||
104 | * Add a physical memory range to the 1:1 mapping. | ||
105 | */ | ||
106 | static int vmem_add_range(unsigned long start, unsigned long size) | ||
107 | { | ||
108 | unsigned long address; | ||
109 | pgd_t *pg_dir; | ||
110 | pmd_t *pm_dir; | ||
111 | pte_t *pt_dir; | ||
112 | pte_t pte; | ||
113 | int ret = -ENOMEM; | ||
114 | |||
115 | for (address = start; address < start + size; address += PAGE_SIZE) { | ||
116 | pg_dir = pgd_offset_k(address); | ||
117 | if (pgd_none(*pg_dir)) { | ||
118 | pm_dir = vmem_pmd_alloc(); | ||
119 | if (!pm_dir) | ||
120 | goto out; | ||
121 | pgd_populate(&init_mm, pg_dir, pm_dir); | ||
122 | } | ||
123 | |||
124 | pm_dir = pmd_offset(pg_dir, address); | ||
125 | if (pmd_none(*pm_dir)) { | ||
126 | pt_dir = vmem_pte_alloc(); | ||
127 | if (!pt_dir) | ||
128 | goto out; | ||
129 | pmd_populate_kernel(&init_mm, pm_dir, pt_dir); | ||
130 | } | ||
131 | |||
132 | pt_dir = pte_offset_kernel(pm_dir, address); | ||
133 | pte = pfn_pte(address >> PAGE_SHIFT, PAGE_KERNEL); | ||
134 | set_pte(pt_dir, pte); | ||
135 | } | ||
136 | ret = 0; | ||
137 | out: | ||
138 | flush_tlb_kernel_range(start, start + size); | ||
139 | return ret; | ||
140 | } | ||
141 | |||
142 | /* | ||
143 | * Remove a physical memory range from the 1:1 mapping. | ||
144 | * Currently only invalidates page table entries. | ||
145 | */ | ||
146 | static void vmem_remove_range(unsigned long start, unsigned long size) | ||
147 | { | ||
148 | unsigned long address; | ||
149 | pgd_t *pg_dir; | ||
150 | pmd_t *pm_dir; | ||
151 | pte_t *pt_dir; | ||
152 | pte_t pte; | ||
153 | |||
154 | pte_val(pte) = _PAGE_TYPE_EMPTY; | ||
155 | for (address = start; address < start + size; address += PAGE_SIZE) { | ||
156 | pg_dir = pgd_offset_k(address); | ||
157 | if (pgd_none(*pg_dir)) | ||
158 | continue; | ||
159 | pm_dir = pmd_offset(pg_dir, address); | ||
160 | if (pmd_none(*pm_dir)) | ||
161 | continue; | ||
162 | pt_dir = pte_offset_kernel(pm_dir, address); | ||
163 | set_pte(pt_dir, pte); | ||
164 | } | ||
165 | flush_tlb_kernel_range(start, start + size); | ||
166 | } | ||
167 | |||
168 | /* | ||
169 | * Add a backed mem_map array to the virtual mem_map array. | ||
170 | */ | ||
171 | static int vmem_add_mem_map(unsigned long start, unsigned long size) | ||
172 | { | ||
173 | unsigned long address, start_addr, end_addr; | ||
174 | struct page *map_start, *map_end; | ||
175 | pgd_t *pg_dir; | ||
176 | pmd_t *pm_dir; | ||
177 | pte_t *pt_dir; | ||
178 | pte_t pte; | ||
179 | int ret = -ENOMEM; | ||
180 | |||
181 | map_start = vmem_map + PFN_DOWN(start); | ||
182 | map_end = vmem_map + PFN_DOWN(start + size); | ||
183 | |||
184 | start_addr = (unsigned long) map_start & PAGE_MASK; | ||
185 | end_addr = PFN_ALIGN((unsigned long) map_end); | ||
186 | |||
187 | for (address = start_addr; address < end_addr; address += PAGE_SIZE) { | ||
188 | pg_dir = pgd_offset_k(address); | ||
189 | if (pgd_none(*pg_dir)) { | ||
190 | pm_dir = vmem_pmd_alloc(); | ||
191 | if (!pm_dir) | ||
192 | goto out; | ||
193 | pgd_populate(&init_mm, pg_dir, pm_dir); | ||
194 | } | ||
195 | |||
196 | pm_dir = pmd_offset(pg_dir, address); | ||
197 | if (pmd_none(*pm_dir)) { | ||
198 | pt_dir = vmem_pte_alloc(); | ||
199 | if (!pt_dir) | ||
200 | goto out; | ||
201 | pmd_populate_kernel(&init_mm, pm_dir, pt_dir); | ||
202 | } | ||
203 | |||
204 | pt_dir = pte_offset_kernel(pm_dir, address); | ||
205 | if (pte_none(*pt_dir)) { | ||
206 | unsigned long new_page; | ||
207 | |||
208 | new_page =__pa(vmem_alloc_pages(0)); | ||
209 | if (!new_page) | ||
210 | goto out; | ||
211 | pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL); | ||
212 | set_pte(pt_dir, pte); | ||
213 | } | ||
214 | } | ||
215 | ret = 0; | ||
216 | out: | ||
217 | flush_tlb_kernel_range(start_addr, end_addr); | ||
218 | return ret; | ||
219 | } | ||
220 | |||
221 | static int vmem_add_mem(unsigned long start, unsigned long size) | ||
222 | { | ||
223 | int ret; | ||
224 | |||
225 | ret = vmem_add_range(start, size); | ||
226 | if (ret) | ||
227 | return ret; | ||
228 | return vmem_add_mem_map(start, size); | ||
229 | } | ||
230 | |||
231 | /* | ||
232 | * Add memory segment to the segment list if it doesn't overlap with | ||
233 | * an already present segment. | ||
234 | */ | ||
235 | static int insert_memory_segment(struct memory_segment *seg) | ||
236 | { | ||
237 | struct memory_segment *tmp; | ||
238 | |||
239 | if (PFN_DOWN(seg->start + seg->size) > max_pfn || | ||
240 | seg->start + seg->size < seg->start) | ||
241 | return -ERANGE; | ||
242 | |||
243 | list_for_each_entry(tmp, &mem_segs, list) { | ||
244 | if (seg->start >= tmp->start + tmp->size) | ||
245 | continue; | ||
246 | if (seg->start + seg->size <= tmp->start) | ||
247 | continue; | ||
248 | return -ENOSPC; | ||
249 | } | ||
250 | list_add(&seg->list, &mem_segs); | ||
251 | return 0; | ||
252 | } | ||
253 | |||
254 | /* | ||
255 | * Remove memory segment from the segment list. | ||
256 | */ | ||
257 | static void remove_memory_segment(struct memory_segment *seg) | ||
258 | { | ||
259 | list_del(&seg->list); | ||
260 | } | ||
261 | |||
262 | static void __remove_shared_memory(struct memory_segment *seg) | ||
263 | { | ||
264 | remove_memory_segment(seg); | ||
265 | vmem_remove_range(seg->start, seg->size); | ||
266 | } | ||
267 | |||
268 | int remove_shared_memory(unsigned long start, unsigned long size) | ||
269 | { | ||
270 | struct memory_segment *seg; | ||
271 | int ret; | ||
272 | |||
273 | mutex_lock(&vmem_mutex); | ||
274 | |||
275 | ret = -ENOENT; | ||
276 | list_for_each_entry(seg, &mem_segs, list) { | ||
277 | if (seg->start == start && seg->size == size) | ||
278 | break; | ||
279 | } | ||
280 | |||
281 | if (seg->start != start || seg->size != size) | ||
282 | goto out; | ||
283 | |||
284 | ret = 0; | ||
285 | __remove_shared_memory(seg); | ||
286 | kfree(seg); | ||
287 | out: | ||
288 | mutex_unlock(&vmem_mutex); | ||
289 | return ret; | ||
290 | } | ||
291 | |||
292 | int add_shared_memory(unsigned long start, unsigned long size) | ||
293 | { | ||
294 | struct memory_segment *seg; | ||
295 | struct page *page; | ||
296 | unsigned long pfn, num_pfn, end_pfn; | ||
297 | int ret; | ||
298 | |||
299 | mutex_lock(&vmem_mutex); | ||
300 | ret = -ENOMEM; | ||
301 | seg = kzalloc(sizeof(*seg), GFP_KERNEL); | ||
302 | if (!seg) | ||
303 | goto out; | ||
304 | seg->start = start; | ||
305 | seg->size = size; | ||
306 | |||
307 | ret = insert_memory_segment(seg); | ||
308 | if (ret) | ||
309 | goto out_free; | ||
310 | |||
311 | ret = vmem_add_mem(start, size); | ||
312 | if (ret) | ||
313 | goto out_remove; | ||
314 | |||
315 | pfn = PFN_DOWN(start); | ||
316 | num_pfn = PFN_DOWN(size); | ||
317 | end_pfn = pfn + num_pfn; | ||
318 | |||
319 | page = pfn_to_page(pfn); | ||
320 | memset(page, 0, num_pfn * sizeof(struct page)); | ||
321 | |||
322 | for (; pfn < end_pfn; pfn++) { | ||
323 | page = pfn_to_page(pfn); | ||
324 | init_page_count(page); | ||
325 | reset_page_mapcount(page); | ||
326 | SetPageReserved(page); | ||
327 | INIT_LIST_HEAD(&page->lru); | ||
328 | } | ||
329 | goto out; | ||
330 | |||
331 | out_remove: | ||
332 | __remove_shared_memory(seg); | ||
333 | out_free: | ||
334 | kfree(seg); | ||
335 | out: | ||
336 | mutex_unlock(&vmem_mutex); | ||
337 | return ret; | ||
338 | } | ||
339 | |||
340 | /* | ||
341 | * map whole physical memory to virtual memory (identity mapping) | ||
342 | */ | ||
343 | void __init vmem_map_init(void) | ||
344 | { | ||
345 | unsigned long map_size; | ||
346 | int i; | ||
347 | |||
348 | map_size = ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) * sizeof(struct page); | ||
349 | vmalloc_end = PFN_ALIGN(VMALLOC_END_INIT) - PFN_ALIGN(map_size); | ||
350 | vmem_map = (struct page *) vmalloc_end; | ||
351 | NODE_DATA(0)->node_mem_map = vmem_map; | ||
352 | |||
353 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) | ||
354 | vmem_add_mem(memory_chunk[i].addr, memory_chunk[i].size); | ||
355 | } | ||
356 | |||
357 | /* | ||
358 | * Convert memory chunk array to a memory segment list so there is a single | ||
359 | * list that contains both r/w memory and shared memory segments. | ||
360 | */ | ||
361 | static int __init vmem_convert_memory_chunk(void) | ||
362 | { | ||
363 | struct memory_segment *seg; | ||
364 | int i; | ||
365 | |||
366 | mutex_lock(&vmem_mutex); | ||
367 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { | ||
368 | if (!memory_chunk[i].size) | ||
369 | continue; | ||
370 | seg = kzalloc(sizeof(*seg), GFP_KERNEL); | ||
371 | if (!seg) | ||
372 | panic("Out of memory...\n"); | ||
373 | seg->start = memory_chunk[i].addr; | ||
374 | seg->size = memory_chunk[i].size; | ||
375 | insert_memory_segment(seg); | ||
376 | } | ||
377 | mutex_unlock(&vmem_mutex); | ||
378 | return 0; | ||
379 | } | ||
380 | |||
381 | core_initcall(vmem_convert_memory_chunk); | ||
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index d83d64af31f2..8e24c40662e3 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -59,6 +59,14 @@ config LOCKDEP_SUPPORT | |||
59 | bool | 59 | bool |
60 | default y | 60 | default y |
61 | 61 | ||
62 | config ARCH_HAS_ILOG2_U32 | ||
63 | bool | ||
64 | default n | ||
65 | |||
66 | config ARCH_HAS_ILOG2_U64 | ||
67 | bool | ||
68 | default n | ||
69 | |||
62 | source "init/Kconfig" | 70 | source "init/Kconfig" |
63 | 71 | ||
64 | menu "System type" | 72 | menu "System type" |
diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c index 11d54c149821..90b494a0cf45 100644 --- a/arch/sh/mm/ioremap.c +++ b/arch/sh/mm/ioremap.c | |||
@@ -16,97 +16,13 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <asm/io.h> | 19 | #include <linux/io.h> |
20 | #include <asm/page.h> | 20 | #include <asm/page.h> |
21 | #include <asm/pgalloc.h> | 21 | #include <asm/pgalloc.h> |
22 | #include <asm/addrspace.h> | 22 | #include <asm/addrspace.h> |
23 | #include <asm/cacheflush.h> | 23 | #include <asm/cacheflush.h> |
24 | #include <asm/tlbflush.h> | 24 | #include <asm/tlbflush.h> |
25 | 25 | ||
26 | static inline void remap_area_pte(pte_t * pte, unsigned long address, | ||
27 | unsigned long size, unsigned long phys_addr, unsigned long flags) | ||
28 | { | ||
29 | unsigned long end; | ||
30 | unsigned long pfn; | ||
31 | pgprot_t pgprot = __pgprot(pgprot_val(PAGE_KERNEL_NOCACHE) | flags); | ||
32 | |||
33 | address &= ~PMD_MASK; | ||
34 | end = address + size; | ||
35 | if (end > PMD_SIZE) | ||
36 | end = PMD_SIZE; | ||
37 | if (address >= end) | ||
38 | BUG(); | ||
39 | pfn = phys_addr >> PAGE_SHIFT; | ||
40 | do { | ||
41 | if (!pte_none(*pte)) { | ||
42 | printk("remap_area_pte: page already exists\n"); | ||
43 | BUG(); | ||
44 | } | ||
45 | set_pte(pte, pfn_pte(pfn, pgprot)); | ||
46 | address += PAGE_SIZE; | ||
47 | pfn++; | ||
48 | pte++; | ||
49 | } while (address && (address < end)); | ||
50 | } | ||
51 | |||
52 | static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, | ||
53 | unsigned long size, unsigned long phys_addr, unsigned long flags) | ||
54 | { | ||
55 | unsigned long end; | ||
56 | |||
57 | address &= ~PGDIR_MASK; | ||
58 | end = address + size; | ||
59 | if (end > PGDIR_SIZE) | ||
60 | end = PGDIR_SIZE; | ||
61 | phys_addr -= address; | ||
62 | if (address >= end) | ||
63 | BUG(); | ||
64 | do { | ||
65 | pte_t * pte = pte_alloc_kernel(pmd, address); | ||
66 | if (!pte) | ||
67 | return -ENOMEM; | ||
68 | remap_area_pte(pte, address, end - address, address + phys_addr, flags); | ||
69 | address = (address + PMD_SIZE) & PMD_MASK; | ||
70 | pmd++; | ||
71 | } while (address && (address < end)); | ||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | int remap_area_pages(unsigned long address, unsigned long phys_addr, | ||
76 | unsigned long size, unsigned long flags) | ||
77 | { | ||
78 | int error; | ||
79 | pgd_t * dir; | ||
80 | unsigned long end = address + size; | ||
81 | |||
82 | phys_addr -= address; | ||
83 | dir = pgd_offset_k(address); | ||
84 | flush_cache_all(); | ||
85 | if (address >= end) | ||
86 | BUG(); | ||
87 | do { | ||
88 | pud_t *pud; | ||
89 | pmd_t *pmd; | ||
90 | |||
91 | error = -ENOMEM; | ||
92 | |||
93 | pud = pud_alloc(&init_mm, dir, address); | ||
94 | if (!pud) | ||
95 | break; | ||
96 | pmd = pmd_alloc(&init_mm, pud, address); | ||
97 | if (!pmd) | ||
98 | break; | ||
99 | if (remap_area_pmd(pmd, address, end - address, | ||
100 | phys_addr + address, flags)) | ||
101 | break; | ||
102 | error = 0; | ||
103 | address = (address + PGDIR_SIZE) & PGDIR_MASK; | ||
104 | dir++; | ||
105 | } while (address && (address < end)); | ||
106 | flush_tlb_all(); | ||
107 | return error; | ||
108 | } | ||
109 | |||
110 | /* | 26 | /* |
111 | * Remap an arbitrary physical address space into the kernel virtual | 27 | * Remap an arbitrary physical address space into the kernel virtual |
112 | * address space. Needed when the kernel wants to access high addresses | 28 | * address space. Needed when the kernel wants to access high addresses |
@@ -121,6 +37,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, | |||
121 | { | 37 | { |
122 | struct vm_struct * area; | 38 | struct vm_struct * area; |
123 | unsigned long offset, last_addr, addr, orig_addr; | 39 | unsigned long offset, last_addr, addr, orig_addr; |
40 | pgprot_t pgprot; | ||
124 | 41 | ||
125 | /* Don't allow wraparound or zero size */ | 42 | /* Don't allow wraparound or zero size */ |
126 | last_addr = phys_addr + size - 1; | 43 | last_addr = phys_addr + size - 1; |
@@ -190,8 +107,9 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, | |||
190 | } | 107 | } |
191 | #endif | 108 | #endif |
192 | 109 | ||
110 | pgprot = __pgprot(pgprot_val(PAGE_KERNEL_NOCACHE) | flags); | ||
193 | if (likely(size)) | 111 | if (likely(size)) |
194 | if (remap_area_pages(addr, phys_addr, size, flags)) { | 112 | if (ioremap_page_range(addr, addr + size, phys_addr, pgprot)) { |
195 | vunmap((void *)orig_addr); | 113 | vunmap((void *)orig_addr); |
196 | return NULL; | 114 | return NULL; |
197 | } | 115 | } |
diff --git a/arch/sh/oprofile/op_model_sh7750.c b/arch/sh/oprofile/op_model_sh7750.c index c265185b22a7..60402eec4b4d 100644 --- a/arch/sh/oprofile/op_model_sh7750.c +++ b/arch/sh/oprofile/op_model_sh7750.c | |||
@@ -142,7 +142,7 @@ static u64 sh7750_read_counter(int counter) | |||
142 | */ | 142 | */ |
143 | static inline int to_counter(struct file *file) | 143 | static inline int to_counter(struct file *file) |
144 | { | 144 | { |
145 | const unsigned char *name = file->f_dentry->d_parent->d_name.name; | 145 | const unsigned char *name = file->f_path.dentry->d_parent->d_name.name; |
146 | 146 | ||
147 | return (int)simple_strtol(name, NULL, 10); | 147 | return (int)simple_strtol(name, NULL, 10); |
148 | } | 148 | } |
diff --git a/arch/sh64/Kconfig b/arch/sh64/Kconfig index 58c678e06667..7bc0744b7ab6 100644 --- a/arch/sh64/Kconfig +++ b/arch/sh64/Kconfig | |||
@@ -39,6 +39,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
39 | config GENERIC_ISA_DMA | 39 | config GENERIC_ISA_DMA |
40 | bool | 40 | bool |
41 | 41 | ||
42 | config ARCH_HAS_ILOG2_U32 | ||
43 | bool | ||
44 | default n | ||
45 | |||
46 | config ARCH_HAS_ILOG2_U64 | ||
47 | bool | ||
48 | default n | ||
49 | |||
42 | source init/Kconfig | 50 | source init/Kconfig |
43 | 51 | ||
44 | menu "System type" | 52 | menu "System type" |
diff --git a/arch/sh64/mm/ioremap.c b/arch/sh64/mm/ioremap.c index 80c56754f513..ff26c02511aa 100644 --- a/arch/sh64/mm/ioremap.c +++ b/arch/sh64/mm/ioremap.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <asm/io.h> | 21 | #include <linux/io.h> |
22 | #include <asm/pgalloc.h> | 22 | #include <asm/pgalloc.h> |
23 | #include <asm/tlbflush.h> | 23 | #include <asm/tlbflush.h> |
24 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
@@ -28,96 +28,6 @@ | |||
28 | static void shmedia_mapioaddr(unsigned long, unsigned long); | 28 | static void shmedia_mapioaddr(unsigned long, unsigned long); |
29 | static unsigned long shmedia_ioremap(struct resource *, u32, int); | 29 | static unsigned long shmedia_ioremap(struct resource *, u32, int); |
30 | 30 | ||
31 | static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, | ||
32 | unsigned long phys_addr, unsigned long flags) | ||
33 | { | ||
34 | unsigned long end; | ||
35 | unsigned long pfn; | ||
36 | pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_READ | | ||
37 | _PAGE_WRITE | _PAGE_DIRTY | | ||
38 | _PAGE_ACCESSED | _PAGE_SHARED | flags); | ||
39 | |||
40 | address &= ~PMD_MASK; | ||
41 | end = address + size; | ||
42 | if (end > PMD_SIZE) | ||
43 | end = PMD_SIZE; | ||
44 | if (address >= end) | ||
45 | BUG(); | ||
46 | |||
47 | pfn = phys_addr >> PAGE_SHIFT; | ||
48 | |||
49 | pr_debug(" %s: pte %p address %lx size %lx phys_addr %lx\n", | ||
50 | __FUNCTION__,pte,address,size,phys_addr); | ||
51 | |||
52 | do { | ||
53 | if (!pte_none(*pte)) { | ||
54 | printk("remap_area_pte: page already exists\n"); | ||
55 | BUG(); | ||
56 | } | ||
57 | |||
58 | set_pte(pte, pfn_pte(pfn, pgprot)); | ||
59 | address += PAGE_SIZE; | ||
60 | pfn++; | ||
61 | pte++; | ||
62 | } while (address && (address < end)); | ||
63 | } | ||
64 | |||
65 | static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, | ||
66 | unsigned long phys_addr, unsigned long flags) | ||
67 | { | ||
68 | unsigned long end; | ||
69 | |||
70 | address &= ~PGDIR_MASK; | ||
71 | end = address + size; | ||
72 | |||
73 | if (end > PGDIR_SIZE) | ||
74 | end = PGDIR_SIZE; | ||
75 | |||
76 | phys_addr -= address; | ||
77 | |||
78 | if (address >= end) | ||
79 | BUG(); | ||
80 | |||
81 | do { | ||
82 | pte_t * pte = pte_alloc_kernel(pmd, address); | ||
83 | if (!pte) | ||
84 | return -ENOMEM; | ||
85 | remap_area_pte(pte, address, end - address, address + phys_addr, flags); | ||
86 | address = (address + PMD_SIZE) & PMD_MASK; | ||
87 | pmd++; | ||
88 | } while (address && (address < end)); | ||
89 | return 0; | ||
90 | } | ||
91 | |||
92 | static int remap_area_pages(unsigned long address, unsigned long phys_addr, | ||
93 | unsigned long size, unsigned long flags) | ||
94 | { | ||
95 | int error; | ||
96 | pgd_t * dir; | ||
97 | unsigned long end = address + size; | ||
98 | |||
99 | phys_addr -= address; | ||
100 | dir = pgd_offset_k(address); | ||
101 | flush_cache_all(); | ||
102 | if (address >= end) | ||
103 | BUG(); | ||
104 | do { | ||
105 | pmd_t *pmd = pmd_alloc(&init_mm, dir, address); | ||
106 | error = -ENOMEM; | ||
107 | if (!pmd) | ||
108 | break; | ||
109 | if (remap_area_pmd(pmd, address, end - address, | ||
110 | phys_addr + address, flags)) { | ||
111 | break; | ||
112 | } | ||
113 | error = 0; | ||
114 | address = (address + PGDIR_SIZE) & PGDIR_MASK; | ||
115 | dir++; | ||
116 | } while (address && (address < end)); | ||
117 | flush_tlb_all(); | ||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | /* | 31 | /* |
122 | * Generic mapping function (not visible outside): | 32 | * Generic mapping function (not visible outside): |
123 | */ | 33 | */ |
@@ -136,12 +46,17 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag | |||
136 | void * addr; | 46 | void * addr; |
137 | struct vm_struct * area; | 47 | struct vm_struct * area; |
138 | unsigned long offset, last_addr; | 48 | unsigned long offset, last_addr; |
49 | pgprot_t pgprot; | ||
139 | 50 | ||
140 | /* Don't allow wraparound or zero size */ | 51 | /* Don't allow wraparound or zero size */ |
141 | last_addr = phys_addr + size - 1; | 52 | last_addr = phys_addr + size - 1; |
142 | if (!size || last_addr < phys_addr) | 53 | if (!size || last_addr < phys_addr) |
143 | return NULL; | 54 | return NULL; |
144 | 55 | ||
56 | pgprot = __pgprot(_PAGE_PRESENT | _PAGE_READ | | ||
57 | _PAGE_WRITE | _PAGE_DIRTY | | ||
58 | _PAGE_ACCESSED | _PAGE_SHARED | flags); | ||
59 | |||
145 | /* | 60 | /* |
146 | * Mappings have to be page-aligned | 61 | * Mappings have to be page-aligned |
147 | */ | 62 | */ |
@@ -158,7 +73,8 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag | |||
158 | return NULL; | 73 | return NULL; |
159 | area->phys_addr = phys_addr; | 74 | area->phys_addr = phys_addr; |
160 | addr = area->addr; | 75 | addr = area->addr; |
161 | if (remap_area_pages((unsigned long)addr, phys_addr, size, flags)) { | 76 | if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, |
77 | phys_addr, pgprot)) { | ||
162 | vunmap(addr); | 78 | vunmap(addr); |
163 | return NULL; | 79 | return NULL; |
164 | } | 80 | } |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 92a7c8a636d3..d0dec1ea2eed 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -166,6 +166,14 @@ config ARCH_MAY_HAVE_PC_FDC | |||
166 | bool | 166 | bool |
167 | default y | 167 | default y |
168 | 168 | ||
169 | config ARCH_HAS_ILOG2_U32 | ||
170 | bool | ||
171 | default n | ||
172 | |||
173 | config ARCH_HAS_ILOG2_U64 | ||
174 | bool | ||
175 | default n | ||
176 | |||
169 | config SUN_PM | 177 | config SUN_PM |
170 | bool | 178 | bool |
171 | default y | 179 | default y |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 54d51b404603..cbbc98846b00 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -317,9 +317,8 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, long len, u32 *dma_addrp) | |||
317 | if ((va = __get_free_pages(GFP_KERNEL|__GFP_COMP, order)) == 0) | 317 | if ((va = __get_free_pages(GFP_KERNEL|__GFP_COMP, order)) == 0) |
318 | goto err_nopages; | 318 | goto err_nopages; |
319 | 319 | ||
320 | if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) | 320 | if ((res = kzalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) |
321 | goto err_nomem; | 321 | goto err_nomem; |
322 | memset((char*)res, 0, sizeof(struct resource)); | ||
323 | 322 | ||
324 | if (allocate_resource(&_sparc_dvma, res, len_total, | 323 | if (allocate_resource(&_sparc_dvma, res, len_total, |
325 | _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE, NULL, NULL) != 0) { | 324 | _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE, NULL, NULL) != 0) { |
@@ -589,12 +588,11 @@ void *pci_alloc_consistent(struct pci_dev *pdev, size_t len, dma_addr_t *pba) | |||
589 | return NULL; | 588 | return NULL; |
590 | } | 589 | } |
591 | 590 | ||
592 | if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) { | 591 | if ((res = kzalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) { |
593 | free_pages(va, order); | 592 | free_pages(va, order); |
594 | printk("pci_alloc_consistent: no core\n"); | 593 | printk("pci_alloc_consistent: no core\n"); |
595 | return NULL; | 594 | return NULL; |
596 | } | 595 | } |
597 | memset((char*)res, 0, sizeof(struct resource)); | ||
598 | 596 | ||
599 | if (allocate_resource(&_sparc_dvma, res, len_total, | 597 | if (allocate_resource(&_sparc_dvma, res, len_total, |
600 | _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE, NULL, NULL) != 0) { | 598 | _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE, NULL, NULL) != 0) { |
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index 46200c43ffb1..dab6169e31ca 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c | |||
@@ -793,10 +793,9 @@ struct of_device* of_platform_device_create(struct device_node *np, | |||
793 | { | 793 | { |
794 | struct of_device *dev; | 794 | struct of_device *dev; |
795 | 795 | ||
796 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 796 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
797 | if (!dev) | 797 | if (!dev) |
798 | return NULL; | 798 | return NULL; |
799 | memset(dev, 0, sizeof(*dev)); | ||
800 | 799 | ||
801 | dev->dev.parent = parent; | 800 | dev->dev.parent = parent; |
802 | dev->dev.bus = bus; | 801 | dev->dev.bus = bus; |
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index 1baf13ed5c3a..003f8eed32f4 100644 --- a/arch/sparc/kernel/ptrace.c +++ b/arch/sparc/kernel/ptrace.c | |||
@@ -289,7 +289,10 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
289 | 289 | ||
290 | if (request == PTRACE_TRACEME) { | 290 | if (request == PTRACE_TRACEME) { |
291 | ret = ptrace_traceme(); | 291 | ret = ptrace_traceme(); |
292 | pt_succ_return(regs, 0); | 292 | if (ret < 0) |
293 | pt_error_return(regs, -ret); | ||
294 | else | ||
295 | pt_succ_return(regs, 0); | ||
293 | goto out; | 296 | goto out; |
294 | } | 297 | } |
295 | 298 | ||
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index d4f9da8170c5..cf1b8baa57ea 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c | |||
@@ -545,8 +545,11 @@ void __init sun4d_init_sbi_irq(void) | |||
545 | nsbi = 0; | 545 | nsbi = 0; |
546 | for_each_sbus(sbus) | 546 | for_each_sbus(sbus) |
547 | nsbi++; | 547 | nsbi++; |
548 | sbus_actions = (struct sbus_action *)kmalloc (nsbi * 8 * 4 * sizeof(struct sbus_action), GFP_ATOMIC); | 548 | sbus_actions = kzalloc (nsbi * 8 * 4 * sizeof(struct sbus_action), GFP_ATOMIC); |
549 | memset (sbus_actions, 0, (nsbi * 8 * 4 * sizeof(struct sbus_action))); | 549 | if (!sbus_actions) { |
550 | prom_printf("SUN4D: Cannot allocate sbus_actions, halting.\n"); | ||
551 | prom_halt(); | ||
552 | } | ||
550 | for_each_sbus(sbus) { | 553 | for_each_sbus(sbus) { |
551 | #ifdef CONFIG_SMP | 554 | #ifdef CONFIG_SMP |
552 | extern unsigned char boot_cpu_id; | 555 | extern unsigned char boot_cpu_id; |
diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c index 6f3ac548ee66..0bf8c165fc92 100644 --- a/arch/sparc/kernel/sys_sunos.c +++ b/arch/sparc/kernel/sys_sunos.c | |||
@@ -94,8 +94,8 @@ asmlinkage unsigned long sunos_mmap(unsigned long addr, unsigned long len, | |||
94 | * SunOS is so stupid some times... hmph! | 94 | * SunOS is so stupid some times... hmph! |
95 | */ | 95 | */ |
96 | if (file) { | 96 | if (file) { |
97 | if (imajor(file->f_dentry->d_inode) == MEM_MAJOR && | 97 | if (imajor(file->f_path.dentry->d_inode) == MEM_MAJOR && |
98 | iminor(file->f_dentry->d_inode) == 5) { | 98 | iminor(file->f_path.dentry->d_inode) == 5) { |
99 | flags |= MAP_ANONYMOUS; | 99 | flags |= MAP_ANONYMOUS; |
100 | fput(file); | 100 | fput(file); |
101 | file = NULL; | 101 | file = NULL; |
@@ -655,7 +655,7 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr) | |||
655 | if (!file) | 655 | if (!file) |
656 | goto out; | 656 | goto out; |
657 | 657 | ||
658 | inode = file->f_dentry->d_inode; | 658 | inode = file->f_path.dentry->d_inode; |
659 | 659 | ||
660 | socket = SOCKET_I(inode); | 660 | socket = SOCKET_I(inode); |
661 | local.sin_family = AF_INET; | 661 | local.sin_family = AF_INET; |
diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c index 2bb1309003dd..4ccda77d08d6 100644 --- a/arch/sparc/mm/io-unit.c +++ b/arch/sparc/mm/io-unit.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
23 | #include <asm/tlbflush.h> | 23 | #include <asm/tlbflush.h> |
24 | #include <asm/dma.h> | 24 | #include <asm/dma.h> |
25 | #include <asm/oplib.h> | ||
25 | 26 | ||
26 | /* #define IOUNIT_DEBUG */ | 27 | /* #define IOUNIT_DEBUG */ |
27 | #ifdef IOUNIT_DEBUG | 28 | #ifdef IOUNIT_DEBUG |
@@ -41,9 +42,12 @@ iounit_init(int sbi_node, int io_node, struct sbus_bus *sbus) | |||
41 | struct linux_prom_registers iommu_promregs[PROMREG_MAX]; | 42 | struct linux_prom_registers iommu_promregs[PROMREG_MAX]; |
42 | struct resource r; | 43 | struct resource r; |
43 | 44 | ||
44 | iounit = kmalloc(sizeof(struct iounit_struct), GFP_ATOMIC); | 45 | iounit = kzalloc(sizeof(struct iounit_struct), GFP_ATOMIC); |
46 | if (!iounit) { | ||
47 | prom_printf("SUN4D: Cannot alloc iounit, halting.\n"); | ||
48 | prom_halt(); | ||
49 | } | ||
45 | 50 | ||
46 | memset(iounit, 0, sizeof(*iounit)); | ||
47 | iounit->limit[0] = IOUNIT_BMAP1_START; | 51 | iounit->limit[0] = IOUNIT_BMAP1_START; |
48 | iounit->limit[1] = IOUNIT_BMAP2_START; | 52 | iounit->limit[1] = IOUNIT_BMAP2_START; |
49 | iounit->limit[2] = IOUNIT_BMAPM_START; | 53 | iounit->limit[2] = IOUNIT_BMAPM_START; |
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index b627f8dbcaad..d41f66ac7fff 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -26,6 +26,14 @@ config MMU | |||
26 | bool | 26 | bool |
27 | default y | 27 | default y |
28 | 28 | ||
29 | config STACKTRACE_SUPPORT | ||
30 | bool | ||
31 | default y | ||
32 | |||
33 | config LOCKDEP_SUPPORT | ||
34 | bool | ||
35 | default y | ||
36 | |||
29 | config TIME_INTERPOLATION | 37 | config TIME_INTERPOLATION |
30 | bool | 38 | bool |
31 | default y | 39 | default y |
@@ -34,6 +42,14 @@ config ARCH_MAY_HAVE_PC_FDC | |||
34 | bool | 42 | bool |
35 | default y | 43 | default y |
36 | 44 | ||
45 | config ARCH_HAS_ILOG2_U32 | ||
46 | bool | ||
47 | default n | ||
48 | |||
49 | config ARCH_HAS_ILOG2_U64 | ||
50 | bool | ||
51 | default n | ||
52 | |||
37 | config AUDIT_ARCH | 53 | config AUDIT_ARCH |
38 | bool | 54 | bool |
39 | default y | 55 | default y |
diff --git a/arch/sparc64/Kconfig.debug b/arch/sparc64/Kconfig.debug index afe0a7720a26..1f130f3b6c24 100644 --- a/arch/sparc64/Kconfig.debug +++ b/arch/sparc64/Kconfig.debug | |||
@@ -1,5 +1,9 @@ | |||
1 | menu "Kernel hacking" | 1 | menu "Kernel hacking" |
2 | 2 | ||
3 | config TRACE_IRQFLAGS_SUPPORT | ||
4 | bool | ||
5 | default y | ||
6 | |||
3 | source "lib/Kconfig.debug" | 7 | source "lib/Kconfig.debug" |
4 | 8 | ||
5 | config DEBUG_STACK_USAGE | 9 | config DEBUG_STACK_USAGE |
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index 2f4612fa81f2..0f0d38f6197c 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig | |||
@@ -1,24 +1,29 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.19-rc2 | 3 | # Linux kernel version: 2.6.19 |
4 | # Tue Oct 17 19:29:20 2006 | 4 | # Sat Dec 9 15:41:30 2006 |
5 | # | 5 | # |
6 | CONFIG_SPARC=y | 6 | CONFIG_SPARC=y |
7 | CONFIG_SPARC64=y | 7 | CONFIG_SPARC64=y |
8 | CONFIG_64BIT=y | 8 | CONFIG_64BIT=y |
9 | CONFIG_MMU=y | 9 | CONFIG_MMU=y |
10 | CONFIG_STACKTRACE_SUPPORT=y | ||
11 | CONFIG_LOCKDEP_SUPPORT=y | ||
10 | CONFIG_TIME_INTERPOLATION=y | 12 | CONFIG_TIME_INTERPOLATION=y |
11 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 13 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
14 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
15 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
12 | CONFIG_AUDIT_ARCH=y | 16 | CONFIG_AUDIT_ARCH=y |
13 | CONFIG_SPARC64_PAGE_SIZE_8KB=y | 17 | CONFIG_SPARC64_PAGE_SIZE_8KB=y |
14 | # CONFIG_SPARC64_PAGE_SIZE_64KB is not set | 18 | # CONFIG_SPARC64_PAGE_SIZE_64KB is not set |
15 | # CONFIG_SPARC64_PAGE_SIZE_512KB is not set | 19 | # CONFIG_SPARC64_PAGE_SIZE_512KB is not set |
16 | # CONFIG_SPARC64_PAGE_SIZE_4MB is not set | 20 | # CONFIG_SPARC64_PAGE_SIZE_4MB is not set |
17 | CONFIG_SECCOMP=y | 21 | CONFIG_SECCOMP=y |
18 | # CONFIG_HZ_100 is not set | 22 | CONFIG_HZ_100=y |
19 | CONFIG_HZ_250=y | 23 | # CONFIG_HZ_250 is not set |
24 | # CONFIG_HZ_300 is not set | ||
20 | # CONFIG_HZ_1000 is not set | 25 | # CONFIG_HZ_1000 is not set |
21 | CONFIG_HZ=250 | 26 | CONFIG_HZ=100 |
22 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 27 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
23 | 28 | ||
24 | # | 29 | # |
@@ -42,13 +47,14 @@ CONFIG_POSIX_MQUEUE=y | |||
42 | # CONFIG_UTS_NS is not set | 47 | # CONFIG_UTS_NS is not set |
43 | # CONFIG_AUDIT is not set | 48 | # CONFIG_AUDIT is not set |
44 | # CONFIG_IKCONFIG is not set | 49 | # CONFIG_IKCONFIG is not set |
50 | CONFIG_SYSFS_DEPRECATED=y | ||
45 | CONFIG_RELAY=y | 51 | CONFIG_RELAY=y |
46 | CONFIG_INITRAMFS_SOURCE="" | 52 | CONFIG_INITRAMFS_SOURCE="" |
47 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 53 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
48 | CONFIG_SYSCTL=y | 54 | CONFIG_SYSCTL=y |
49 | # CONFIG_EMBEDDED is not set | 55 | # CONFIG_EMBEDDED is not set |
50 | CONFIG_UID16=y | 56 | CONFIG_UID16=y |
51 | # CONFIG_SYSCTL_SYSCALL is not set | 57 | CONFIG_SYSCTL_SYSCALL=y |
52 | CONFIG_KALLSYMS=y | 58 | CONFIG_KALLSYMS=y |
53 | # CONFIG_KALLSYMS_ALL is not set | 59 | # CONFIG_KALLSYMS_ALL is not set |
54 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 60 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -203,6 +209,7 @@ CONFIG_INET_TCP_DIAG=y | |||
203 | # CONFIG_TCP_CONG_ADVANCED is not set | 209 | # CONFIG_TCP_CONG_ADVANCED is not set |
204 | CONFIG_TCP_CONG_CUBIC=y | 210 | CONFIG_TCP_CONG_CUBIC=y |
205 | CONFIG_DEFAULT_TCP_CONG="cubic" | 211 | CONFIG_DEFAULT_TCP_CONG="cubic" |
212 | # CONFIG_TCP_MD5SIG is not set | ||
206 | CONFIG_IPV6=m | 213 | CONFIG_IPV6=m |
207 | CONFIG_IPV6_PRIVACY=y | 214 | CONFIG_IPV6_PRIVACY=y |
208 | CONFIG_IPV6_ROUTER_PREF=y | 215 | CONFIG_IPV6_ROUTER_PREF=y |
@@ -219,7 +226,6 @@ CONFIG_INET6_XFRM_MODE_BEET=m | |||
219 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | 226 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set |
220 | CONFIG_IPV6_SIT=m | 227 | CONFIG_IPV6_SIT=m |
221 | CONFIG_IPV6_TUNNEL=m | 228 | CONFIG_IPV6_TUNNEL=m |
222 | # CONFIG_IPV6_SUBTREES is not set | ||
223 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | 229 | # CONFIG_IPV6_MULTIPLE_TABLES is not set |
224 | # CONFIG_NETWORK_SECMARK is not set | 230 | # CONFIG_NETWORK_SECMARK is not set |
225 | # CONFIG_NETFILTER is not set | 231 | # CONFIG_NETFILTER is not set |
@@ -238,6 +244,8 @@ CONFIG_IP_DCCP_CCID2=m | |||
238 | # CONFIG_IP_DCCP_CCID2_DEBUG is not set | 244 | # CONFIG_IP_DCCP_CCID2_DEBUG is not set |
239 | CONFIG_IP_DCCP_CCID3=m | 245 | CONFIG_IP_DCCP_CCID3=m |
240 | CONFIG_IP_DCCP_TFRC_LIB=m | 246 | CONFIG_IP_DCCP_TFRC_LIB=m |
247 | # CONFIG_IP_DCCP_CCID3_DEBUG is not set | ||
248 | CONFIG_IP_DCCP_CCID3_RTO=100 | ||
241 | 249 | ||
242 | # | 250 | # |
243 | # DCCP Kernel Hacking | 251 | # DCCP Kernel Hacking |
@@ -405,6 +413,7 @@ CONFIG_IDEDMA_AUTO=y | |||
405 | # | 413 | # |
406 | CONFIG_RAID_ATTRS=m | 414 | CONFIG_RAID_ATTRS=m |
407 | CONFIG_SCSI=y | 415 | CONFIG_SCSI=y |
416 | # CONFIG_SCSI_TGT is not set | ||
408 | CONFIG_SCSI_NETLINK=y | 417 | CONFIG_SCSI_NETLINK=y |
409 | CONFIG_SCSI_PROC_FS=y | 418 | CONFIG_SCSI_PROC_FS=y |
410 | 419 | ||
@@ -425,6 +434,7 @@ CONFIG_CHR_DEV_SG=m | |||
425 | CONFIG_SCSI_MULTI_LUN=y | 434 | CONFIG_SCSI_MULTI_LUN=y |
426 | CONFIG_SCSI_CONSTANTS=y | 435 | CONFIG_SCSI_CONSTANTS=y |
427 | # CONFIG_SCSI_LOGGING is not set | 436 | # CONFIG_SCSI_LOGGING is not set |
437 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
428 | 438 | ||
429 | # | 439 | # |
430 | # SCSI Transports | 440 | # SCSI Transports |
@@ -468,6 +478,7 @@ CONFIG_ISCSI_TCP=m | |||
468 | # CONFIG_SCSI_DC390T is not set | 478 | # CONFIG_SCSI_DC390T is not set |
469 | # CONFIG_SCSI_DEBUG is not set | 479 | # CONFIG_SCSI_DEBUG is not set |
470 | # CONFIG_SCSI_SUNESP is not set | 480 | # CONFIG_SCSI_SUNESP is not set |
481 | # CONFIG_SCSI_SRP is not set | ||
471 | 482 | ||
472 | # | 483 | # |
473 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | 484 | # Serial ATA (prod) and Parallel ATA (experimental) drivers |
@@ -598,6 +609,7 @@ CONFIG_BNX2=m | |||
598 | # CONFIG_IXGB is not set | 609 | # CONFIG_IXGB is not set |
599 | # CONFIG_S2IO is not set | 610 | # CONFIG_S2IO is not set |
600 | # CONFIG_MYRI10GE is not set | 611 | # CONFIG_MYRI10GE is not set |
612 | # CONFIG_NETXEN_NIC is not set | ||
601 | 613 | ||
602 | # | 614 | # |
603 | # Token Ring devices | 615 | # Token Ring devices |
@@ -724,10 +736,6 @@ CONFIG_RTC=y | |||
724 | # CONFIG_DTLK is not set | 736 | # CONFIG_DTLK is not set |
725 | # CONFIG_R3964 is not set | 737 | # CONFIG_R3964 is not set |
726 | # CONFIG_APPLICOM is not set | 738 | # CONFIG_APPLICOM is not set |
727 | |||
728 | # | ||
729 | # Ftape, the floppy tape device driver | ||
730 | # | ||
731 | # CONFIG_DRM is not set | 739 | # CONFIG_DRM is not set |
732 | # CONFIG_RAW_DRIVER is not set | 740 | # CONFIG_RAW_DRIVER is not set |
733 | 741 | ||
@@ -1039,6 +1047,11 @@ CONFIG_SND_SUN_CS4231=m | |||
1039 | # CONFIG_SOUND_PRIME is not set | 1047 | # CONFIG_SOUND_PRIME is not set |
1040 | 1048 | ||
1041 | # | 1049 | # |
1050 | # HID Devices | ||
1051 | # | ||
1052 | CONFIG_HID=y | ||
1053 | |||
1054 | # | ||
1042 | # USB support | 1055 | # USB support |
1043 | # | 1056 | # |
1044 | CONFIG_USB_ARCH_HAS_HCD=y | 1057 | CONFIG_USB_ARCH_HAS_HCD=y |
@@ -1053,6 +1066,7 @@ CONFIG_USB=y | |||
1053 | CONFIG_USB_DEVICEFS=y | 1066 | CONFIG_USB_DEVICEFS=y |
1054 | # CONFIG_USB_BANDWIDTH is not set | 1067 | # CONFIG_USB_BANDWIDTH is not set |
1055 | # CONFIG_USB_DYNAMIC_MINORS is not set | 1068 | # CONFIG_USB_DYNAMIC_MINORS is not set |
1069 | # CONFIG_USB_MULTITHREAD_PROBE is not set | ||
1056 | # CONFIG_USB_OTG is not set | 1070 | # CONFIG_USB_OTG is not set |
1057 | 1071 | ||
1058 | # | 1072 | # |
@@ -1089,8 +1103,7 @@ CONFIG_USB_UHCI_HCD=m | |||
1089 | # USB Input Devices | 1103 | # USB Input Devices |
1090 | # | 1104 | # |
1091 | CONFIG_USB_HID=y | 1105 | CONFIG_USB_HID=y |
1092 | CONFIG_USB_HIDINPUT=y | 1106 | # CONFIG_USB_HID_POWERBOOK is not set |
1093 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | ||
1094 | # CONFIG_HID_FF is not set | 1107 | # CONFIG_HID_FF is not set |
1095 | CONFIG_USB_HIDDEV=y | 1108 | CONFIG_USB_HIDDEV=y |
1096 | # CONFIG_USB_AIPTEK is not set | 1109 | # CONFIG_USB_AIPTEK is not set |
@@ -1119,6 +1132,7 @@ CONFIG_USB_HIDDEV=y | |||
1119 | # CONFIG_USB_KAWETH is not set | 1132 | # CONFIG_USB_KAWETH is not set |
1120 | # CONFIG_USB_PEGASUS is not set | 1133 | # CONFIG_USB_PEGASUS is not set |
1121 | # CONFIG_USB_RTL8150 is not set | 1134 | # CONFIG_USB_RTL8150 is not set |
1135 | # CONFIG_USB_USBNET_MII is not set | ||
1122 | # CONFIG_USB_USBNET is not set | 1136 | # CONFIG_USB_USBNET is not set |
1123 | # CONFIG_USB_MON is not set | 1137 | # CONFIG_USB_MON is not set |
1124 | 1138 | ||
@@ -1364,6 +1378,11 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
1364 | # CONFIG_NLS_UTF8 is not set | 1378 | # CONFIG_NLS_UTF8 is not set |
1365 | 1379 | ||
1366 | # | 1380 | # |
1381 | # Distributed Lock Manager | ||
1382 | # | ||
1383 | # CONFIG_DLM is not set | ||
1384 | |||
1385 | # | ||
1367 | # Instrumentation Support | 1386 | # Instrumentation Support |
1368 | # | 1387 | # |
1369 | CONFIG_PROFILING=y | 1388 | CONFIG_PROFILING=y |
@@ -1373,6 +1392,7 @@ CONFIG_KPROBES=y | |||
1373 | # | 1392 | # |
1374 | # Kernel hacking | 1393 | # Kernel hacking |
1375 | # | 1394 | # |
1395 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
1376 | CONFIG_PRINTK_TIME=y | 1396 | CONFIG_PRINTK_TIME=y |
1377 | CONFIG_ENABLE_MUST_CHECK=y | 1397 | CONFIG_ENABLE_MUST_CHECK=y |
1378 | CONFIG_MAGIC_SYSRQ=y | 1398 | CONFIG_MAGIC_SYSRQ=y |
@@ -1387,6 +1407,8 @@ CONFIG_SCHEDSTATS=y | |||
1387 | # CONFIG_DEBUG_SPINLOCK is not set | 1407 | # CONFIG_DEBUG_SPINLOCK is not set |
1388 | # CONFIG_DEBUG_MUTEXES is not set | 1408 | # CONFIG_DEBUG_MUTEXES is not set |
1389 | # CONFIG_DEBUG_RWSEMS is not set | 1409 | # CONFIG_DEBUG_RWSEMS is not set |
1410 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1411 | # CONFIG_PROVE_LOCKING is not set | ||
1390 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1412 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1391 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1413 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1392 | # CONFIG_DEBUG_KOBJECT is not set | 1414 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -1420,8 +1442,9 @@ CONFIG_CRYPTO=y | |||
1420 | CONFIG_CRYPTO_ALGAPI=y | 1442 | CONFIG_CRYPTO_ALGAPI=y |
1421 | CONFIG_CRYPTO_BLKCIPHER=y | 1443 | CONFIG_CRYPTO_BLKCIPHER=y |
1422 | CONFIG_CRYPTO_HASH=y | 1444 | CONFIG_CRYPTO_HASH=y |
1423 | CONFIG_CRYPTO_MANAGER=m | 1445 | CONFIG_CRYPTO_MANAGER=y |
1424 | CONFIG_CRYPTO_HMAC=y | 1446 | CONFIG_CRYPTO_HMAC=y |
1447 | CONFIG_CRYPTO_XCBC=y | ||
1425 | CONFIG_CRYPTO_NULL=m | 1448 | CONFIG_CRYPTO_NULL=m |
1426 | CONFIG_CRYPTO_MD4=y | 1449 | CONFIG_CRYPTO_MD4=y |
1427 | CONFIG_CRYPTO_MD5=y | 1450 | CONFIG_CRYPTO_MD5=y |
@@ -1430,8 +1453,10 @@ CONFIG_CRYPTO_SHA256=m | |||
1430 | CONFIG_CRYPTO_SHA512=m | 1453 | CONFIG_CRYPTO_SHA512=m |
1431 | CONFIG_CRYPTO_WP512=m | 1454 | CONFIG_CRYPTO_WP512=m |
1432 | CONFIG_CRYPTO_TGR192=m | 1455 | CONFIG_CRYPTO_TGR192=m |
1456 | CONFIG_CRYPTO_GF128MUL=m | ||
1433 | CONFIG_CRYPTO_ECB=m | 1457 | CONFIG_CRYPTO_ECB=m |
1434 | CONFIG_CRYPTO_CBC=y | 1458 | CONFIG_CRYPTO_CBC=y |
1459 | CONFIG_CRYPTO_LRW=m | ||
1435 | CONFIG_CRYPTO_DES=y | 1460 | CONFIG_CRYPTO_DES=y |
1436 | CONFIG_CRYPTO_BLOWFISH=m | 1461 | CONFIG_CRYPTO_BLOWFISH=m |
1437 | CONFIG_CRYPTO_TWOFISH=m | 1462 | CONFIG_CRYPTO_TWOFISH=m |
@@ -1456,6 +1481,7 @@ CONFIG_CRYPTO_TEST=m | |||
1456 | # | 1481 | # |
1457 | # Library routines | 1482 | # Library routines |
1458 | # | 1483 | # |
1484 | CONFIG_BITREVERSE=y | ||
1459 | CONFIG_CRC_CCITT=m | 1485 | CONFIG_CRC_CCITT=m |
1460 | CONFIG_CRC16=m | 1486 | CONFIG_CRC16=m |
1461 | CONFIG_CRC32=y | 1487 | CONFIG_CRC32=y |
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile index e1eabebaed39..eff0c01d3579 100644 --- a/arch/sparc64/kernel/Makefile +++ b/arch/sparc64/kernel/Makefile | |||
@@ -14,6 +14,7 @@ obj-y := process.o setup.o cpu.o idprom.o \ | |||
14 | power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o \ | 14 | power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o \ |
15 | visemul.o prom.o of_device.o | 15 | visemul.o prom.o of_device.o |
16 | 16 | ||
17 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | ||
17 | obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o pci_iommu.o \ | 18 | obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o pci_iommu.o \ |
18 | pci_psycho.o pci_sabre.o pci_schizo.o \ | 19 | pci_psycho.o pci_sabre.o pci_schizo.o \ |
19 | pci_sun4v.o pci_sun4v_asm.o | 20 | pci_sun4v.o pci_sun4v_asm.o |
diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c index d7caa60a0074..f205fc7cbcd0 100644 --- a/arch/sparc64/kernel/binfmt_aout32.c +++ b/arch/sparc64/kernel/binfmt_aout32.c | |||
@@ -209,7 +209,7 @@ static int load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs) | |||
209 | if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC && | 209 | if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC && |
210 | N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) || | 210 | N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) || |
211 | N_TRSIZE(ex) || N_DRSIZE(ex) || | 211 | N_TRSIZE(ex) || N_DRSIZE(ex) || |
212 | bprm->file->f_dentry->d_inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { | 212 | bprm->file->f_path.dentry->d_inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { |
213 | return -ENOEXEC; | 213 | return -ENOEXEC; |
214 | } | 214 | } |
215 | 215 | ||
@@ -349,7 +349,7 @@ static int load_aout32_library(struct file *file) | |||
349 | int retval; | 349 | int retval; |
350 | struct exec ex; | 350 | struct exec ex; |
351 | 351 | ||
352 | inode = file->f_dentry->d_inode; | 352 | inode = file->f_path.dentry->d_inode; |
353 | 353 | ||
354 | retval = -ENOEXEC; | 354 | retval = -ENOEXEC; |
355 | error = kernel_read(file, 0, (char *) &ex, sizeof(ex)); | 355 | error = kernel_read(file, 0, (char *) &ex, sizeof(ex)); |
diff --git a/arch/sparc64/kernel/chmc.c b/arch/sparc64/kernel/chmc.c index 259f37e516f5..9699abeb9907 100644 --- a/arch/sparc64/kernel/chmc.c +++ b/arch/sparc64/kernel/chmc.c | |||
@@ -341,7 +341,7 @@ static void fetch_decode_regs(struct mctrl_info *mp) | |||
341 | 341 | ||
342 | static int init_one_mctrl(struct device_node *dp) | 342 | static int init_one_mctrl(struct device_node *dp) |
343 | { | 343 | { |
344 | struct mctrl_info *mp = kmalloc(sizeof(*mp), GFP_KERNEL); | 344 | struct mctrl_info *mp = kzalloc(sizeof(*mp), GFP_KERNEL); |
345 | int portid = of_getintprop_default(dp, "portid", -1); | 345 | int portid = of_getintprop_default(dp, "portid", -1); |
346 | struct linux_prom64_registers *regs; | 346 | struct linux_prom64_registers *regs; |
347 | void *pval; | 347 | void *pval; |
@@ -349,7 +349,6 @@ static int init_one_mctrl(struct device_node *dp) | |||
349 | 349 | ||
350 | if (!mp) | 350 | if (!mp) |
351 | return -1; | 351 | return -1; |
352 | memset(mp, 0, sizeof(*mp)); | ||
353 | if (portid == -1) | 352 | if (portid == -1) |
354 | goto fail; | 353 | goto fail; |
355 | 354 | ||
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 6f28bec0a9bf..c15a3edcb826 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -597,7 +597,12 @@ __spitfire_cee_trap_continue: | |||
597 | 1: ba,pt %xcc, etrap_irq | 597 | 1: ba,pt %xcc, etrap_irq |
598 | rd %pc, %g7 | 598 | rd %pc, %g7 |
599 | 599 | ||
600 | 2: mov %l4, %o1 | 600 | 2: |
601 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
602 | call trace_hardirqs_off | ||
603 | nop | ||
604 | #endif | ||
605 | mov %l4, %o1 | ||
601 | mov %l5, %o2 | 606 | mov %l5, %o2 |
602 | call spitfire_access_error | 607 | call spitfire_access_error |
603 | add %sp, PTREGS_OFF, %o0 | 608 | add %sp, PTREGS_OFF, %o0 |
@@ -824,6 +829,10 @@ do_cheetah_plus_data_parity: | |||
824 | wrpr %g0, 15, %pil | 829 | wrpr %g0, 15, %pil |
825 | ba,pt %xcc, etrap_irq | 830 | ba,pt %xcc, etrap_irq |
826 | rd %pc, %g7 | 831 | rd %pc, %g7 |
832 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
833 | call trace_hardirqs_off | ||
834 | nop | ||
835 | #endif | ||
827 | mov 0x0, %o0 | 836 | mov 0x0, %o0 |
828 | call cheetah_plus_parity_error | 837 | call cheetah_plus_parity_error |
829 | add %sp, PTREGS_OFF, %o1 | 838 | add %sp, PTREGS_OFF, %o1 |
@@ -855,6 +864,10 @@ do_cheetah_plus_insn_parity: | |||
855 | wrpr %g0, 15, %pil | 864 | wrpr %g0, 15, %pil |
856 | ba,pt %xcc, etrap_irq | 865 | ba,pt %xcc, etrap_irq |
857 | rd %pc, %g7 | 866 | rd %pc, %g7 |
867 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
868 | call trace_hardirqs_off | ||
869 | nop | ||
870 | #endif | ||
858 | mov 0x1, %o0 | 871 | mov 0x1, %o0 |
859 | call cheetah_plus_parity_error | 872 | call cheetah_plus_parity_error |
860 | add %sp, PTREGS_OFF, %o1 | 873 | add %sp, PTREGS_OFF, %o1 |
@@ -1183,6 +1196,10 @@ c_fast_ecc: | |||
1183 | wrpr %g0, 15, %pil | 1196 | wrpr %g0, 15, %pil |
1184 | ba,pt %xcc, etrap_irq | 1197 | ba,pt %xcc, etrap_irq |
1185 | rd %pc, %g7 | 1198 | rd %pc, %g7 |
1199 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
1200 | call trace_hardirqs_off | ||
1201 | nop | ||
1202 | #endif | ||
1186 | mov %l4, %o1 | 1203 | mov %l4, %o1 |
1187 | mov %l5, %o2 | 1204 | mov %l5, %o2 |
1188 | call cheetah_fecc_handler | 1205 | call cheetah_fecc_handler |
@@ -1211,6 +1228,10 @@ c_cee: | |||
1211 | wrpr %g0, 15, %pil | 1228 | wrpr %g0, 15, %pil |
1212 | ba,pt %xcc, etrap_irq | 1229 | ba,pt %xcc, etrap_irq |
1213 | rd %pc, %g7 | 1230 | rd %pc, %g7 |
1231 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
1232 | call trace_hardirqs_off | ||
1233 | nop | ||
1234 | #endif | ||
1214 | mov %l4, %o1 | 1235 | mov %l4, %o1 |
1215 | mov %l5, %o2 | 1236 | mov %l5, %o2 |
1216 | call cheetah_cee_handler | 1237 | call cheetah_cee_handler |
@@ -1239,6 +1260,10 @@ c_deferred: | |||
1239 | wrpr %g0, 15, %pil | 1260 | wrpr %g0, 15, %pil |
1240 | ba,pt %xcc, etrap_irq | 1261 | ba,pt %xcc, etrap_irq |
1241 | rd %pc, %g7 | 1262 | rd %pc, %g7 |
1263 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
1264 | call trace_hardirqs_off | ||
1265 | nop | ||
1266 | #endif | ||
1242 | mov %l4, %o1 | 1267 | mov %l4, %o1 |
1243 | mov %l5, %o2 | 1268 | mov %l5, %o2 |
1244 | call cheetah_deferred_handler | 1269 | call cheetah_deferred_handler |
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S index c8e9dc9d68a9..03ffaf895a22 100644 --- a/arch/sparc64/kernel/head.S +++ b/arch/sparc64/kernel/head.S | |||
@@ -489,6 +489,14 @@ tlb_fixup_done: | |||
489 | call __bzero | 489 | call __bzero |
490 | sub %o1, %o0, %o1 | 490 | sub %o1, %o0, %o1 |
491 | 491 | ||
492 | #ifdef CONFIG_LOCKDEP | ||
493 | /* We have this call this super early, as even prom_init can grab | ||
494 | * spinlocks and thus call into the lockdep code. | ||
495 | */ | ||
496 | call lockdep_init | ||
497 | nop | ||
498 | #endif | ||
499 | |||
492 | mov %l6, %o1 ! OpenPROM stack | 500 | mov %l6, %o1 ! OpenPROM stack |
493 | call prom_init | 501 | call prom_init |
494 | mov %l7, %o0 ! OpenPROM cif handler | 502 | mov %l7, %o0 ! OpenPROM cif handler |
diff --git a/arch/sparc64/kernel/isa.c b/arch/sparc64/kernel/isa.c index f028e68b23f2..ad1c4f55420f 100644 --- a/arch/sparc64/kernel/isa.c +++ b/arch/sparc64/kernel/isa.c | |||
@@ -72,14 +72,12 @@ static void __init isa_fill_children(struct sparc_isa_device *parent_isa_dev) | |||
72 | struct linux_prom_registers *regs; | 72 | struct linux_prom_registers *regs; |
73 | struct sparc_isa_device *isa_dev; | 73 | struct sparc_isa_device *isa_dev; |
74 | 74 | ||
75 | isa_dev = kmalloc(sizeof(*isa_dev), GFP_KERNEL); | 75 | isa_dev = kzalloc(sizeof(*isa_dev), GFP_KERNEL); |
76 | if (!isa_dev) { | 76 | if (!isa_dev) { |
77 | fatal_err("cannot allocate child isa_dev"); | 77 | fatal_err("cannot allocate child isa_dev"); |
78 | prom_halt(); | 78 | prom_halt(); |
79 | } | 79 | } |
80 | 80 | ||
81 | memset(isa_dev, 0, sizeof(*isa_dev)); | ||
82 | |||
83 | /* Link it in to parent. */ | 81 | /* Link it in to parent. */ |
84 | isa_dev->next = parent_isa_dev->child; | 82 | isa_dev->next = parent_isa_dev->child; |
85 | parent_isa_dev->child = isa_dev; | 83 | parent_isa_dev->child = isa_dev; |
@@ -104,14 +102,12 @@ static void __init isa_fill_devices(struct sparc_isa_bridge *isa_br) | |||
104 | struct linux_prom_registers *regs; | 102 | struct linux_prom_registers *regs; |
105 | struct sparc_isa_device *isa_dev; | 103 | struct sparc_isa_device *isa_dev; |
106 | 104 | ||
107 | isa_dev = kmalloc(sizeof(*isa_dev), GFP_KERNEL); | 105 | isa_dev = kzalloc(sizeof(*isa_dev), GFP_KERNEL); |
108 | if (!isa_dev) { | 106 | if (!isa_dev) { |
109 | printk(KERN_DEBUG "ISA: cannot allocate isa_dev"); | 107 | printk(KERN_DEBUG "ISA: cannot allocate isa_dev"); |
110 | return; | 108 | return; |
111 | } | 109 | } |
112 | 110 | ||
113 | memset(isa_dev, 0, sizeof(*isa_dev)); | ||
114 | |||
115 | isa_dev->ofdev.node = dp; | 111 | isa_dev->ofdev.node = dp; |
116 | isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev; | 112 | isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev; |
117 | isa_dev->ofdev.dev.bus = &isa_bus_type; | 113 | isa_dev->ofdev.dev.bus = &isa_bus_type; |
@@ -180,14 +176,12 @@ void __init isa_init(void) | |||
180 | pbm = pdev_cookie->pbm; | 176 | pbm = pdev_cookie->pbm; |
181 | dp = pdev_cookie->prom_node; | 177 | dp = pdev_cookie->prom_node; |
182 | 178 | ||
183 | isa_br = kmalloc(sizeof(*isa_br), GFP_KERNEL); | 179 | isa_br = kzalloc(sizeof(*isa_br), GFP_KERNEL); |
184 | if (!isa_br) { | 180 | if (!isa_br) { |
185 | printk(KERN_DEBUG "isa: cannot allocate sparc_isa_bridge"); | 181 | printk(KERN_DEBUG "isa: cannot allocate sparc_isa_bridge"); |
186 | return; | 182 | return; |
187 | } | 183 | } |
188 | 184 | ||
189 | memset(isa_br, 0, sizeof(*isa_br)); | ||
190 | |||
191 | isa_br->ofdev.node = dp; | 185 | isa_br->ofdev.node = dp; |
192 | isa_br->ofdev.dev.parent = &pdev->dev; | 186 | isa_br->ofdev.dev.parent = &pdev->dev; |
193 | isa_br->ofdev.dev.bus = &isa_bus_type; | 187 | isa_br->ofdev.dev.bus = &isa_bus_type; |
diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c index 8e75ed762fd8..ae221f0d4a6f 100644 --- a/arch/sparc64/kernel/kprobes.c +++ b/arch/sparc64/kernel/kprobes.c | |||
@@ -45,7 +45,11 @@ DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | |||
45 | int __kprobes arch_prepare_kprobe(struct kprobe *p) | 45 | int __kprobes arch_prepare_kprobe(struct kprobe *p) |
46 | { | 46 | { |
47 | p->ainsn.insn[0] = *p->addr; | 47 | p->ainsn.insn[0] = *p->addr; |
48 | flushi(&p->ainsn.insn[0]); | ||
49 | |||
48 | p->ainsn.insn[1] = BREAKPOINT_INSTRUCTION_2; | 50 | p->ainsn.insn[1] = BREAKPOINT_INSTRUCTION_2; |
51 | flushi(&p->ainsn.insn[1]); | ||
52 | |||
49 | p->opcode = *p->addr; | 53 | p->opcode = *p->addr; |
50 | return 0; | 54 | return 0; |
51 | } | 55 | } |
@@ -185,16 +189,19 @@ no_kprobe: | |||
185 | /* If INSN is a relative control transfer instruction, | 189 | /* If INSN is a relative control transfer instruction, |
186 | * return the corrected branch destination value. | 190 | * return the corrected branch destination value. |
187 | * | 191 | * |
188 | * The original INSN location was REAL_PC, it actually | 192 | * regs->tpc and regs->tnpc still hold the values of the |
189 | * executed at PC and produced destination address NPC. | 193 | * program counters at the time of trap due to the execution |
194 | * of the BREAKPOINT_INSTRUCTION_2 at p->ainsn.insn[1] | ||
195 | * | ||
190 | */ | 196 | */ |
191 | static unsigned long __kprobes relbranch_fixup(u32 insn, unsigned long real_pc, | 197 | static unsigned long __kprobes relbranch_fixup(u32 insn, struct kprobe *p, |
192 | unsigned long pc, | 198 | struct pt_regs *regs) |
193 | unsigned long npc) | ||
194 | { | 199 | { |
200 | unsigned long real_pc = (unsigned long) p->addr; | ||
201 | |||
195 | /* Branch not taken, no mods necessary. */ | 202 | /* Branch not taken, no mods necessary. */ |
196 | if (npc == pc + 0x4UL) | 203 | if (regs->tnpc == regs->tpc + 0x4UL) |
197 | return real_pc + 0x4UL; | 204 | return real_pc + 0x8UL; |
198 | 205 | ||
199 | /* The three cases are call, branch w/prediction, | 206 | /* The three cases are call, branch w/prediction, |
200 | * and traditional branch. | 207 | * and traditional branch. |
@@ -202,14 +209,21 @@ static unsigned long __kprobes relbranch_fixup(u32 insn, unsigned long real_pc, | |||
202 | if ((insn & 0xc0000000) == 0x40000000 || | 209 | if ((insn & 0xc0000000) == 0x40000000 || |
203 | (insn & 0xc1c00000) == 0x00400000 || | 210 | (insn & 0xc1c00000) == 0x00400000 || |
204 | (insn & 0xc1c00000) == 0x00800000) { | 211 | (insn & 0xc1c00000) == 0x00800000) { |
212 | unsigned long ainsn_addr; | ||
213 | |||
214 | ainsn_addr = (unsigned long) &p->ainsn.insn[0]; | ||
215 | |||
205 | /* The instruction did all the work for us | 216 | /* The instruction did all the work for us |
206 | * already, just apply the offset to the correct | 217 | * already, just apply the offset to the correct |
207 | * instruction location. | 218 | * instruction location. |
208 | */ | 219 | */ |
209 | return (real_pc + (npc - pc)); | 220 | return (real_pc + (regs->tnpc - ainsn_addr)); |
210 | } | 221 | } |
211 | 222 | ||
212 | return real_pc + 0x4UL; | 223 | /* It is jmpl or some other absolute PC modification instruction, |
224 | * leave NPC as-is. | ||
225 | */ | ||
226 | return regs->tnpc; | ||
213 | } | 227 | } |
214 | 228 | ||
215 | /* If INSN is an instruction which writes it's PC location | 229 | /* If INSN is an instruction which writes it's PC location |
@@ -220,12 +234,12 @@ static void __kprobes retpc_fixup(struct pt_regs *regs, u32 insn, | |||
220 | { | 234 | { |
221 | unsigned long *slot = NULL; | 235 | unsigned long *slot = NULL; |
222 | 236 | ||
223 | /* Simplest cast is call, which always uses %o7 */ | 237 | /* Simplest case is 'call', which always uses %o7 */ |
224 | if ((insn & 0xc0000000) == 0x40000000) { | 238 | if ((insn & 0xc0000000) == 0x40000000) { |
225 | slot = ®s->u_regs[UREG_I7]; | 239 | slot = ®s->u_regs[UREG_I7]; |
226 | } | 240 | } |
227 | 241 | ||
228 | /* Jmpl encodes the register inside of the opcode */ | 242 | /* 'jmpl' encodes the register inside of the opcode */ |
229 | if ((insn & 0xc1f80000) == 0x81c00000) { | 243 | if ((insn & 0xc1f80000) == 0x81c00000) { |
230 | unsigned long rd = ((insn >> 25) & 0x1f); | 244 | unsigned long rd = ((insn >> 25) & 0x1f); |
231 | 245 | ||
@@ -247,11 +261,11 @@ static void __kprobes retpc_fixup(struct pt_regs *regs, u32 insn, | |||
247 | 261 | ||
248 | /* | 262 | /* |
249 | * Called after single-stepping. p->addr is the address of the | 263 | * Called after single-stepping. p->addr is the address of the |
250 | * instruction whose first byte has been replaced by the breakpoint | 264 | * instruction which has been replaced by the breakpoint |
251 | * instruction. To avoid the SMP problems that can occur when we | 265 | * instruction. To avoid the SMP problems that can occur when we |
252 | * temporarily put back the original opcode to single-step, we | 266 | * temporarily put back the original opcode to single-step, we |
253 | * single-stepped a copy of the instruction. The address of this | 267 | * single-stepped a copy of the instruction. The address of this |
254 | * copy is p->ainsn.insn. | 268 | * copy is &p->ainsn.insn[0]. |
255 | * | 269 | * |
256 | * This function prepares to return from the post-single-step | 270 | * This function prepares to return from the post-single-step |
257 | * breakpoint trap. | 271 | * breakpoint trap. |
@@ -261,11 +275,11 @@ static void __kprobes resume_execution(struct kprobe *p, | |||
261 | { | 275 | { |
262 | u32 insn = p->ainsn.insn[0]; | 276 | u32 insn = p->ainsn.insn[0]; |
263 | 277 | ||
278 | regs->tnpc = relbranch_fixup(insn, p, regs); | ||
279 | |||
280 | /* This assignment must occur after relbranch_fixup() */ | ||
264 | regs->tpc = kcb->kprobe_orig_tnpc; | 281 | regs->tpc = kcb->kprobe_orig_tnpc; |
265 | regs->tnpc = relbranch_fixup(insn, | 282 | |
266 | (unsigned long) p->addr, | ||
267 | (unsigned long) &p->ainsn.insn[0], | ||
268 | regs->tnpc); | ||
269 | retpc_fixup(regs, insn, (unsigned long) p->addr); | 283 | retpc_fixup(regs, insn, (unsigned long) p->addr); |
270 | 284 | ||
271 | regs->tstate = ((regs->tstate & ~TSTATE_PIL) | | 285 | regs->tstate = ((regs->tstate & ~TSTATE_PIL) | |
@@ -430,17 +444,8 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) | |||
430 | struct jprobe *jp = container_of(p, struct jprobe, kp); | 444 | struct jprobe *jp = container_of(p, struct jprobe, kp); |
431 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 445 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
432 | 446 | ||
433 | kcb->jprobe_saved_regs_location = regs; | ||
434 | memcpy(&(kcb->jprobe_saved_regs), regs, sizeof(*regs)); | 447 | memcpy(&(kcb->jprobe_saved_regs), regs, sizeof(*regs)); |
435 | 448 | ||
436 | /* Save a whole stack frame, this gets arguments | ||
437 | * pushed onto the stack after using up all the | ||
438 | * arg registers. | ||
439 | */ | ||
440 | memcpy(&(kcb->jprobe_saved_stack), | ||
441 | (char *) (regs->u_regs[UREG_FP] + STACK_BIAS), | ||
442 | sizeof(kcb->jprobe_saved_stack)); | ||
443 | |||
444 | regs->tpc = (unsigned long) jp->entry; | 449 | regs->tpc = (unsigned long) jp->entry; |
445 | regs->tnpc = ((unsigned long) jp->entry) + 0x4UL; | 450 | regs->tnpc = ((unsigned long) jp->entry) + 0x4UL; |
446 | regs->tstate |= TSTATE_PIL; | 451 | regs->tstate |= TSTATE_PIL; |
@@ -450,10 +455,19 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) | |||
450 | 455 | ||
451 | void __kprobes jprobe_return(void) | 456 | void __kprobes jprobe_return(void) |
452 | { | 457 | { |
453 | __asm__ __volatile__( | 458 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
454 | ".globl jprobe_return_trap_instruction\n" | 459 | register unsigned long orig_fp asm("g1"); |
460 | |||
461 | orig_fp = kcb->jprobe_saved_regs.u_regs[UREG_FP]; | ||
462 | __asm__ __volatile__("\n" | ||
463 | "1: cmp %%sp, %0\n\t" | ||
464 | "blu,a,pt %%xcc, 1b\n\t" | ||
465 | " restore\n\t" | ||
466 | ".globl jprobe_return_trap_instruction\n" | ||
455 | "jprobe_return_trap_instruction:\n\t" | 467 | "jprobe_return_trap_instruction:\n\t" |
456 | "ta 0x70"); | 468 | "ta 0x70" |
469 | : /* no outputs */ | ||
470 | : "r" (orig_fp)); | ||
457 | } | 471 | } |
458 | 472 | ||
459 | extern void jprobe_return_trap_instruction(void); | 473 | extern void jprobe_return_trap_instruction(void); |
@@ -466,26 +480,7 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) | |||
466 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 480 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
467 | 481 | ||
468 | if (addr == (u32 *) jprobe_return_trap_instruction) { | 482 | if (addr == (u32 *) jprobe_return_trap_instruction) { |
469 | if (kcb->jprobe_saved_regs_location != regs) { | ||
470 | printk("JPROBE: Current regs (%p) does not match " | ||
471 | "saved regs (%p).\n", | ||
472 | regs, kcb->jprobe_saved_regs_location); | ||
473 | printk("JPROBE: Saved registers\n"); | ||
474 | __show_regs(kcb->jprobe_saved_regs_location); | ||
475 | printk("JPROBE: Current registers\n"); | ||
476 | __show_regs(regs); | ||
477 | BUG(); | ||
478 | } | ||
479 | /* Restore old register state. Do pt_regs | ||
480 | * first so that UREG_FP is the original one for | ||
481 | * the stack frame restore. | ||
482 | */ | ||
483 | memcpy(regs, &(kcb->jprobe_saved_regs), sizeof(*regs)); | 483 | memcpy(regs, &(kcb->jprobe_saved_regs), sizeof(*regs)); |
484 | |||
485 | memcpy((char *) (regs->u_regs[UREG_FP] + STACK_BIAS), | ||
486 | &(kcb->jprobe_saved_stack), | ||
487 | sizeof(kcb->jprobe_saved_stack)); | ||
488 | |||
489 | preempt_enable_no_resched(); | 484 | preempt_enable_no_resched(); |
490 | return 1; | 485 | return 1; |
491 | } | 486 | } |
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index 8cc14fc6b6f1..cec0eceae552 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -1007,10 +1007,9 @@ struct of_device* of_platform_device_create(struct device_node *np, | |||
1007 | { | 1007 | { |
1008 | struct of_device *dev; | 1008 | struct of_device *dev; |
1009 | 1009 | ||
1010 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 1010 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
1011 | if (!dev) | 1011 | if (!dev) |
1012 | return NULL; | 1012 | return NULL; |
1013 | memset(dev, 0, sizeof(*dev)); | ||
1014 | 1013 | ||
1015 | dev->dev.parent = parent; | 1014 | dev->dev.parent = parent; |
1016 | dev->dev.bus = bus; | 1015 | dev->dev.bus = bus; |
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index 03ad4c06758e..6b04794b7a97 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c | |||
@@ -798,7 +798,7 @@ static struct pci_ops pci_sun4v_ops = { | |||
798 | static void pbm_scan_bus(struct pci_controller_info *p, | 798 | static void pbm_scan_bus(struct pci_controller_info *p, |
799 | struct pci_pbm_info *pbm) | 799 | struct pci_pbm_info *pbm) |
800 | { | 800 | { |
801 | struct pcidev_cookie *cookie = kmalloc(sizeof(*cookie), GFP_KERNEL); | 801 | struct pcidev_cookie *cookie = kzalloc(sizeof(*cookie), GFP_KERNEL); |
802 | 802 | ||
803 | if (!cookie) { | 803 | if (!cookie) { |
804 | prom_printf("%s: Critical allocation failure.\n", pbm->name); | 804 | prom_printf("%s: Critical allocation failure.\n", pbm->name); |
@@ -806,7 +806,6 @@ static void pbm_scan_bus(struct pci_controller_info *p, | |||
806 | } | 806 | } |
807 | 807 | ||
808 | /* All we care about is the PBM. */ | 808 | /* All we care about is the PBM. */ |
809 | memset(cookie, 0, sizeof(*cookie)); | ||
810 | cookie->pbm = pbm; | 809 | cookie->pbm = pbm; |
811 | 810 | ||
812 | pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, p->pci_ops, pbm); | 811 | pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, p->pci_ops, pbm); |
@@ -1048,12 +1047,11 @@ static void pci_sun4v_iommu_init(struct pci_pbm_info *pbm) | |||
1048 | /* Allocate and initialize the free area map. */ | 1047 | /* Allocate and initialize the free area map. */ |
1049 | sz = num_tsb_entries / 8; | 1048 | sz = num_tsb_entries / 8; |
1050 | sz = (sz + 7UL) & ~7UL; | 1049 | sz = (sz + 7UL) & ~7UL; |
1051 | iommu->arena.map = kmalloc(sz, GFP_KERNEL); | 1050 | iommu->arena.map = kzalloc(sz, GFP_KERNEL); |
1052 | if (!iommu->arena.map) { | 1051 | if (!iommu->arena.map) { |
1053 | prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n"); | 1052 | prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n"); |
1054 | prom_halt(); | 1053 | prom_halt(); |
1055 | } | 1054 | } |
1056 | memset(iommu->arena.map, 0, sz); | ||
1057 | iommu->arena.limit = num_tsb_entries; | 1055 | iommu->arena.limit = num_tsb_entries; |
1058 | 1056 | ||
1059 | sz = probe_existing_entries(pbm, iommu); | 1057 | sz = probe_existing_entries(pbm, iommu); |
@@ -1164,24 +1162,20 @@ void sun4v_pci_init(struct device_node *dp, char *model_name) | |||
1164 | per_cpu(pci_iommu_batch, i).pglist = (u64 *) page; | 1162 | per_cpu(pci_iommu_batch, i).pglist = (u64 *) page; |
1165 | } | 1163 | } |
1166 | 1164 | ||
1167 | p = kmalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); | 1165 | p = kzalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); |
1168 | if (!p) | 1166 | if (!p) |
1169 | goto fatal_memory_error; | 1167 | goto fatal_memory_error; |
1170 | 1168 | ||
1171 | memset(p, 0, sizeof(*p)); | 1169 | iommu = kzalloc(sizeof(struct pci_iommu), GFP_ATOMIC); |
1172 | |||
1173 | iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC); | ||
1174 | if (!iommu) | 1170 | if (!iommu) |
1175 | goto fatal_memory_error; | 1171 | goto fatal_memory_error; |
1176 | 1172 | ||
1177 | memset(iommu, 0, sizeof(*iommu)); | ||
1178 | p->pbm_A.iommu = iommu; | 1173 | p->pbm_A.iommu = iommu; |
1179 | 1174 | ||
1180 | iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC); | 1175 | iommu = kzalloc(sizeof(struct pci_iommu), GFP_ATOMIC); |
1181 | if (!iommu) | 1176 | if (!iommu) |
1182 | goto fatal_memory_error; | 1177 | goto fatal_memory_error; |
1183 | 1178 | ||
1184 | memset(iommu, 0, sizeof(*iommu)); | ||
1185 | p->pbm_B.iommu = iommu; | 1179 | p->pbm_B.iommu = iommu; |
1186 | 1180 | ||
1187 | p->next = pci_controller_root; | 1181 | p->next = pci_controller_root; |
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c index d31975e6d6f6..81111a12f0a8 100644 --- a/arch/sparc64/kernel/ptrace.c +++ b/arch/sparc64/kernel/ptrace.c | |||
@@ -202,7 +202,10 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
202 | #endif | 202 | #endif |
203 | if (request == PTRACE_TRACEME) { | 203 | if (request == PTRACE_TRACEME) { |
204 | ret = ptrace_traceme(); | 204 | ret = ptrace_traceme(); |
205 | pt_succ_return(regs, 0); | 205 | if (ret < 0) |
206 | pt_error_return(regs, -ret); | ||
207 | else | ||
208 | pt_succ_return(regs, 0); | ||
206 | goto out; | 209 | goto out; |
207 | } | 210 | } |
208 | 211 | ||
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index 3522cd66f3bb..079d18a11d24 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S | |||
@@ -165,14 +165,26 @@ rtrap: | |||
165 | __handle_softirq_continue: | 165 | __handle_softirq_continue: |
166 | rtrap_xcall: | 166 | rtrap_xcall: |
167 | sethi %hi(0xf << 20), %l4 | 167 | sethi %hi(0xf << 20), %l4 |
168 | andcc %l1, TSTATE_PRIV, %l3 | ||
169 | and %l1, %l4, %l4 | 168 | and %l1, %l4, %l4 |
169 | andn %l1, %l4, %l1 | ||
170 | srl %l4, 20, %l4 | ||
171 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
172 | brnz,pn %l4, rtrap_no_irq_enable | ||
173 | nop | ||
174 | call trace_hardirqs_on | ||
175 | nop | ||
176 | wrpr %l4, %pil | ||
177 | rtrap_no_irq_enable: | ||
178 | #endif | ||
179 | andcc %l1, TSTATE_PRIV, %l3 | ||
170 | bne,pn %icc, to_kernel | 180 | bne,pn %icc, to_kernel |
171 | andn %l1, %l4, %l1 | 181 | nop |
172 | 182 | ||
173 | /* We must hold IRQs off and atomically test schedule+signal | 183 | /* We must hold IRQs off and atomically test schedule+signal |
174 | * state, then hold them off all the way back to userspace. | 184 | * state, then hold them off all the way back to userspace. |
175 | * If we are returning to kernel, none of this matters. | 185 | * If we are returning to kernel, none of this matters. Note |
186 | * that we are disabling interrupts via PSTATE_IE, not using | ||
187 | * %pil. | ||
176 | * | 188 | * |
177 | * If we do not do this, there is a window where we would do | 189 | * If we do not do this, there is a window where we would do |
178 | * the tests, later the signal/resched event arrives but we do | 190 | * the tests, later the signal/resched event arrives but we do |
@@ -256,7 +268,6 @@ rt_continue: ldx [%sp + PTREGS_OFF + PT_V9_G1], %g1 | |||
256 | 268 | ||
257 | ld [%sp + PTREGS_OFF + PT_V9_Y], %o3 | 269 | ld [%sp + PTREGS_OFF + PT_V9_Y], %o3 |
258 | wr %o3, %g0, %y | 270 | wr %o3, %g0, %y |
259 | srl %l4, 20, %l4 | ||
260 | wrpr %l4, 0x0, %pil | 271 | wrpr %l4, 0x0, %pil |
261 | wrpr %g0, 0x1, %tl | 272 | wrpr %g0, 0x1, %tl |
262 | wrpr %l1, %g0, %tstate | 273 | wrpr %l1, %g0, %tstate |
@@ -374,8 +385,8 @@ to_kernel: | |||
374 | ldx [%g6 + TI_FLAGS], %l5 | 385 | ldx [%g6 + TI_FLAGS], %l5 |
375 | andcc %l5, _TIF_NEED_RESCHED, %g0 | 386 | andcc %l5, _TIF_NEED_RESCHED, %g0 |
376 | be,pt %xcc, kern_fpucheck | 387 | be,pt %xcc, kern_fpucheck |
377 | srl %l4, 20, %l5 | 388 | nop |
378 | cmp %l5, 0 | 389 | cmp %l4, 0 |
379 | bne,pn %xcc, kern_fpucheck | 390 | bne,pn %xcc, kern_fpucheck |
380 | sethi %hi(PREEMPT_ACTIVE), %l6 | 391 | sethi %hi(PREEMPT_ACTIVE), %l6 |
381 | stw %l6, [%g6 + TI_PRE_COUNT] | 392 | stw %l6, [%g6 + TI_PRE_COUNT] |
diff --git a/arch/sparc64/kernel/stacktrace.c b/arch/sparc64/kernel/stacktrace.c new file mode 100644 index 000000000000..c4d15f2762b9 --- /dev/null +++ b/arch/sparc64/kernel/stacktrace.c | |||
@@ -0,0 +1,41 @@ | |||
1 | #include <linux/sched.h> | ||
2 | #include <linux/stacktrace.h> | ||
3 | #include <linux/thread_info.h> | ||
4 | #include <asm/ptrace.h> | ||
5 | |||
6 | void save_stack_trace(struct stack_trace *trace, struct task_struct *task) | ||
7 | { | ||
8 | unsigned long ksp, fp, thread_base; | ||
9 | struct thread_info *tp; | ||
10 | |||
11 | if (!task) | ||
12 | task = current; | ||
13 | tp = task_thread_info(task); | ||
14 | if (task == current) { | ||
15 | flushw_all(); | ||
16 | __asm__ __volatile__( | ||
17 | "mov %%fp, %0" | ||
18 | : "=r" (ksp) | ||
19 | ); | ||
20 | } else | ||
21 | ksp = tp->ksp; | ||
22 | |||
23 | fp = ksp + STACK_BIAS; | ||
24 | thread_base = (unsigned long) tp; | ||
25 | do { | ||
26 | struct reg_window *rw; | ||
27 | |||
28 | /* Bogus frame pointer? */ | ||
29 | if (fp < (thread_base + sizeof(struct thread_info)) || | ||
30 | fp >= (thread_base + THREAD_SIZE)) | ||
31 | break; | ||
32 | |||
33 | rw = (struct reg_window *) fp; | ||
34 | if (trace->skip > 0) | ||
35 | trace->skip--; | ||
36 | else | ||
37 | trace->entries[trace->nr_entries++] = rw->ins[7]; | ||
38 | |||
39 | fp = rw->ins[6] + STACK_BIAS; | ||
40 | } while (trace->nr_entries < trace->max_entries); | ||
41 | } | ||
diff --git a/arch/sparc64/kernel/sun4v_ivec.S b/arch/sparc64/kernel/sun4v_ivec.S index 49703c3c5769..405855dd886b 100644 --- a/arch/sparc64/kernel/sun4v_ivec.S +++ b/arch/sparc64/kernel/sun4v_ivec.S | |||
@@ -190,7 +190,10 @@ sun4v_res_mondo: | |||
190 | mov %g1, %g4 | 190 | mov %g1, %g4 |
191 | ba,pt %xcc, etrap_irq | 191 | ba,pt %xcc, etrap_irq |
192 | rd %pc, %g7 | 192 | rd %pc, %g7 |
193 | 193 | #ifdef CONFIG_TRACE_IRQFLAGS | |
194 | call trace_hardirqs_off | ||
195 | nop | ||
196 | #endif | ||
194 | /* Log the event. */ | 197 | /* Log the event. */ |
195 | add %sp, PTREGS_OFF, %o0 | 198 | add %sp, PTREGS_OFF, %o0 |
196 | call sun4v_resum_error | 199 | call sun4v_resum_error |
@@ -216,7 +219,10 @@ sun4v_res_mondo_queue_full: | |||
216 | wrpr %g0, 15, %pil | 219 | wrpr %g0, 15, %pil |
217 | ba,pt %xcc, etrap_irq | 220 | ba,pt %xcc, etrap_irq |
218 | rd %pc, %g7 | 221 | rd %pc, %g7 |
219 | 222 | #ifdef CONFIG_TRACE_IRQFLAGS | |
223 | call trace_hardirqs_off | ||
224 | nop | ||
225 | #endif | ||
220 | call sun4v_resum_overflow | 226 | call sun4v_resum_overflow |
221 | add %sp, PTREGS_OFF, %o0 | 227 | add %sp, PTREGS_OFF, %o0 |
222 | 228 | ||
@@ -295,7 +301,10 @@ sun4v_nonres_mondo: | |||
295 | mov %g1, %g4 | 301 | mov %g1, %g4 |
296 | ba,pt %xcc, etrap_irq | 302 | ba,pt %xcc, etrap_irq |
297 | rd %pc, %g7 | 303 | rd %pc, %g7 |
298 | 304 | #ifdef CONFIG_TRACE_IRQFLAGS | |
305 | call trace_hardirqs_off | ||
306 | nop | ||
307 | #endif | ||
299 | /* Log the event. */ | 308 | /* Log the event. */ |
300 | add %sp, PTREGS_OFF, %o0 | 309 | add %sp, PTREGS_OFF, %o0 |
301 | call sun4v_nonresum_error | 310 | call sun4v_nonresum_error |
@@ -321,7 +330,10 @@ sun4v_nonres_mondo_queue_full: | |||
321 | wrpr %g0, 15, %pil | 330 | wrpr %g0, 15, %pil |
322 | ba,pt %xcc, etrap_irq | 331 | ba,pt %xcc, etrap_irq |
323 | rd %pc, %g7 | 332 | rd %pc, %g7 |
324 | 333 | #ifdef CONFIG_TRACE_IRQFLAGS | |
334 | call trace_hardirqs_off | ||
335 | nop | ||
336 | #endif | ||
325 | call sun4v_nonresum_overflow | 337 | call sun4v_nonresum_overflow |
326 | add %sp, PTREGS_OFF, %o0 | 338 | add %sp, PTREGS_OFF, %o0 |
327 | 339 | ||
diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c index 7da72d3b322a..4446f66590fa 100644 --- a/arch/sparc64/kernel/sys_sunos32.c +++ b/arch/sparc64/kernel/sys_sunos32.c | |||
@@ -83,7 +83,7 @@ asmlinkage u32 sunos_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u32 of | |||
83 | file = fget(fd); | 83 | file = fget(fd); |
84 | if (!file) | 84 | if (!file) |
85 | goto out; | 85 | goto out; |
86 | inode = file->f_dentry->d_inode; | 86 | inode = file->f_path.dentry->d_inode; |
87 | if (imajor(inode) == MEM_MAJOR && iminor(inode) == 5) { | 87 | if (imajor(inode) == MEM_MAJOR && iminor(inode) == 5) { |
88 | flags |= MAP_ANONYMOUS; | 88 | flags |= MAP_ANONYMOUS; |
89 | fput(file); | 89 | fput(file); |
@@ -615,7 +615,7 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr) | |||
615 | if (!file) | 615 | if (!file) |
616 | return 0; | 616 | return 0; |
617 | 617 | ||
618 | inode = file->f_dentry->d_inode; | 618 | inode = file->f_path.dentry->d_inode; |
619 | 619 | ||
620 | socket = SOCKET_I(inode); | 620 | socket = SOCKET_I(inode); |
621 | local.sin_family = AF_INET; | 621 | local.sin_family = AF_INET; |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index fe1796c939c3..ad67784292db 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/sched.h> /* for jiffies */ | 13 | #include <linux/sched.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/kallsyms.h> | 15 | #include <linux/kallsyms.h> |
16 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
@@ -1873,6 +1873,16 @@ void sun4v_resum_error(struct pt_regs *regs, unsigned long offset) | |||
1873 | 1873 | ||
1874 | put_cpu(); | 1874 | put_cpu(); |
1875 | 1875 | ||
1876 | if (ent->err_type == SUN4V_ERR_TYPE_WARNING_RES) { | ||
1877 | /* If err_type is 0x4, it's a powerdown request. Do | ||
1878 | * not do the usual resumable error log because that | ||
1879 | * makes it look like some abnormal error. | ||
1880 | */ | ||
1881 | printk(KERN_INFO "Power down request...\n"); | ||
1882 | kill_cad_pid(SIGINT, 1); | ||
1883 | return; | ||
1884 | } | ||
1885 | |||
1876 | sun4v_log_error(regs, &local_copy, cpu, | 1886 | sun4v_log_error(regs, &local_copy, cpu, |
1877 | KERN_ERR "RESUMABLE ERROR", | 1887 | KERN_ERR "RESUMABLE ERROR", |
1878 | &sun4v_resum_oflow_cnt); | 1888 | &sun4v_resum_oflow_cnt); |
@@ -2261,8 +2271,12 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
2261 | do_exit(SIGSEGV); | 2271 | do_exit(SIGSEGV); |
2262 | } | 2272 | } |
2263 | 2273 | ||
2274 | #define VIS_OPCODE_MASK ((0x3 << 30) | (0x3f << 19)) | ||
2275 | #define VIS_OPCODE_VAL ((0x2 << 30) | (0x36 << 19)) | ||
2276 | |||
2264 | extern int handle_popc(u32 insn, struct pt_regs *regs); | 2277 | extern int handle_popc(u32 insn, struct pt_regs *regs); |
2265 | extern int handle_ldf_stq(u32 insn, struct pt_regs *regs); | 2278 | extern int handle_ldf_stq(u32 insn, struct pt_regs *regs); |
2279 | extern int vis_emul(struct pt_regs *, unsigned int); | ||
2266 | 2280 | ||
2267 | void do_illegal_instruction(struct pt_regs *regs) | 2281 | void do_illegal_instruction(struct pt_regs *regs) |
2268 | { | 2282 | { |
@@ -2287,10 +2301,18 @@ void do_illegal_instruction(struct pt_regs *regs) | |||
2287 | if (handle_ldf_stq(insn, regs)) | 2301 | if (handle_ldf_stq(insn, regs)) |
2288 | return; | 2302 | return; |
2289 | } else if (tlb_type == hypervisor) { | 2303 | } else if (tlb_type == hypervisor) { |
2290 | extern int vis_emul(struct pt_regs *, unsigned int); | 2304 | if ((insn & VIS_OPCODE_MASK) == VIS_OPCODE_VAL) { |
2305 | if (!vis_emul(regs, insn)) | ||
2306 | return; | ||
2307 | } else { | ||
2308 | struct fpustate *f = FPUSTATE; | ||
2291 | 2309 | ||
2292 | if (!vis_emul(regs, insn)) | 2310 | /* XXX maybe verify XFSR bits like |
2293 | return; | 2311 | * XXX do_fpother() does? |
2312 | */ | ||
2313 | if (do_mathemu(regs, f)) | ||
2314 | return; | ||
2315 | } | ||
2294 | } | 2316 | } |
2295 | } | 2317 | } |
2296 | info.si_signo = SIGILL; | 2318 | info.si_signo = SIGILL; |
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c index a9b765271b85..bc18d480dd1c 100644 --- a/arch/sparc64/kernel/unaligned.c +++ b/arch/sparc64/kernel/unaligned.c | |||
@@ -243,7 +243,7 @@ static inline int ok_for_kernel(unsigned int insn) | |||
243 | return !floating_point_load_or_store_p(insn); | 243 | return !floating_point_load_or_store_p(insn); |
244 | } | 244 | } |
245 | 245 | ||
246 | static void kernel_mna_trap_fault(void) | 246 | static void kernel_mna_trap_fault(int fixup_tstate_asi) |
247 | { | 247 | { |
248 | struct pt_regs *regs = current_thread_info()->kern_una_regs; | 248 | struct pt_regs *regs = current_thread_info()->kern_una_regs; |
249 | unsigned int insn = current_thread_info()->kern_una_insn; | 249 | unsigned int insn = current_thread_info()->kern_una_insn; |
@@ -274,18 +274,15 @@ static void kernel_mna_trap_fault(void) | |||
274 | regs->tpc = entry->fixup; | 274 | regs->tpc = entry->fixup; |
275 | regs->tnpc = regs->tpc + 4; | 275 | regs->tnpc = regs->tpc + 4; |
276 | 276 | ||
277 | regs->tstate &= ~TSTATE_ASI; | 277 | if (fixup_tstate_asi) { |
278 | regs->tstate |= (ASI_AIUS << 24UL); | 278 | regs->tstate &= ~TSTATE_ASI; |
279 | regs->tstate |= (ASI_AIUS << 24UL); | ||
280 | } | ||
279 | } | 281 | } |
280 | 282 | ||
281 | asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | 283 | static void log_unaligned(struct pt_regs *regs) |
282 | { | 284 | { |
283 | static unsigned long count, last_time; | 285 | static unsigned long count, last_time; |
284 | enum direction dir = decode_direction(insn); | ||
285 | int size = decode_access_size(insn); | ||
286 | |||
287 | current_thread_info()->kern_una_regs = regs; | ||
288 | current_thread_info()->kern_una_insn = insn; | ||
289 | 286 | ||
290 | if (jiffies - last_time > 5 * HZ) | 287 | if (jiffies - last_time > 5 * HZ) |
291 | count = 0; | 288 | count = 0; |
@@ -295,6 +292,28 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
295 | printk("Kernel unaligned access at TPC[%lx] ", regs->tpc); | 292 | printk("Kernel unaligned access at TPC[%lx] ", regs->tpc); |
296 | print_symbol("%s\n", regs->tpc); | 293 | print_symbol("%s\n", regs->tpc); |
297 | } | 294 | } |
295 | } | ||
296 | |||
297 | asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | ||
298 | { | ||
299 | enum direction dir = decode_direction(insn); | ||
300 | int size = decode_access_size(insn); | ||
301 | int orig_asi, asi; | ||
302 | |||
303 | current_thread_info()->kern_una_regs = regs; | ||
304 | current_thread_info()->kern_una_insn = insn; | ||
305 | |||
306 | orig_asi = asi = decode_asi(insn, regs); | ||
307 | |||
308 | /* If this is a {get,put}_user() on an unaligned userspace pointer, | ||
309 | * just signal a fault and do not log the event. | ||
310 | */ | ||
311 | if (asi == ASI_AIUS) { | ||
312 | kernel_mna_trap_fault(0); | ||
313 | return; | ||
314 | } | ||
315 | |||
316 | log_unaligned(regs); | ||
298 | 317 | ||
299 | if (!ok_for_kernel(insn) || dir == both) { | 318 | if (!ok_for_kernel(insn) || dir == both) { |
300 | printk("Unsupported unaligned load/store trap for kernel " | 319 | printk("Unsupported unaligned load/store trap for kernel " |
@@ -302,10 +321,10 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
302 | unaligned_panic("Kernel does fpu/atomic " | 321 | unaligned_panic("Kernel does fpu/atomic " |
303 | "unaligned load/store.", regs); | 322 | "unaligned load/store.", regs); |
304 | 323 | ||
305 | kernel_mna_trap_fault(); | 324 | kernel_mna_trap_fault(0); |
306 | } else { | 325 | } else { |
307 | unsigned long addr, *reg_addr; | 326 | unsigned long addr, *reg_addr; |
308 | int orig_asi, asi, err; | 327 | int err; |
309 | 328 | ||
310 | addr = compute_effective_address(regs, insn, | 329 | addr = compute_effective_address(regs, insn, |
311 | ((insn >> 25) & 0x1f)); | 330 | ((insn >> 25) & 0x1f)); |
@@ -315,7 +334,6 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
315 | regs->tpc, dirstrings[dir], addr, size, | 334 | regs->tpc, dirstrings[dir], addr, size, |
316 | regs->u_regs[UREG_RETPC]); | 335 | regs->u_regs[UREG_RETPC]); |
317 | #endif | 336 | #endif |
318 | orig_asi = asi = decode_asi(insn, regs); | ||
319 | switch (asi) { | 337 | switch (asi) { |
320 | case ASI_NL: | 338 | case ASI_NL: |
321 | case ASI_AIUPL: | 339 | case ASI_AIUPL: |
@@ -365,7 +383,7 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
365 | /* Not reached... */ | 383 | /* Not reached... */ |
366 | } | 384 | } |
367 | if (unlikely(err)) | 385 | if (unlikely(err)) |
368 | kernel_mna_trap_fault(); | 386 | kernel_mna_trap_fault(1); |
369 | else | 387 | else |
370 | advance(regs); | 388 | advance(regs); |
371 | } | 389 | } |
diff --git a/arch/sparc64/kernel/visemul.c b/arch/sparc64/kernel/visemul.c index 84fedaa38aae..c3fd64706b53 100644 --- a/arch/sparc64/kernel/visemul.c +++ b/arch/sparc64/kernel/visemul.c | |||
@@ -128,9 +128,6 @@ | |||
128 | /* 001001100 - Permute bytes as specified by GSR.MASK */ | 128 | /* 001001100 - Permute bytes as specified by GSR.MASK */ |
129 | #define BSHUFFLE_OPF 0x04c | 129 | #define BSHUFFLE_OPF 0x04c |
130 | 130 | ||
131 | #define VIS_OPCODE_MASK ((0x3 << 30) | (0x3f << 19)) | ||
132 | #define VIS_OPCODE_VAL ((0x2 << 30) | (0x36 << 19)) | ||
133 | |||
134 | #define VIS_OPF_SHIFT 5 | 131 | #define VIS_OPF_SHIFT 5 |
135 | #define VIS_OPF_MASK (0x1ff << VIS_OPF_SHIFT) | 132 | #define VIS_OPF_MASK (0x1ff << VIS_OPF_SHIFT) |
136 | 133 | ||
@@ -810,9 +807,6 @@ int vis_emul(struct pt_regs *regs, unsigned int insn) | |||
810 | if (get_user(insn, (u32 __user *) pc)) | 807 | if (get_user(insn, (u32 __user *) pc)) |
811 | return -EFAULT; | 808 | return -EFAULT; |
812 | 809 | ||
813 | if ((insn & VIS_OPCODE_MASK) != VIS_OPCODE_VAL) | ||
814 | return -EINVAL; | ||
815 | |||
816 | opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT; | 810 | opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT; |
817 | switch (opf) { | 811 | switch (opf) { |
818 | default: | 812 | default: |
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index d70b60a3bbcc..737c26923c09 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S | |||
@@ -477,6 +477,10 @@ xcall_sync_tick: | |||
477 | sethi %hi(109f), %g7 | 477 | sethi %hi(109f), %g7 |
478 | b,pt %xcc, etrap_irq | 478 | b,pt %xcc, etrap_irq |
479 | 109: or %g7, %lo(109b), %g7 | 479 | 109: or %g7, %lo(109b), %g7 |
480 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
481 | call trace_hardirqs_off | ||
482 | nop | ||
483 | #endif | ||
480 | call smp_synchronize_tick_client | 484 | call smp_synchronize_tick_client |
481 | nop | 485 | nop |
482 | clr %l6 | 486 | clr %l6 |
@@ -508,6 +512,10 @@ xcall_report_regs: | |||
508 | sethi %hi(109f), %g7 | 512 | sethi %hi(109f), %g7 |
509 | b,pt %xcc, etrap_irq | 513 | b,pt %xcc, etrap_irq |
510 | 109: or %g7, %lo(109b), %g7 | 514 | 109: or %g7, %lo(109b), %g7 |
515 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
516 | call trace_hardirqs_off | ||
517 | nop | ||
518 | #endif | ||
511 | call __show_regs | 519 | call __show_regs |
512 | add %sp, PTREGS_OFF, %o0 | 520 | add %sp, PTREGS_OFF, %o0 |
513 | clr %l6 | 521 | clr %l6 |
diff --git a/arch/sparc64/solaris/fs.c b/arch/sparc64/solaris/fs.c index 12a940cc791f..61be597bf430 100644 --- a/arch/sparc64/solaris/fs.c +++ b/arch/sparc64/solaris/fs.c | |||
@@ -449,7 +449,7 @@ asmlinkage int solaris_fstatvfs(unsigned int fd, u32 buf) | |||
449 | error = -EBADF; | 449 | error = -EBADF; |
450 | file = fget(fd); | 450 | file = fget(fd); |
451 | if (file) { | 451 | if (file) { |
452 | error = report_statvfs(file->f_vfsmnt, file->f_dentry->d_inode, buf); | 452 | error = report_statvfs(file->f_path.mnt, file->f_path.dentry->d_inode, buf); |
453 | fput(file); | 453 | fput(file); |
454 | } | 454 | } |
455 | 455 | ||
@@ -481,7 +481,7 @@ asmlinkage int solaris_fstatvfs64(unsigned int fd, u32 buf) | |||
481 | file = fget(fd); | 481 | file = fget(fd); |
482 | if (file) { | 482 | if (file) { |
483 | lock_kernel(); | 483 | lock_kernel(); |
484 | error = report_statvfs64(file->f_vfsmnt, file->f_dentry->d_inode, buf); | 484 | error = report_statvfs64(file->f_path.mnt, file->f_path.dentry->d_inode, buf); |
485 | unlock_kernel(); | 485 | unlock_kernel(); |
486 | fput(file); | 486 | fput(file); |
487 | } | 487 | } |
diff --git a/arch/sparc64/solaris/ioctl.c b/arch/sparc64/solaris/ioctl.c index be0a054e3ed6..330743c5b3d8 100644 --- a/arch/sparc64/solaris/ioctl.c +++ b/arch/sparc64/solaris/ioctl.c | |||
@@ -299,8 +299,8 @@ static inline int solaris_sockmod(unsigned int fd, unsigned int cmd, u32 arg) | |||
299 | rcu_read_lock(); | 299 | rcu_read_lock(); |
300 | fdt = files_fdtable(current->files); | 300 | fdt = files_fdtable(current->files); |
301 | if (! fdt->fd[fd] || | 301 | if (! fdt->fd[fd] || |
302 | ! fdt->fd[fd]->f_dentry || | 302 | ! fdt->fd[fd]->f_path.dentry || |
303 | ! (ino = fdt->fd[fd]->f_dentry->d_inode) || | 303 | ! (ino = fdt->fd[fd]->f_path.dentry->d_inode) || |
304 | ! S_ISSOCK(ino->i_mode)) { | 304 | ! S_ISSOCK(ino->i_mode)) { |
305 | rcu_read_unlock(); | 305 | rcu_read_unlock(); |
306 | return TBADF; | 306 | return TBADF; |
@@ -480,7 +480,7 @@ static inline int solaris_S(struct file *filp, unsigned int fd, unsigned int cmd | |||
480 | struct sol_socket_struct *sock; | 480 | struct sol_socket_struct *sock; |
481 | struct module_info *mi; | 481 | struct module_info *mi; |
482 | 482 | ||
483 | ino = filp->f_dentry->d_inode; | 483 | ino = filp->f_path.dentry->d_inode; |
484 | if (!S_ISSOCK(ino->i_mode)) | 484 | if (!S_ISSOCK(ino->i_mode)) |
485 | return -EBADF; | 485 | return -EBADF; |
486 | sock = filp->private_data; | 486 | sock = filp->private_data; |
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c index 9ed997982f8d..bca16e8c95c3 100644 --- a/arch/sparc64/solaris/misc.c +++ b/arch/sparc64/solaris/misc.c | |||
@@ -77,7 +77,7 @@ static u32 do_solaris_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u64 o | |||
77 | if (!file) | 77 | if (!file) |
78 | goto out; | 78 | goto out; |
79 | else { | 79 | else { |
80 | struct inode * inode = file->f_dentry->d_inode; | 80 | struct inode * inode = file->f_path.dentry->d_inode; |
81 | if(imajor(inode) == MEM_MAJOR && | 81 | if(imajor(inode) == MEM_MAJOR && |
82 | iminor(inode) == 5) { | 82 | iminor(inode) == 5) { |
83 | flags |= MAP_ANONYMOUS; | 83 | flags |= MAP_ANONYMOUS; |
@@ -423,9 +423,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid) | |||
423 | Solaris setpgrp and setsid? */ | 423 | Solaris setpgrp and setsid? */ |
424 | ret = sys_setpgid(0, 0); | 424 | ret = sys_setpgid(0, 0); |
425 | if (ret) return ret; | 425 | if (ret) return ret; |
426 | mutex_lock(&tty_mutex); | 426 | proc_clear_tty(current); |
427 | current->signal->tty = NULL; | ||
428 | mutex_unlock(&tty_mutex); | ||
429 | return process_group(current); | 427 | return process_group(current); |
430 | } | 428 | } |
431 | case 2: /* getsid */ | 429 | case 2: /* getsid */ |
diff --git a/arch/sparc64/solaris/socksys.c b/arch/sparc64/solaris/socksys.c index 7c90e41fd3be..89a4757f192f 100644 --- a/arch/sparc64/solaris/socksys.c +++ b/arch/sparc64/solaris/socksys.c | |||
@@ -96,13 +96,13 @@ static int socksys_open(struct inode * inode, struct file * filp) | |||
96 | * No shit. WTF is it supposed to do, anyway? | 96 | * No shit. WTF is it supposed to do, anyway? |
97 | * | 97 | * |
98 | * Try instead: | 98 | * Try instead: |
99 | * d_delete(filp->f_dentry), then d_instantiate with sock inode | 99 | * d_delete(filp->f_path.dentry), then d_instantiate with sock inode |
100 | */ | 100 | */ |
101 | dentry = filp->f_dentry; | 101 | dentry = filp->f_path.dentry; |
102 | filp->f_dentry = dget(fcheck(fd)->f_dentry); | 102 | filp->f_path.dentry = dget(fcheck(fd)->f_path.dentry); |
103 | filp->f_dentry->d_inode->i_rdev = inode->i_rdev; | 103 | filp->f_path.dentry->d_inode->i_rdev = inode->i_rdev; |
104 | filp->f_dentry->d_inode->i_flock = inode->i_flock; | 104 | filp->f_path.dentry->d_inode->i_flock = inode->i_flock; |
105 | SOCKET_I(filp->f_dentry->d_inode)->file = filp; | 105 | SOCKET_I(filp->f_path.dentry->d_inode)->file = filp; |
106 | filp->f_op = &socksys_file_ops; | 106 | filp->f_op = &socksys_file_ops; |
107 | sock = (struct sol_socket_struct*) | 107 | sock = (struct sol_socket_struct*) |
108 | mykmalloc(sizeof(struct sol_socket_struct), GFP_KERNEL); | 108 | mykmalloc(sizeof(struct sol_socket_struct), GFP_KERNEL); |
@@ -148,7 +148,7 @@ static unsigned int socksys_poll(struct file * filp, poll_table * wait) | |||
148 | struct inode *ino; | 148 | struct inode *ino; |
149 | unsigned int mask = 0; | 149 | unsigned int mask = 0; |
150 | 150 | ||
151 | ino=filp->f_dentry->d_inode; | 151 | ino=filp->f_path.dentry->d_inode; |
152 | if (ino && S_ISSOCK(ino->i_mode)) { | 152 | if (ino && S_ISSOCK(ino->i_mode)) { |
153 | struct sol_socket_struct *sock; | 153 | struct sol_socket_struct *sock; |
154 | sock = (struct sol_socket_struct*)filp->private_data; | 154 | sock = (struct sol_socket_struct*)filp->private_data; |
diff --git a/arch/sparc64/solaris/timod.c b/arch/sparc64/solaris/timod.c index b84e5456b025..a9d32ceabf26 100644 --- a/arch/sparc64/solaris/timod.c +++ b/arch/sparc64/solaris/timod.c | |||
@@ -147,7 +147,7 @@ static void timod_wake_socket(unsigned int fd) | |||
147 | 147 | ||
148 | SOLD("wakeing socket"); | 148 | SOLD("wakeing socket"); |
149 | fdt = files_fdtable(current->files); | 149 | fdt = files_fdtable(current->files); |
150 | sock = SOCKET_I(fdt->fd[fd]->f_dentry->d_inode); | 150 | sock = SOCKET_I(fdt->fd[fd]->f_path.dentry->d_inode); |
151 | wake_up_interruptible(&sock->wait); | 151 | wake_up_interruptible(&sock->wait); |
152 | read_lock(&sock->sk->sk_callback_lock); | 152 | read_lock(&sock->sk->sk_callback_lock); |
153 | if (sock->fasync_list && !test_bit(SOCK_ASYNC_WAITDATA, &sock->flags)) | 153 | if (sock->fasync_list && !test_bit(SOCK_ASYNC_WAITDATA, &sock->flags)) |
@@ -361,7 +361,7 @@ int timod_putmsg(unsigned int fd, char __user *ctl_buf, int ctl_len, | |||
361 | 361 | ||
362 | fdt = files_fdtable(current->files); | 362 | fdt = files_fdtable(current->files); |
363 | filp = fdt->fd[fd]; | 363 | filp = fdt->fd[fd]; |
364 | ino = filp->f_dentry->d_inode; | 364 | ino = filp->f_path.dentry->d_inode; |
365 | sock = (struct sol_socket_struct *)filp->private_data; | 365 | sock = (struct sol_socket_struct *)filp->private_data; |
366 | SOLD("entry"); | 366 | SOLD("entry"); |
367 | if (get_user(ret, (int __user *)A(ctl_buf))) | 367 | if (get_user(ret, (int __user *)A(ctl_buf))) |
@@ -644,7 +644,7 @@ int timod_getmsg(unsigned int fd, char __user *ctl_buf, int ctl_maxlen, s32 __us | |||
644 | SOLDD(("%u %p %d %p %p %d %p %d\n", fd, ctl_buf, ctl_maxlen, ctl_len, data_buf, data_maxlen, data_len, *flags_p)); | 644 | SOLDD(("%u %p %d %p %p %d %p %d\n", fd, ctl_buf, ctl_maxlen, ctl_len, data_buf, data_maxlen, data_len, *flags_p)); |
645 | fdt = files_fdtable(current->files); | 645 | fdt = files_fdtable(current->files); |
646 | filp = fdt->fd[fd]; | 646 | filp = fdt->fd[fd]; |
647 | ino = filp->f_dentry->d_inode; | 647 | ino = filp->f_path.dentry->d_inode; |
648 | sock = (struct sol_socket_struct *)filp->private_data; | 648 | sock = (struct sol_socket_struct *)filp->private_data; |
649 | SOLDD(("%p %p\n", sock->pfirst, sock->pfirst ? sock->pfirst->next : NULL)); | 649 | SOLDD(("%p %p\n", sock->pfirst, sock->pfirst ? sock->pfirst->next : NULL)); |
650 | if ( ctl_maxlen > 0 && !sock->pfirst && SOCKET_I(ino)->type == SOCK_STREAM | 650 | if ( ctl_maxlen > 0 && !sock->pfirst && SOCKET_I(ino)->type == SOCK_STREAM |
@@ -865,7 +865,7 @@ asmlinkage int solaris_getmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3) | |||
865 | filp = fdt->fd[fd]; | 865 | filp = fdt->fd[fd]; |
866 | if(!filp) goto out; | 866 | if(!filp) goto out; |
867 | 867 | ||
868 | ino = filp->f_dentry->d_inode; | 868 | ino = filp->f_path.dentry->d_inode; |
869 | if (!ino || !S_ISSOCK(ino->i_mode)) | 869 | if (!ino || !S_ISSOCK(ino->i_mode)) |
870 | goto out; | 870 | goto out; |
871 | 871 | ||
@@ -933,7 +933,7 @@ asmlinkage int solaris_putmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3) | |||
933 | filp = fdt->fd[fd]; | 933 | filp = fdt->fd[fd]; |
934 | if(!filp) goto out; | 934 | if(!filp) goto out; |
935 | 935 | ||
936 | ino = filp->f_dentry->d_inode; | 936 | ino = filp->f_path.dentry->d_inode; |
937 | if (!ino) goto out; | 937 | if (!ino) goto out; |
938 | 938 | ||
939 | if (!S_ISSOCK(ino->i_mode) && | 939 | if (!S_ISSOCK(ino->i_mode) && |
diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 5ac1f2963ae3..d32a80e6668c 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig | |||
@@ -47,6 +47,11 @@ config GENERIC_CALIBRATE_DELAY | |||
47 | bool | 47 | bool |
48 | default y | 48 | default y |
49 | 49 | ||
50 | config GENERIC_BUG | ||
51 | bool | ||
52 | default y | ||
53 | depends on BUG | ||
54 | |||
50 | # Used in kernel/irq/manage.c and include/linux/irq.h | 55 | # Used in kernel/irq/manage.c and include/linux/irq.h |
51 | config IRQ_RELEASE_METHOD | 56 | config IRQ_RELEASE_METHOD |
52 | bool | 57 | bool |
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index aa3090d05a8f..83301e1ef67c 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -246,7 +246,7 @@ out_up: | |||
246 | return ret; | 246 | return ret; |
247 | } | 247 | } |
248 | 248 | ||
249 | void line_set_termios(struct tty_struct *tty, struct termios * old) | 249 | void line_set_termios(struct tty_struct *tty, struct ktermios * old) |
250 | { | 250 | { |
251 | /* nothing */ | 251 | /* nothing */ |
252 | } | 252 | } |
diff --git a/arch/um/include/line.h b/arch/um/include/line.h index 214ee76c40df..5f232ae89fbb 100644 --- a/arch/um/include/line.h +++ b/arch/um/include/line.h | |||
@@ -76,7 +76,7 @@ extern int line_setup(struct line *lines, unsigned int sizeof_lines, | |||
76 | extern int line_write(struct tty_struct *tty, const unsigned char *buf, | 76 | extern int line_write(struct tty_struct *tty, const unsigned char *buf, |
77 | int len); | 77 | int len); |
78 | extern void line_put_char(struct tty_struct *tty, unsigned char ch); | 78 | extern void line_put_char(struct tty_struct *tty, unsigned char ch); |
79 | extern void line_set_termios(struct tty_struct *tty, struct termios * old); | 79 | extern void line_set_termios(struct tty_struct *tty, struct ktermios * old); |
80 | extern int line_chars_in_buffer(struct tty_struct *tty); | 80 | extern int line_chars_in_buffer(struct tty_struct *tty); |
81 | extern void line_flush_buffer(struct tty_struct *tty); | 81 | extern void line_flush_buffer(struct tty_struct *tty); |
82 | extern void line_flush_chars(struct tty_struct *tty); | 82 | extern void line_flush_chars(struct tty_struct *tty); |
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index 0561c43b4685..8d56ec6cca79 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c | |||
@@ -39,12 +39,13 @@ static long execve1(char *file, char __user * __user *argv, | |||
39 | char __user *__user *env) | 39 | char __user *__user *env) |
40 | { | 40 | { |
41 | long error; | 41 | long error; |
42 | struct tty_struct *tty; | ||
42 | 43 | ||
43 | #ifdef CONFIG_TTY_LOG | 44 | #ifdef CONFIG_TTY_LOG |
44 | mutex_lock(&tty_mutex); | 45 | mutex_lock(&tty_mutex); |
45 | task_lock(current); /* FIXME: is this needed ? */ | 46 | tty = get_current_tty(); |
46 | log_exec(argv, current->signal->tty); | 47 | if (tty) |
47 | task_unlock(current); | 48 | log_exec(argv, tty); |
48 | mutex_unlock(&tty_mutex); | 49 | mutex_unlock(&tty_mutex); |
49 | #endif | 50 | #endif |
50 | error = do_execve(file, argv, env, ¤t->thread.regs); | 51 | error = do_execve(file, argv, env, ¤t->thread.regs); |
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile index 0e32adf03be1..098720be019a 100644 --- a/arch/um/sys-i386/Makefile +++ b/arch/um/sys-i386/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | obj-y = bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ | 1 | obj-y = bug.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ |
2 | ptrace_user.o setjmp.o signal.o sigcontext.o syscalls.o sysrq.o \ | 2 | ptrace_user.o setjmp.o signal.o sigcontext.o syscalls.o sysrq.o \ |
3 | sys_call_table.o tls.o | 3 | sys_call_table.o tls.o |
4 | 4 | ||
diff --git a/arch/um/sys-i386/bug.c b/arch/um/sys-i386/bug.c new file mode 100644 index 000000000000..200c8ba2879b --- /dev/null +++ b/arch/um/sys-i386/bug.c | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Jeff Dike (jdike@addtoit.com) | ||
3 | * Licensed under the GPL V2 | ||
4 | */ | ||
5 | |||
6 | #include <linux/uaccess.h> | ||
7 | |||
8 | /* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because | ||
9 | * that's not relevent in skas mode. | ||
10 | */ | ||
11 | |||
12 | int is_valid_bugaddr(unsigned long eip) | ||
13 | { | ||
14 | unsigned short ud2; | ||
15 | |||
16 | if (probe_kernel_address((unsigned short __user *)eip, ud2)) | ||
17 | return 0; | ||
18 | |||
19 | return ud2 == 0x0b0f; | ||
20 | } | ||
diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile index f41768b8e25e..4d9e5efa6fb9 100644 --- a/arch/um/sys-x86_64/Makefile +++ b/arch/um/sys-x86_64/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | # Licensed under the GPL | 4 | # Licensed under the GPL |
5 | # | 5 | # |
6 | 6 | ||
7 | obj-y = bugs.o delay.o fault.o ldt.o mem.o ptrace.o ptrace_user.o \ | 7 | obj-y = bug.o bugs.o delay.o fault.o ldt.o mem.o ptrace.o ptrace_user.o \ |
8 | setjmp.o sigcontext.o signal.o syscalls.o syscall_table.o sysrq.o \ | 8 | setjmp.o sigcontext.o signal.o syscalls.o syscall_table.o sysrq.o \ |
9 | ksyms.o tls.o | 9 | ksyms.o tls.o |
10 | 10 | ||
diff --git a/arch/um/sys-x86_64/bug.c b/arch/um/sys-x86_64/bug.c new file mode 100644 index 000000000000..200c8ba2879b --- /dev/null +++ b/arch/um/sys-x86_64/bug.c | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Jeff Dike (jdike@addtoit.com) | ||
3 | * Licensed under the GPL V2 | ||
4 | */ | ||
5 | |||
6 | #include <linux/uaccess.h> | ||
7 | |||
8 | /* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because | ||
9 | * that's not relevent in skas mode. | ||
10 | */ | ||
11 | |||
12 | int is_valid_bugaddr(unsigned long eip) | ||
13 | { | ||
14 | unsigned short ud2; | ||
15 | |||
16 | if (probe_kernel_address((unsigned short __user *)eip, ud2)) | ||
17 | return 0; | ||
18 | |||
19 | return ud2 == 0x0b0f; | ||
20 | } | ||
diff --git a/arch/v850/Kconfig b/arch/v850/Kconfig index 37ec644603ab..bcf825875d17 100644 --- a/arch/v850/Kconfig +++ b/arch/v850/Kconfig | |||
@@ -38,6 +38,14 @@ config TIME_LOW_RES | |||
38 | bool | 38 | bool |
39 | default y | 39 | default y |
40 | 40 | ||
41 | config ARCH_HAS_ILOG2_U32 | ||
42 | bool | ||
43 | default n | ||
44 | |||
45 | config ARCH_HAS_ILOG2_U64 | ||
46 | bool | ||
47 | default n | ||
48 | |||
41 | # Turn off some random 386 crap that can affect device config | 49 | # Turn off some random 386 crap that can affect device config |
42 | config ISA | 50 | config ISA |
43 | bool | 51 | bool |
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index bfbb9bcae123..d4275537b25b 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -96,6 +96,19 @@ config AUDIT_ARCH | |||
96 | bool | 96 | bool |
97 | default y | 97 | default y |
98 | 98 | ||
99 | config GENERIC_BUG | ||
100 | bool | ||
101 | default y | ||
102 | depends on BUG | ||
103 | |||
104 | config ARCH_HAS_ILOG2_U32 | ||
105 | bool | ||
106 | default n | ||
107 | |||
108 | config ARCH_HAS_ILOG2_U64 | ||
109 | bool | ||
110 | default n | ||
111 | |||
99 | source "init/Kconfig" | 112 | source "init/Kconfig" |
100 | 113 | ||
101 | 114 | ||
@@ -571,7 +584,7 @@ config SECCOMP | |||
571 | If unsure, say Y. Only embedded should say N here. | 584 | If unsure, say Y. Only embedded should say N here. |
572 | 585 | ||
573 | config CC_STACKPROTECTOR | 586 | config CC_STACKPROTECTOR |
574 | bool "Enable -fstack-protector buffer overflow detection (EXPRIMENTAL)" | 587 | bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)" |
575 | depends on EXPERIMENTAL | 588 | depends on EXPERIMENTAL |
576 | help | 589 | help |
577 | This option turns on the -fstack-protector GCC feature. This | 590 | This option turns on the -fstack-protector GCC feature. This |
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index 96f226cfb339..1a1c6a1a299b 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/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.19-git7 | 3 | # Linux kernel version: 2.6.19-git14 |
4 | # Wed Dec 6 23:50:47 2006 | 4 | # Sat Dec 9 21:23:09 2006 |
5 | # | 5 | # |
6 | CONFIG_X86_64=y | 6 | CONFIG_X86_64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -22,6 +22,9 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y | |||
22 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 22 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
23 | CONFIG_DMI=y | 23 | CONFIG_DMI=y |
24 | CONFIG_AUDIT_ARCH=y | 24 | CONFIG_AUDIT_ARCH=y |
25 | CONFIG_GENERIC_BUG=y | ||
26 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
27 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
25 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
26 | 29 | ||
27 | # | 30 | # |
@@ -170,6 +173,7 @@ CONFIG_SECCOMP=y | |||
170 | # CONFIG_CC_STACKPROTECTOR is not set | 173 | # CONFIG_CC_STACKPROTECTOR is not set |
171 | # CONFIG_HZ_100 is not set | 174 | # CONFIG_HZ_100 is not set |
172 | CONFIG_HZ_250=y | 175 | CONFIG_HZ_250=y |
176 | # CONFIG_HZ_300 is not set | ||
173 | # CONFIG_HZ_1000 is not set | 177 | # CONFIG_HZ_1000 is not set |
174 | CONFIG_HZ=250 | 178 | CONFIG_HZ=250 |
175 | # CONFIG_REORDER is not set | 179 | # CONFIG_REORDER is not set |
@@ -514,6 +518,7 @@ CONFIG_IDEDMA_AUTO=y | |||
514 | # | 518 | # |
515 | # CONFIG_RAID_ATTRS is not set | 519 | # CONFIG_RAID_ATTRS is not set |
516 | CONFIG_SCSI=y | 520 | CONFIG_SCSI=y |
521 | # CONFIG_SCSI_TGT is not set | ||
517 | CONFIG_SCSI_NETLINK=y | 522 | CONFIG_SCSI_NETLINK=y |
518 | # CONFIG_SCSI_PROC_FS is not set | 523 | # CONFIG_SCSI_PROC_FS is not set |
519 | 524 | ||
@@ -534,6 +539,7 @@ CONFIG_CHR_DEV_SG=y | |||
534 | # CONFIG_SCSI_MULTI_LUN is not set | 539 | # CONFIG_SCSI_MULTI_LUN is not set |
535 | CONFIG_SCSI_CONSTANTS=y | 540 | CONFIG_SCSI_CONSTANTS=y |
536 | # CONFIG_SCSI_LOGGING is not set | 541 | # CONFIG_SCSI_LOGGING is not set |
542 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
537 | 543 | ||
538 | # | 544 | # |
539 | # SCSI Transports | 545 | # SCSI Transports |
@@ -587,6 +593,7 @@ CONFIG_MEGARAID_SAS=y | |||
587 | # CONFIG_SCSI_DC395x is not set | 593 | # CONFIG_SCSI_DC395x is not set |
588 | # CONFIG_SCSI_DC390T is not set | 594 | # CONFIG_SCSI_DC390T is not set |
589 | # CONFIG_SCSI_DEBUG is not set | 595 | # CONFIG_SCSI_DEBUG is not set |
596 | # CONFIG_SCSI_SRP is not set | ||
590 | 597 | ||
591 | # | 598 | # |
592 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | 599 | # Serial ATA (prod) and Parallel ATA (experimental) drivers |
@@ -1106,10 +1113,7 @@ CONFIG_SOUND=y | |||
1106 | # Open Sound System | 1113 | # Open Sound System |
1107 | # | 1114 | # |
1108 | CONFIG_SOUND_PRIME=y | 1115 | CONFIG_SOUND_PRIME=y |
1109 | CONFIG_OSS_OBSOLETE_DRIVER=y | ||
1110 | # CONFIG_SOUND_BT878 is not set | 1116 | # CONFIG_SOUND_BT878 is not set |
1111 | # CONFIG_SOUND_EMU10K1 is not set | ||
1112 | # CONFIG_SOUND_FUSION is not set | ||
1113 | # CONFIG_SOUND_ES1371 is not set | 1117 | # CONFIG_SOUND_ES1371 is not set |
1114 | CONFIG_SOUND_ICH=y | 1118 | CONFIG_SOUND_ICH=y |
1115 | # CONFIG_SOUND_TRIDENT is not set | 1119 | # CONFIG_SOUND_TRIDENT is not set |
@@ -1119,6 +1123,11 @@ CONFIG_SOUND_ICH=y | |||
1119 | # CONFIG_SOUND_OSS is not set | 1123 | # CONFIG_SOUND_OSS is not set |
1120 | 1124 | ||
1121 | # | 1125 | # |
1126 | # HID Devices | ||
1127 | # | ||
1128 | CONFIG_HID=y | ||
1129 | |||
1130 | # | ||
1122 | # USB support | 1131 | # USB support |
1123 | # | 1132 | # |
1124 | CONFIG_USB_ARCH_HAS_HCD=y | 1133 | CONFIG_USB_ARCH_HAS_HCD=y |
@@ -1182,8 +1191,7 @@ CONFIG_USB_STORAGE=y | |||
1182 | # USB Input Devices | 1191 | # USB Input Devices |
1183 | # | 1192 | # |
1184 | CONFIG_USB_HID=y | 1193 | CONFIG_USB_HID=y |
1185 | CONFIG_USB_HIDINPUT=y | 1194 | # CONFIG_USB_HID_POWERBOOK is not set |
1186 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | ||
1187 | # CONFIG_HID_FF is not set | 1195 | # CONFIG_HID_FF is not set |
1188 | # CONFIG_USB_HIDDEV is not set | 1196 | # CONFIG_USB_HIDDEV is not set |
1189 | # CONFIG_USB_AIPTEK is not set | 1197 | # CONFIG_USB_AIPTEK is not set |
@@ -1475,6 +1483,11 @@ CONFIG_NLS_ISO8859_15=y | |||
1475 | CONFIG_NLS_UTF8=y | 1483 | CONFIG_NLS_UTF8=y |
1476 | 1484 | ||
1477 | # | 1485 | # |
1486 | # Distributed Lock Manager | ||
1487 | # | ||
1488 | # CONFIG_DLM is not set | ||
1489 | |||
1490 | # | ||
1478 | # Instrumentation Support | 1491 | # Instrumentation Support |
1479 | # | 1492 | # |
1480 | CONFIG_PROFILING=y | 1493 | CONFIG_PROFILING=y |
@@ -1504,6 +1517,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1504 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1517 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1505 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1518 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1506 | # CONFIG_DEBUG_KOBJECT is not set | 1519 | # CONFIG_DEBUG_KOBJECT is not set |
1520 | CONFIG_DEBUG_BUGVERBOSE=y | ||
1507 | # CONFIG_DEBUG_INFO is not set | 1521 | # CONFIG_DEBUG_INFO is not set |
1508 | CONFIG_DEBUG_FS=y | 1522 | CONFIG_DEBUG_FS=y |
1509 | # CONFIG_DEBUG_VM is not set | 1523 | # CONFIG_DEBUG_VM is not set |
@@ -1534,6 +1548,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y | |||
1534 | # | 1548 | # |
1535 | # Library routines | 1549 | # Library routines |
1536 | # | 1550 | # |
1551 | CONFIG_BITREVERSE=y | ||
1537 | # CONFIG_CRC_CCITT is not set | 1552 | # CONFIG_CRC_CCITT is not set |
1538 | # CONFIG_CRC16 is not set | 1553 | # CONFIG_CRC16 is not set |
1539 | CONFIG_CRC32=y | 1554 | CONFIG_CRC32=y |
diff --git a/arch/x86_64/ia32/ia32_aout.c b/arch/x86_64/ia32/ia32_aout.c index 396d3c100011..be87df506f39 100644 --- a/arch/x86_64/ia32/ia32_aout.c +++ b/arch/x86_64/ia32/ia32_aout.c | |||
@@ -272,7 +272,7 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs) | |||
272 | if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC && | 272 | if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC && |
273 | N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) || | 273 | N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) || |
274 | N_TRSIZE(ex) || N_DRSIZE(ex) || | 274 | N_TRSIZE(ex) || N_DRSIZE(ex) || |
275 | i_size_read(bprm->file->f_dentry->d_inode) < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { | 275 | i_size_read(bprm->file->f_path.dentry->d_inode) < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { |
276 | return -ENOEXEC; | 276 | return -ENOEXEC; |
277 | } | 277 | } |
278 | 278 | ||
@@ -357,7 +357,7 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs) | |||
357 | { | 357 | { |
358 | printk(KERN_WARNING | 358 | printk(KERN_WARNING |
359 | "fd_offset is not page aligned. Please convert program: %s\n", | 359 | "fd_offset is not page aligned. Please convert program: %s\n", |
360 | bprm->file->f_dentry->d_name.name); | 360 | bprm->file->f_path.dentry->d_name.name); |
361 | error_time = jiffies; | 361 | error_time = jiffies; |
362 | } | 362 | } |
363 | #endif | 363 | #endif |
@@ -440,7 +440,7 @@ static int load_aout_library(struct file *file) | |||
440 | int retval; | 440 | int retval; |
441 | struct exec ex; | 441 | struct exec ex; |
442 | 442 | ||
443 | inode = file->f_dentry->d_inode; | 443 | inode = file->f_path.dentry->d_inode; |
444 | 444 | ||
445 | retval = -ENOEXEC; | 445 | retval = -ENOEXEC; |
446 | error = kernel_read(file, 0, (char *) &ex, sizeof(ex)); | 446 | error = kernel_read(file, 0, (char *) &ex, sizeof(ex)); |
@@ -471,7 +471,7 @@ static int load_aout_library(struct file *file) | |||
471 | { | 471 | { |
472 | printk(KERN_WARNING | 472 | printk(KERN_WARNING |
473 | "N_TXTOFF is not page aligned. Please convert library: %s\n", | 473 | "N_TXTOFF is not page aligned. Please convert library: %s\n", |
474 | file->f_dentry->d_name.name); | 474 | file->f_path.dentry->d_name.name); |
475 | error_time = jiffies; | 475 | error_time = jiffies; |
476 | } | 476 | } |
477 | #endif | 477 | #endif |
diff --git a/arch/x86_64/kernel/module.c b/arch/x86_64/kernel/module.c index 9d0958ff547f..a888e67f5874 100644 --- a/arch/x86_64/kernel/module.c +++ b/arch/x86_64/kernel/module.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/bug.h> | ||
26 | 27 | ||
27 | #include <asm/system.h> | 28 | #include <asm/system.h> |
28 | #include <asm/page.h> | 29 | #include <asm/page.h> |
@@ -173,10 +174,12 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
173 | lseg, lseg + locks->sh_size, | 174 | lseg, lseg + locks->sh_size, |
174 | tseg, tseg + text->sh_size); | 175 | tseg, tseg + text->sh_size); |
175 | } | 176 | } |
176 | return 0; | 177 | |
178 | return module_bug_finalize(hdr, sechdrs, me); | ||
177 | } | 179 | } |
178 | 180 | ||
179 | void module_arch_cleanup(struct module *mod) | 181 | void module_arch_cleanup(struct module *mod) |
180 | { | 182 | { |
181 | alternatives_smp_module_del(mod); | 183 | alternatives_smp_module_del(mod); |
184 | module_bug_cleanup(mod); | ||
182 | } | 185 | } |
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 27e95e7922c1..186aebbae32d 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -193,6 +193,8 @@ void nmi_watchdog_default(void) | |||
193 | nmi_watchdog = NMI_IO_APIC; | 193 | nmi_watchdog = NMI_IO_APIC; |
194 | } | 194 | } |
195 | 195 | ||
196 | static int endflag __initdata = 0; | ||
197 | |||
196 | #ifdef CONFIG_SMP | 198 | #ifdef CONFIG_SMP |
197 | /* The performance counters used by NMI_LOCAL_APIC don't trigger when | 199 | /* The performance counters used by NMI_LOCAL_APIC don't trigger when |
198 | * the CPU is idle. To make sure the NMI watchdog really ticks on all | 200 | * the CPU is idle. To make sure the NMI watchdog really ticks on all |
@@ -200,7 +202,6 @@ void nmi_watchdog_default(void) | |||
200 | */ | 202 | */ |
201 | static __init void nmi_cpu_busy(void *data) | 203 | static __init void nmi_cpu_busy(void *data) |
202 | { | 204 | { |
203 | volatile int *endflag = data; | ||
204 | local_irq_enable_in_hardirq(); | 205 | local_irq_enable_in_hardirq(); |
205 | /* Intentionally don't use cpu_relax here. This is | 206 | /* Intentionally don't use cpu_relax here. This is |
206 | to make sure that the performance counter really ticks, | 207 | to make sure that the performance counter really ticks, |
@@ -208,14 +209,13 @@ static __init void nmi_cpu_busy(void *data) | |||
208 | pause instruction. On a real HT machine this is fine because | 209 | pause instruction. On a real HT machine this is fine because |
209 | all other CPUs are busy with "useless" delay loops and don't | 210 | all other CPUs are busy with "useless" delay loops and don't |
210 | care if they get somewhat less cycles. */ | 211 | care if they get somewhat less cycles. */ |
211 | while (*endflag == 0) | 212 | while (endflag == 0) |
212 | barrier(); | 213 | mb(); |
213 | } | 214 | } |
214 | #endif | 215 | #endif |
215 | 216 | ||
216 | int __init check_nmi_watchdog (void) | 217 | int __init check_nmi_watchdog (void) |
217 | { | 218 | { |
218 | volatile int endflag = 0; | ||
219 | int *counts; | 219 | int *counts; |
220 | int cpu; | 220 | int cpu; |
221 | 221 | ||
@@ -256,6 +256,7 @@ int __init check_nmi_watchdog (void) | |||
256 | if (!atomic_read(&nmi_active)) { | 256 | if (!atomic_read(&nmi_active)) { |
257 | kfree(counts); | 257 | kfree(counts); |
258 | atomic_set(&nmi_active, -1); | 258 | atomic_set(&nmi_active, -1); |
259 | endflag = 1; | ||
259 | return -1; | 260 | return -1; |
260 | } | 261 | } |
261 | endflag = 1; | 262 | endflag = 1; |
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index a1641ffdffcf..b54ccc07f379 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/kexec.h> | 31 | #include <linux/kexec.h> |
32 | #include <linux/unwind.h> | 32 | #include <linux/unwind.h> |
33 | #include <linux/uaccess.h> | 33 | #include <linux/uaccess.h> |
34 | #include <linux/bug.h> | ||
34 | 35 | ||
35 | #include <asm/system.h> | 36 | #include <asm/system.h> |
36 | #include <asm/io.h> | 37 | #include <asm/io.h> |
@@ -524,30 +525,15 @@ bad: | |||
524 | printk("\n"); | 525 | printk("\n"); |
525 | } | 526 | } |
526 | 527 | ||
527 | void handle_BUG(struct pt_regs *regs) | 528 | int is_valid_bugaddr(unsigned long rip) |
528 | { | 529 | { |
529 | struct bug_frame f; | 530 | unsigned short ud2; |
530 | long len; | ||
531 | const char *prefix = ""; | ||
532 | 531 | ||
533 | if (user_mode(regs)) | 532 | if (__copy_from_user(&ud2, (const void __user *) rip, sizeof(ud2))) |
534 | return; | 533 | return 0; |
535 | if (__copy_from_user(&f, (const void __user *) regs->rip, | 534 | |
536 | sizeof(struct bug_frame))) | 535 | return ud2 == 0x0b0f; |
537 | return; | 536 | } |
538 | if (f.filename >= 0 || | ||
539 | f.ud2[0] != 0x0f || f.ud2[1] != 0x0b) | ||
540 | return; | ||
541 | len = __strnlen_user((char *)(long)f.filename, PATH_MAX) - 1; | ||
542 | if (len < 0 || len >= PATH_MAX) | ||
543 | f.filename = (int)(long)"unmapped filename"; | ||
544 | else if (len > 50) { | ||
545 | f.filename += len - 50; | ||
546 | prefix = "..."; | ||
547 | } | ||
548 | printk("----------- [cut here ] --------- [please bite here ] ---------\n"); | ||
549 | printk(KERN_ALERT "Kernel BUG at %s%.50s:%d\n", prefix, (char *)(long)f.filename, f.line); | ||
550 | } | ||
551 | 537 | ||
552 | #ifdef CONFIG_BUG | 538 | #ifdef CONFIG_BUG |
553 | void out_of_line_bug(void) | 539 | void out_of_line_bug(void) |
@@ -627,7 +613,9 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
627 | { | 613 | { |
628 | unsigned long flags = oops_begin(); | 614 | unsigned long flags = oops_begin(); |
629 | 615 | ||
630 | handle_BUG(regs); | 616 | if (!user_mode(regs)) |
617 | report_bug(regs->rip); | ||
618 | |||
631 | __die(str, regs, err); | 619 | __die(str, regs, err); |
632 | oops_end(flags); | 620 | oops_end(flags); |
633 | do_exit(SIGSEGV); | 621 | do_exit(SIGSEGV); |
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S index 6a1f8f491e5d..514be5dd2303 100644 --- a/arch/x86_64/kernel/vmlinux.lds.S +++ b/arch/x86_64/kernel/vmlinux.lds.S | |||
@@ -13,6 +13,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") | |||
13 | OUTPUT_ARCH(i386:x86-64) | 13 | OUTPUT_ARCH(i386:x86-64) |
14 | ENTRY(phys_startup_64) | 14 | ENTRY(phys_startup_64) |
15 | jiffies_64 = jiffies; | 15 | jiffies_64 = jiffies; |
16 | _proxy_pda = 0; | ||
16 | PHDRS { | 17 | PHDRS { |
17 | text PT_LOAD FLAGS(5); /* R_E */ | 18 | text PT_LOAD FLAGS(5); /* R_E */ |
18 | data PT_LOAD FLAGS(7); /* RWE */ | 19 | data PT_LOAD FLAGS(7); /* RWE */ |
@@ -51,6 +52,8 @@ SECTIONS | |||
51 | 52 | ||
52 | RODATA | 53 | RODATA |
53 | 54 | ||
55 | BUG_TABLE | ||
56 | |||
54 | . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */ | 57 | . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */ |
55 | /* Data */ | 58 | /* Data */ |
56 | .data : AT(ADDR(.data) - LOAD_OFFSET) { | 59 | .data : AT(ADDR(.data) - LOAD_OFFSET) { |
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index 4a673f5397a0..2433d6fc68b1 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c | |||
@@ -225,8 +225,7 @@ out: | |||
225 | 225 | ||
226 | static int vsyscall_sysctl_nostrat(ctl_table *t, int __user *name, int nlen, | 226 | static int vsyscall_sysctl_nostrat(ctl_table *t, int __user *name, int nlen, |
227 | void __user *oldval, size_t __user *oldlenp, | 227 | void __user *oldval, size_t __user *oldlenp, |
228 | void __user *newval, size_t newlen, | 228 | void __user *newval, size_t newlen) |
229 | void **context) | ||
230 | { | 229 | { |
231 | return -ENOSYS; | 230 | return -ENOSYS; |
232 | } | 231 | } |
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index c1e69a1f92a4..2e74cb0b7807 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
@@ -34,31 +34,24 @@ config GENERIC_HARDIRQS | |||
34 | bool | 34 | bool |
35 | default y | 35 | default y |
36 | 36 | ||
37 | config ARCH_HAS_ILOG2_U32 | ||
38 | bool | ||
39 | default n | ||
40 | |||
41 | config ARCH_HAS_ILOG2_U64 | ||
42 | bool | ||
43 | default n | ||
44 | |||
37 | source "init/Kconfig" | 45 | source "init/Kconfig" |
38 | 46 | ||
39 | menu "Processor type and features" | 47 | menu "Processor type and features" |
40 | 48 | ||
41 | choice | 49 | choice |
42 | prompt "Xtensa Processor Configuration" | 50 | prompt "Xtensa Processor Configuration" |
43 | default XTENSA_CPU_LINUX_BE | 51 | default XTENSA_VARIANT_FSF |
44 | 52 | ||
45 | config XTENSA_CPU_LINUX_BE | 53 | config XTENSA_VARIANT_FSF |
46 | bool "linux_be" | 54 | bool "fsf" |
47 | ---help--- | ||
48 | The linux_be processor configuration is the baseline Xtensa | ||
49 | configurations included in this kernel and also used by | ||
50 | binutils, gcc, and gdb. It contains no TIE, no coprocessors, | ||
51 | and the following configuration options: | ||
52 | |||
53 | Code Density Option 2 Misc Special Registers | ||
54 | NSA/NSAU Instructions 128-bit Data Bus Width | ||
55 | Processor ID 8K, 2-way I and D Caches | ||
56 | Zero-Overhead Loops 2 Inst Address Break Registers | ||
57 | Big Endian 2 Data Address Break Registers | ||
58 | 64 General-Purpose Registers JTAG Interface and Trace Port | ||
59 | 17 Interrupts MMU w/ TLBs and Autorefill | ||
60 | 3 Interrupt Levels 8 Autorefill Ways (I/D TLBs) | ||
61 | 3 Timers Unaligned Exceptions | ||
62 | endchoice | 55 | endchoice |
63 | 56 | ||
64 | config MMU | 57 | config MMU |
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 3a3a4c66ef87..95f836db38fa 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile | |||
@@ -11,13 +11,13 @@ | |||
11 | # this architecture | 11 | # this architecture |
12 | 12 | ||
13 | # Core configuration. | 13 | # Core configuration. |
14 | # (Use CPU=<xtensa_config> to use another default compiler.) | 14 | # (Use VAR=<xtensa_config> to use another default compiler.) |
15 | 15 | ||
16 | cpu-$(CONFIG_XTENSA_CPU_LINUX_BE) := linux_be | 16 | variant-$(CONFIG_XTENSA_VARIANT_FSF) := fsf |
17 | cpu-$(CONFIG_XTENSA_CPU_LINUX_CUSTOM) := linux_custom | 17 | variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom |
18 | 18 | ||
19 | CPU = $(cpu-y) | 19 | VARIANT = $(variant-y) |
20 | export CPU | 20 | export VARIANT |
21 | 21 | ||
22 | # Platform configuration | 22 | # Platform configuration |
23 | 23 | ||
@@ -27,8 +27,6 @@ platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss | |||
27 | PLATFORM = $(platform-y) | 27 | PLATFORM = $(platform-y) |
28 | export PLATFORM | 28 | export PLATFORM |
29 | 29 | ||
30 | CPPFLAGS += $(if $(KBUILD_SRC),-I$(srctree)/include/asm-xtensa/) | ||
31 | CPPFLAGS += -Iinclude/asm | ||
32 | CFLAGS += -pipe -mlongcalls | 30 | CFLAGS += -pipe -mlongcalls |
33 | 31 | ||
34 | KBUILD_DEFCONFIG := iss_defconfig | 32 | KBUILD_DEFCONFIG := iss_defconfig |
@@ -41,12 +39,12 @@ core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/ | |||
41 | 39 | ||
42 | # Test for cross compiling | 40 | # Test for cross compiling |
43 | 41 | ||
44 | ifneq ($(CPU),) | 42 | ifneq ($(VARIANT),) |
45 | COMPILE_ARCH = $(shell uname -m) | 43 | COMPILE_ARCH = $(shell uname -m) |
46 | 44 | ||
47 | ifneq ($(COMPILE_ARCH), xtensa) | 45 | ifneq ($(COMPILE_ARCH), xtensa) |
48 | ifndef CROSS_COMPILE | 46 | ifndef CROSS_COMPILE |
49 | CROSS_COMPILE = xtensa_$(CPU)- | 47 | CROSS_COMPILE = xtensa_$(VARIANT)- |
50 | endif | 48 | endif |
51 | endif | 49 | endif |
52 | endif | 50 | endif |
@@ -68,14 +66,13 @@ archinc := include/asm-xtensa | |||
68 | 66 | ||
69 | archprepare: $(archinc)/.platform | 67 | archprepare: $(archinc)/.platform |
70 | 68 | ||
71 | # Update machine cpu and platform symlinks if something which affects | 69 | # Update processor variant and platform symlinks if something which affects |
72 | # them changed. | 70 | # them changed. |
73 | 71 | ||
74 | $(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf | 72 | $(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf |
75 | @echo ' SYMLINK $(archinc)/xtensa/config -> $(archinc)/xtensa/config-$(CPU)' | 73 | @echo ' SYMLINK $(archinc)/variant -> $(archinc)/variant-$(VARIANT)' |
76 | $(Q)mkdir -p $(archinc) | 74 | $(Q)mkdir -p $(archinc) |
77 | $(Q)mkdir -p $(archinc)/xtensa | 75 | $(Q)ln -fsn $(srctree)/$(archinc)/variant-$(VARIANT) $(archinc)/variant |
78 | $(Q)ln -fsn $(srctree)/$(archinc)/xtensa/config-$(CPU) $(archinc)/xtensa/config | ||
79 | @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)' | 76 | @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)' |
80 | $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform | 77 | $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform |
81 | @touch $@ | 78 | @touch $@ |
@@ -89,7 +86,7 @@ zImage zImage.initrd: vmlinux | |||
89 | $(Q)$(MAKE) $(build)=$(boot) $@ | 86 | $(Q)$(MAKE) $(build)=$(boot) $@ |
90 | 87 | ||
91 | CLEAN_FILES += arch/xtensa/vmlinux.lds \ | 88 | CLEAN_FILES += arch/xtensa/vmlinux.lds \ |
92 | $(archinc)/platform $(archinc)/xtensa/config \ | 89 | $(archinc)/platform $(archinc)/variant \ |
93 | $(archinc)/.platform | 90 | $(archinc)/.platform |
94 | 91 | ||
95 | define archhelp | 92 | define archhelp |
diff --git a/arch/xtensa/boot/boot-elf/bootstrap.S b/arch/xtensa/boot/boot-elf/bootstrap.S index f857fc760aa8..464298bc348b 100644 --- a/arch/xtensa/boot/boot-elf/bootstrap.S +++ b/arch/xtensa/boot/boot-elf/bootstrap.S | |||
@@ -1,7 +1,4 @@ | |||
1 | 1 | ||
2 | #include <xtensa/config/specreg.h> | ||
3 | #include <xtensa/config/core.h> | ||
4 | |||
5 | #include <asm/bootparam.h> | 2 | #include <asm/bootparam.h> |
6 | 3 | ||
7 | 4 | ||
diff --git a/arch/xtensa/boot/boot-redboot/bootstrap.S b/arch/xtensa/boot/boot-redboot/bootstrap.S index ee636b0da81c..84848123e2a8 100644 --- a/arch/xtensa/boot/boot-redboot/bootstrap.S +++ b/arch/xtensa/boot/boot-redboot/bootstrap.S | |||
@@ -1,9 +1,7 @@ | |||
1 | 1 | #include <asm/variant/core.h> | |
2 | #define _ASMLANGUAGE | 2 | #include <asm/regs.h> |
3 | #include <xtensa/config/specreg.h> | 3 | #include <asm/asmmacro.h> |
4 | #include <xtensa/config/core.h> | 4 | #include <asm/cacheasm.h> |
5 | #include <xtensa/cacheasm.h> | ||
6 | |||
7 | /* | 5 | /* |
8 | * RB-Data: RedBoot data/bss | 6 | * RB-Data: RedBoot data/bss |
9 | * P: Boot-Parameters | 7 | * P: Boot-Parameters |
@@ -77,8 +75,14 @@ _start: | |||
77 | /* Note: The assembler cannot relax "addi a0, a0, ..." to an | 75 | /* Note: The assembler cannot relax "addi a0, a0, ..." to an |
78 | l32r, so we load to a4 first. */ | 76 | l32r, so we load to a4 first. */ |
79 | 77 | ||
80 | addi a4, a0, __start - __start_a0 | 78 | # addi a4, a0, __start - __start_a0 |
81 | mov a0, a4 | 79 | # mov a0, a4 |
80 | |||
81 | movi a4, __start | ||
82 | movi a5, __start_a0 | ||
83 | add a4, a0, a4 | ||
84 | sub a0, a4, a5 | ||
85 | |||
82 | movi a4, __start | 86 | movi a4, __start |
83 | movi a5, __reloc_end | 87 | movi a5, __reloc_end |
84 | 88 | ||
@@ -106,9 +110,13 @@ _start: | |||
106 | /* We have to flush and invalidate the caches here before we jump. */ | 110 | /* We have to flush and invalidate the caches here before we jump. */ |
107 | 111 | ||
108 | #if XCHAL_DCACHE_IS_WRITEBACK | 112 | #if XCHAL_DCACHE_IS_WRITEBACK |
109 | dcache_writeback_all a5, a6 | 113 | |
114 | ___flush_dcache_all a5 a6 | ||
115 | |||
110 | #endif | 116 | #endif |
111 | icache_invalidate_all a5, a6 | 117 | |
118 | ___invalidate_icache_all a5 a6 | ||
119 | isync | ||
112 | 120 | ||
113 | movi a11, _reloc | 121 | movi a11, _reloc |
114 | jx a11 | 122 | jx a11 |
@@ -209,9 +217,14 @@ _reloc: | |||
209 | /* jump to the kernel */ | 217 | /* jump to the kernel */ |
210 | 2: | 218 | 2: |
211 | #if XCHAL_DCACHE_IS_WRITEBACK | 219 | #if XCHAL_DCACHE_IS_WRITEBACK |
212 | dcache_writeback_all a5, a6 | 220 | |
221 | ___flush_dcache_all a5 a6 | ||
222 | |||
213 | #endif | 223 | #endif |
214 | icache_invalidate_all a5, a6 | 224 | |
225 | ___invalidate_icache_all a5 a6 | ||
226 | |||
227 | isync | ||
215 | 228 | ||
216 | movi a5, __start | 229 | movi a5, __start |
217 | movi a3, boot_initrd_start | 230 | movi a3, boot_initrd_start |
diff --git a/arch/xtensa/configs/iss_defconfig b/arch/xtensa/configs/iss_defconfig index 802621dd4867..f19854035e61 100644 --- a/arch/xtensa/configs/iss_defconfig +++ b/arch/xtensa/configs/iss_defconfig | |||
@@ -53,11 +53,7 @@ CONFIG_CC_ALIGN_JUMPS=0 | |||
53 | # | 53 | # |
54 | # Processor type and features | 54 | # Processor type and features |
55 | # | 55 | # |
56 | CONFIG_XTENSA_ARCH_LINUX_BE=y | 56 | CONFIG_XTENSA_VARIANT_FSF=y |
57 | # CONFIG_XTENSA_ARCH_LINUX_LE is not set | ||
58 | # CONFIG_XTENSA_ARCH_LINUX_TEST is not set | ||
59 | # CONFIG_XTENSA_ARCH_S5 is not set | ||
60 | # CONFIG_XTENSA_CUSTOM is not set | ||
61 | CONFIG_MMU=y | 57 | CONFIG_MMU=y |
62 | # CONFIG_XTENSA_UNALIGNED_USER is not set | 58 | # CONFIG_XTENSA_UNALIGNED_USER is not set |
63 | # CONFIG_PREEMPT is not set | 59 | # CONFIG_PREEMPT is not set |
diff --git a/arch/xtensa/kernel/align.S b/arch/xtensa/kernel/align.S index a4956578a24d..33d6e9d2e83c 100644 --- a/arch/xtensa/kernel/align.S +++ b/arch/xtensa/kernel/align.S | |||
@@ -16,14 +16,9 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/linkage.h> | 18 | #include <linux/linkage.h> |
19 | #include <asm/ptrace.h> | ||
20 | #include <asm/ptrace.h> | ||
21 | #include <asm/current.h> | 19 | #include <asm/current.h> |
22 | #include <asm/asm-offsets.h> | 20 | #include <asm/asm-offsets.h> |
23 | #include <asm/pgtable.h> | ||
24 | #include <asm/processor.h> | 21 | #include <asm/processor.h> |
25 | #include <asm/page.h> | ||
26 | #include <asm/thread_info.h> | ||
27 | 22 | ||
28 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION | 23 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION |
29 | 24 | ||
@@ -216,7 +211,7 @@ ENTRY(fast_unaligned) | |||
216 | 211 | ||
217 | extui a5, a4, INSN_OP0, 4 # get insn.op0 nibble | 212 | extui a5, a4, INSN_OP0, 4 # get insn.op0 nibble |
218 | 213 | ||
219 | #if XCHAL_HAVE_NARROW | 214 | #if XCHAL_HAVE_DENSITY |
220 | _beqi a5, OP0_L32I_N, .Lload # L32I.N, jump | 215 | _beqi a5, OP0_L32I_N, .Lload # L32I.N, jump |
221 | addi a6, a5, -OP0_S32I_N | 216 | addi a6, a5, -OP0_S32I_N |
222 | _beqz a6, .Lstore # S32I.N, do a store | 217 | _beqz a6, .Lstore # S32I.N, do a store |
@@ -251,7 +246,7 @@ ENTRY(fast_unaligned) | |||
251 | #endif | 246 | #endif |
252 | __src_b a3, a5, a6 # a3 has the data word | 247 | __src_b a3, a5, a6 # a3 has the data word |
253 | 248 | ||
254 | #if XCHAL_HAVE_NARROW | 249 | #if XCHAL_HAVE_DENSITY |
255 | addi a7, a7, 2 # increment PC (assume 16-bit insn) | 250 | addi a7, a7, 2 # increment PC (assume 16-bit insn) |
256 | 251 | ||
257 | extui a5, a4, INSN_OP0, 4 | 252 | extui a5, a4, INSN_OP0, 4 |
@@ -279,14 +274,14 @@ ENTRY(fast_unaligned) | |||
279 | 274 | ||
280 | 1: | 275 | 1: |
281 | 276 | ||
282 | #if XCHAL_HAVE_LOOP | 277 | #if XCHAL_HAVE_LOOPS |
283 | rsr a3, LEND # check if we reached LEND | 278 | rsr a5, LEND # check if we reached LEND |
284 | bne a7, a3, 1f | 279 | bne a7, a5, 1f |
285 | rsr a3, LCOUNT # and LCOUNT != 0 | 280 | rsr a5, LCOUNT # and LCOUNT != 0 |
286 | beqz a3, 1f | 281 | beqz a5, 1f |
287 | addi a3, a3, -1 # decrement LCOUNT and set | 282 | addi a5, a5, -1 # decrement LCOUNT and set |
288 | rsr a7, LBEG # set PC to LBEGIN | 283 | rsr a7, LBEG # set PC to LBEGIN |
289 | wsr a3, LCOUNT | 284 | wsr a5, LCOUNT |
290 | #endif | 285 | #endif |
291 | 286 | ||
292 | 1: wsr a7, EPC_1 # skip load instruction | 287 | 1: wsr a7, EPC_1 # skip load instruction |
@@ -336,7 +331,7 @@ ENTRY(fast_unaligned) | |||
336 | 331 | ||
337 | movi a6, 0 # mask: ffffffff:00000000 | 332 | movi a6, 0 # mask: ffffffff:00000000 |
338 | 333 | ||
339 | #if XCHAL_HAVE_NARROW | 334 | #if XCHAL_HAVE_DENSITY |
340 | addi a7, a7, 2 # incr. PC,assume 16-bit instruction | 335 | addi a7, a7, 2 # incr. PC,assume 16-bit instruction |
341 | 336 | ||
342 | extui a5, a4, INSN_OP0, 4 # extract OP0 | 337 | extui a5, a4, INSN_OP0, 4 # extract OP0 |
@@ -359,14 +354,14 @@ ENTRY(fast_unaligned) | |||
359 | /* Get memory address */ | 354 | /* Get memory address */ |
360 | 355 | ||
361 | 1: | 356 | 1: |
362 | #if XCHAL_HAVE_LOOP | 357 | #if XCHAL_HAVE_LOOPS |
363 | rsr a3, LEND # check if we reached LEND | 358 | rsr a4, LEND # check if we reached LEND |
364 | bne a7, a3, 1f | 359 | bne a7, a4, 1f |
365 | rsr a3, LCOUNT # and LCOUNT != 0 | 360 | rsr a4, LCOUNT # and LCOUNT != 0 |
366 | beqz a3, 1f | 361 | beqz a4, 1f |
367 | addi a3, a3, -1 # decrement LCOUNT and set | 362 | addi a4, a4, -1 # decrement LCOUNT and set |
368 | rsr a7, LBEG # set PC to LBEGIN | 363 | rsr a7, LBEG # set PC to LBEGIN |
369 | wsr a3, LCOUNT | 364 | wsr a4, LCOUNT |
370 | #endif | 365 | #endif |
371 | 366 | ||
372 | 1: wsr a7, EPC_1 # skip store instruction | 367 | 1: wsr a7, EPC_1 # skip store instruction |
@@ -416,6 +411,7 @@ ENTRY(fast_unaligned) | |||
416 | 411 | ||
417 | /* Restore working register */ | 412 | /* Restore working register */ |
418 | 413 | ||
414 | l32i a8, a2, PT_AREG8 | ||
419 | l32i a7, a2, PT_AREG7 | 415 | l32i a7, a2, PT_AREG7 |
420 | l32i a6, a2, PT_AREG6 | 416 | l32i a6, a2, PT_AREG6 |
421 | l32i a5, a2, PT_AREG5 | 417 | l32i a5, a2, PT_AREG5 |
@@ -446,7 +442,7 @@ ENTRY(fast_unaligned) | |||
446 | mov a1, a2 | 442 | mov a1, a2 |
447 | 443 | ||
448 | rsr a0, PS | 444 | rsr a0, PS |
449 | bbsi.l a2, PS_UM_SHIFT, 1f # jump if user mode | 445 | bbsi.l a2, PS_UM_BIT, 1f # jump if user mode |
450 | 446 | ||
451 | movi a0, _kernel_exception | 447 | movi a0, _kernel_exception |
452 | jx a0 | 448 | jx a0 |
diff --git a/arch/xtensa/kernel/asm-offsets.c b/arch/xtensa/kernel/asm-offsets.c index 7cd1d7f8f608..b256cfbef344 100644 --- a/arch/xtensa/kernel/asm-offsets.c +++ b/arch/xtensa/kernel/asm-offsets.c | |||
@@ -87,6 +87,11 @@ int main(void) | |||
87 | DEFINE(MM_CONTEXT, offsetof (struct mm_struct, context)); | 87 | DEFINE(MM_CONTEXT, offsetof (struct mm_struct, context)); |
88 | BLANK(); | 88 | BLANK(); |
89 | DEFINE(PT_SINGLESTEP_BIT, PT_SINGLESTEP_BIT); | 89 | DEFINE(PT_SINGLESTEP_BIT, PT_SINGLESTEP_BIT); |
90 | |||
91 | /* constants */ | ||
92 | DEFINE(_CLONE_VM, CLONE_VM); | ||
93 | DEFINE(_CLONE_UNTRACED, CLONE_UNTRACED); | ||
94 | |||
90 | return 0; | 95 | return 0; |
91 | } | 96 | } |
92 | 97 | ||
diff --git a/arch/xtensa/kernel/coprocessor.S b/arch/xtensa/kernel/coprocessor.S index cf5a93fb6a2e..01bcb9fcfcbd 100644 --- a/arch/xtensa/kernel/coprocessor.S +++ b/arch/xtensa/kernel/coprocessor.S | |||
@@ -90,7 +90,6 @@ ENTRY(enable_coprocessor) | |||
90 | rsync | 90 | rsync |
91 | retw | 91 | retw |
92 | 92 | ||
93 | #endif | ||
94 | 93 | ||
95 | ENTRY(save_coprocessor_extra) | 94 | ENTRY(save_coprocessor_extra) |
96 | entry sp, 16 | 95 | entry sp, 16 |
@@ -197,4 +196,5 @@ _xtensa_reginfo_tables: | |||
197 | XCHAL_CP7_SA_CONTENTS_LIBDB | 196 | XCHAL_CP7_SA_CONTENTS_LIBDB |
198 | .word 0xFC000000 /* invalid register number,marks end of table*/ | 197 | .word 0xFC000000 /* invalid register number,marks end of table*/ |
199 | _xtensa_reginfo_table_end: | 198 | _xtensa_reginfo_table_end: |
199 | #endif | ||
200 | 200 | ||
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index 89e409e9e0de..9e271ba009bf 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
25 | #include <asm/page.h> | 25 | #include <asm/page.h> |
26 | #include <asm/signal.h> | 26 | #include <asm/signal.h> |
27 | #include <xtensa/coreasm.h> | 27 | #include <asm/tlbflush.h> |
28 | 28 | ||
29 | /* Unimplemented features. */ | 29 | /* Unimplemented features. */ |
30 | 30 | ||
@@ -364,7 +364,7 @@ common_exception: | |||
364 | movi a2, 1 | 364 | movi a2, 1 |
365 | extui a3, a3, 0, 1 # a3 = PS.INTLEVEL[0] | 365 | extui a3, a3, 0, 1 # a3 = PS.INTLEVEL[0] |
366 | moveqz a3, a2, a0 # a3 = 1 iff interrupt exception | 366 | moveqz a3, a2, a0 # a3 = 1 iff interrupt exception |
367 | movi a2, PS_WOE_MASK | 367 | movi a2, 1 << PS_WOE_BIT |
368 | or a3, a3, a2 | 368 | or a3, a3, a2 |
369 | rsr a0, EXCCAUSE | 369 | rsr a0, EXCCAUSE |
370 | xsr a3, PS | 370 | xsr a3, PS |
@@ -399,7 +399,7 @@ common_exception_return: | |||
399 | /* Jump if we are returning from kernel exceptions. */ | 399 | /* Jump if we are returning from kernel exceptions. */ |
400 | 400 | ||
401 | 1: l32i a3, a1, PT_PS | 401 | 1: l32i a3, a1, PT_PS |
402 | _bbsi.l a3, PS_UM_SHIFT, 2f | 402 | _bbsi.l a3, PS_UM_BIT, 2f |
403 | j kernel_exception_exit | 403 | j kernel_exception_exit |
404 | 404 | ||
405 | /* Specific to a user exception exit: | 405 | /* Specific to a user exception exit: |
@@ -422,7 +422,7 @@ common_exception_return: | |||
422 | * (Hint: There is only one user exception frame on stack) | 422 | * (Hint: There is only one user exception frame on stack) |
423 | */ | 423 | */ |
424 | 424 | ||
425 | movi a3, PS_WOE_MASK | 425 | movi a3, 1 << PS_WOE_BIT |
426 | 426 | ||
427 | _bbsi.l a4, TIF_NEED_RESCHED, 3f | 427 | _bbsi.l a4, TIF_NEED_RESCHED, 3f |
428 | _bbci.l a4, TIF_SIGPENDING, 4f | 428 | _bbci.l a4, TIF_SIGPENDING, 4f |
@@ -694,7 +694,7 @@ common_exception_exit: | |||
694 | ENTRY(debug_exception) | 694 | ENTRY(debug_exception) |
695 | 695 | ||
696 | rsr a0, EPS + XCHAL_DEBUGLEVEL | 696 | rsr a0, EPS + XCHAL_DEBUGLEVEL |
697 | bbsi.l a0, PS_EXCM_SHIFT, 1f # exception mode | 697 | bbsi.l a0, PS_EXCM_BIT, 1f # exception mode |
698 | 698 | ||
699 | /* Set EPC_1 and EXCCAUSE */ | 699 | /* Set EPC_1 and EXCCAUSE */ |
700 | 700 | ||
@@ -707,7 +707,7 @@ ENTRY(debug_exception) | |||
707 | 707 | ||
708 | /* Restore PS to the value before the debug exc but with PS.EXCM set.*/ | 708 | /* Restore PS to the value before the debug exc but with PS.EXCM set.*/ |
709 | 709 | ||
710 | movi a2, 1 << PS_EXCM_SHIFT | 710 | movi a2, 1 << PS_EXCM_BIT |
711 | or a2, a0, a2 | 711 | or a2, a0, a2 |
712 | movi a0, debug_exception # restore a3, debug jump vector | 712 | movi a0, debug_exception # restore a3, debug jump vector |
713 | wsr a2, PS | 713 | wsr a2, PS |
@@ -715,7 +715,7 @@ ENTRY(debug_exception) | |||
715 | 715 | ||
716 | /* Switch to kernel/user stack, restore jump vector, and save a0 */ | 716 | /* Switch to kernel/user stack, restore jump vector, and save a0 */ |
717 | 717 | ||
718 | bbsi.l a2, PS_UM_SHIFT, 2f # jump if user mode | 718 | bbsi.l a2, PS_UM_BIT, 2f # jump if user mode |
719 | 719 | ||
720 | addi a2, a1, -16-PT_SIZE # assume kernel stack | 720 | addi a2, a1, -16-PT_SIZE # assume kernel stack |
721 | s32i a0, a2, PT_AREG0 | 721 | s32i a0, a2, PT_AREG0 |
@@ -778,7 +778,7 @@ ENTRY(unrecoverable_exception) | |||
778 | wsr a1, WINDOWBASE | 778 | wsr a1, WINDOWBASE |
779 | rsync | 779 | rsync |
780 | 780 | ||
781 | movi a1, PS_WOE_MASK | 1 | 781 | movi a1, (1 << PS_WOE_BIT) | 1 |
782 | wsr a1, PS | 782 | wsr a1, PS |
783 | rsync | 783 | rsync |
784 | 784 | ||
@@ -1004,13 +1004,10 @@ ENTRY(fast_syscall_kernel) | |||
1004 | 1004 | ||
1005 | rsr a0, DEPC # get syscall-nr | 1005 | rsr a0, DEPC # get syscall-nr |
1006 | _beqz a0, fast_syscall_spill_registers | 1006 | _beqz a0, fast_syscall_spill_registers |
1007 | 1007 | _beqi a0, __NR_xtensa, fast_syscall_xtensa | |
1008 | addi a0, a0, -__NR_sysxtensa | ||
1009 | _beqz a0, fast_syscall_sysxtensa | ||
1010 | 1008 | ||
1011 | j kernel_exception | 1009 | j kernel_exception |
1012 | 1010 | ||
1013 | |||
1014 | ENTRY(fast_syscall_user) | 1011 | ENTRY(fast_syscall_user) |
1015 | 1012 | ||
1016 | /* Skip syscall. */ | 1013 | /* Skip syscall. */ |
@@ -1024,9 +1021,7 @@ ENTRY(fast_syscall_user) | |||
1024 | 1021 | ||
1025 | rsr a0, DEPC # get syscall-nr | 1022 | rsr a0, DEPC # get syscall-nr |
1026 | _beqz a0, fast_syscall_spill_registers | 1023 | _beqz a0, fast_syscall_spill_registers |
1027 | 1024 | _beqi a0, __NR_xtensa, fast_syscall_xtensa | |
1028 | addi a0, a0, -__NR_sysxtensa | ||
1029 | _beqz a0, fast_syscall_sysxtensa | ||
1030 | 1025 | ||
1031 | j user_exception | 1026 | j user_exception |
1032 | 1027 | ||
@@ -1047,18 +1042,19 @@ ENTRY(fast_syscall_unrecoverable) | |||
1047 | /* | 1042 | /* |
1048 | * sysxtensa syscall handler | 1043 | * sysxtensa syscall handler |
1049 | * | 1044 | * |
1050 | * int sysxtensa (XTENSA_ATOMIC_SET, ptr, val, unused); | 1045 | * int sysxtensa (SYS_XTENSA_ATOMIC_SET, ptr, val, unused); |
1051 | * int sysxtensa (XTENSA_ATOMIC_ADD, ptr, val, unused); | 1046 | * int sysxtensa (SYS_XTENSA_ATOMIC_ADD, ptr, val, unused); |
1052 | * int sysxtensa (XTENSA_ATOMIC_EXG_ADD, ptr, val, unused); | 1047 | * int sysxtensa (SYS_XTENSA_ATOMIC_EXG_ADD, ptr, val, unused); |
1053 | * int sysxtensa (XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval); | 1048 | * int sysxtensa (SYS_XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval); |
1054 | * a2 a6 a3 a4 a5 | 1049 | * a2 a6 a3 a4 a5 |
1055 | * | 1050 | * |
1056 | * Entry condition: | 1051 | * Entry condition: |
1057 | * | 1052 | * |
1058 | * a0: trashed, original value saved on stack (PT_AREG0) | 1053 | * a0: a2 (syscall-nr), original value saved on stack (PT_AREG0) |
1059 | * a1: a1 | 1054 | * a1: a1 |
1060 | * a2: new stack pointer, original in DEPC | 1055 | * a2: new stack pointer, original in a0 and DEPC |
1061 | * a3: dispatch table | 1056 | * a3: dispatch table, original in excsave_1 |
1057 | * a4..a15: unchanged | ||
1062 | * depc: a2, original value saved on stack (PT_DEPC) | 1058 | * depc: a2, original value saved on stack (PT_DEPC) |
1063 | * excsave_1: a3 | 1059 | * excsave_1: a3 |
1064 | * | 1060 | * |
@@ -1091,59 +1087,62 @@ ENTRY(fast_syscall_unrecoverable) | |||
1091 | #define CATCH \ | 1087 | #define CATCH \ |
1092 | 67: | 1088 | 67: |
1093 | 1089 | ||
1094 | ENTRY(fast_syscall_sysxtensa) | 1090 | ENTRY(fast_syscall_xtensa) |
1095 | |||
1096 | _beqz a6, 1f | ||
1097 | _blti a6, SYSXTENSA_COUNT, 2f | ||
1098 | 1091 | ||
1099 | 1: j user_exception | 1092 | xsr a3, EXCSAVE_1 # restore a3, excsave1 |
1100 | |||
1101 | 2: xsr a3, EXCSAVE_1 # restore a3, excsave1 | ||
1102 | s32i a7, a2, PT_AREG7 | ||
1103 | 1093 | ||
1094 | s32i a7, a2, PT_AREG7 # we need an additional register | ||
1104 | movi a7, 4 # sizeof(unsigned int) | 1095 | movi a7, 4 # sizeof(unsigned int) |
1105 | access_ok a0, a3, a7, a2, .Leac | 1096 | access_ok a3, a7, a0, a2, .Leac # a0: scratch reg, a2: sp |
1106 | 1097 | ||
1107 | _beqi a6, SYSXTENSA_ATOMIC_SET, .Lset | 1098 | addi a6, a6, -1 # assuming SYS_XTENSA_ATOMIC_SET = 1 |
1108 | _beqi a6, SYSXTENSA_ATOMIC_EXG_ADD, .Lexg | 1099 | _bgeui a6, SYS_XTENSA_COUNT - 1, .Lill |
1109 | _beqi a6, SYSXTENSA_ATOMIC_ADD, .Ladd | 1100 | _bnei a6, SYS_XTENSA_ATOMIC_CMP_SWP - 1, .Lnswp |
1110 | 1101 | ||
1111 | /* Fall through for SYSXTENSA_ATOMIC_CMP_SWP */ | 1102 | /* Fall through for ATOMIC_CMP_SWP. */ |
1112 | 1103 | ||
1113 | .Lswp: /* Atomic compare and swap */ | 1104 | .Lswp: /* Atomic compare and swap */ |
1114 | 1105 | ||
1115 | TRY l32i a7, a3, 0 # read old value | 1106 | TRY l32i a0, a3, 0 # read old value |
1116 | bne a7, a4, 1f # same as old value? jump | 1107 | bne a0, a4, 1f # same as old value? jump |
1117 | s32i a5, a3, 0 # different, modify value | 1108 | TRY s32i a5, a3, 0 # different, modify value |
1118 | movi a7, 1 # and return 1 | 1109 | l32i a7, a2, PT_AREG7 # restore a7 |
1119 | j .Lret | 1110 | l32i a0, a2, PT_AREG0 # restore a0 |
1120 | 1111 | movi a2, 1 # and return 1 | |
1121 | 1: movi a7, 0 # same values: return 0 | 1112 | addi a6, a6, 1 # restore a6 (really necessary?) |
1122 | j .Lret | 1113 | rfe |
1123 | |||
1124 | .Ladd: /* Atomic add */ | ||
1125 | .Lexg: /* Atomic (exchange) add */ | ||
1126 | 1114 | ||
1127 | TRY l32i a7, a3, 0 | 1115 | 1: l32i a7, a2, PT_AREG7 # restore a7 |
1128 | add a4, a4, a7 | 1116 | l32i a0, a2, PT_AREG0 # restore a0 |
1129 | s32i a4, a3, 0 | 1117 | movi a2, 0 # return 0 (note that we cannot set |
1130 | j .Lret | 1118 | addi a6, a6, 1 # restore a6 (really necessary?) |
1119 | rfe | ||
1131 | 1120 | ||
1132 | .Lset: /* Atomic set */ | 1121 | .Lnswp: /* Atomic set, add, and exg_add. */ |
1133 | 1122 | ||
1134 | TRY l32i a7, a3, 0 # read old value as return value | 1123 | TRY l32i a7, a3, 0 # orig |
1135 | s32i a4, a3, 0 # write new value | 1124 | add a0, a4, a7 # + arg |
1125 | moveqz a0, a4, a6 # set | ||
1126 | TRY s32i a0, a3, 0 # write new value | ||
1136 | 1127 | ||
1137 | .Lret: mov a0, a2 | 1128 | mov a0, a2 |
1138 | mov a2, a7 | 1129 | mov a2, a7 |
1139 | l32i a7, a0, PT_AREG7 | 1130 | l32i a7, a0, PT_AREG7 # restore a7 |
1140 | l32i a3, a0, PT_AREG3 | 1131 | l32i a0, a0, PT_AREG0 # restore a0 |
1141 | l32i a0, a0, PT_AREG0 | 1132 | addi a6, a6, 1 # restore a6 (really necessary?) |
1142 | rfe | 1133 | rfe |
1143 | 1134 | ||
1144 | CATCH | 1135 | CATCH |
1145 | .Leac: movi a7, -EFAULT | 1136 | .Leac: l32i a7, a2, PT_AREG7 # restore a7 |
1146 | j .Lret | 1137 | l32i a0, a2, PT_AREG0 # restore a0 |
1138 | movi a2, -EFAULT | ||
1139 | rfe | ||
1140 | |||
1141 | .Lill: l32i a7, a2, PT_AREG0 # restore a7 | ||
1142 | l32i a0, a2, PT_AREG0 # restore a0 | ||
1143 | movi a2, -EINVAL | ||
1144 | rfe | ||
1145 | |||
1147 | 1146 | ||
1148 | 1147 | ||
1149 | 1148 | ||
@@ -1491,7 +1490,7 @@ ENTRY(_spill_registers) | |||
1491 | */ | 1490 | */ |
1492 | 1491 | ||
1493 | rsr a0, PS | 1492 | rsr a0, PS |
1494 | _bbci.l a0, PS_UM_SHIFT, 1f | 1493 | _bbci.l a0, PS_UM_BIT, 1f |
1495 | 1494 | ||
1496 | /* User space: Setup a dummy frame and kill application. | 1495 | /* User space: Setup a dummy frame and kill application. |
1497 | * Note: We assume EXC_TABLE_KSTK contains a valid stack pointer. | 1496 | * Note: We assume EXC_TABLE_KSTK contains a valid stack pointer. |
@@ -1510,7 +1509,7 @@ ENTRY(_spill_registers) | |||
1510 | l32i a1, a3, EXC_TABLE_KSTK | 1509 | l32i a1, a3, EXC_TABLE_KSTK |
1511 | wsr a3, EXCSAVE_1 | 1510 | wsr a3, EXCSAVE_1 |
1512 | 1511 | ||
1513 | movi a4, PS_WOE_MASK | 1 | 1512 | movi a4, (1 << PS_WOE_BIT) | 1 |
1514 | wsr a4, PS | 1513 | wsr a4, PS |
1515 | rsync | 1514 | rsync |
1516 | 1515 | ||
@@ -1612,7 +1611,7 @@ ENTRY(fast_second_level_miss) | |||
1612 | rsr a1, PTEVADDR | 1611 | rsr a1, PTEVADDR |
1613 | srli a1, a1, PAGE_SHIFT | 1612 | srli a1, a1, PAGE_SHIFT |
1614 | slli a1, a1, PAGE_SHIFT # ptevaddr & PAGE_MASK | 1613 | slli a1, a1, PAGE_SHIFT # ptevaddr & PAGE_MASK |
1615 | addi a1, a1, DTLB_WAY_PGTABLE # ... + way_number | 1614 | addi a1, a1, DTLB_WAY_PGD # ... + way_number |
1616 | 1615 | ||
1617 | wdtlb a0, a1 | 1616 | wdtlb a0, a1 |
1618 | dsync | 1617 | dsync |
@@ -1654,7 +1653,7 @@ ENTRY(fast_second_level_miss) | |||
1654 | mov a1, a2 | 1653 | mov a1, a2 |
1655 | 1654 | ||
1656 | rsr a2, PS | 1655 | rsr a2, PS |
1657 | bbsi.l a2, PS_UM_SHIFT, 1f | 1656 | bbsi.l a2, PS_UM_BIT, 1f |
1658 | j _kernel_exception | 1657 | j _kernel_exception |
1659 | 1: j _user_exception | 1658 | 1: j _user_exception |
1660 | 1659 | ||
@@ -1753,7 +1752,7 @@ ENTRY(fast_store_prohibited) | |||
1753 | mov a1, a2 | 1752 | mov a1, a2 |
1754 | 1753 | ||
1755 | rsr a2, PS | 1754 | rsr a2, PS |
1756 | bbsi.l a2, PS_UM_SHIFT, 1f | 1755 | bbsi.l a2, PS_UM_BIT, 1f |
1757 | j _kernel_exception | 1756 | j _kernel_exception |
1758 | 1: j _user_exception | 1757 | 1: j _user_exception |
1759 | 1758 | ||
@@ -1907,6 +1906,103 @@ ENTRY(fast_coprocessor) | |||
1907 | #endif /* XCHAL_EXTRA_SA_SIZE */ | 1906 | #endif /* XCHAL_EXTRA_SA_SIZE */ |
1908 | 1907 | ||
1909 | /* | 1908 | /* |
1909 | * System Calls. | ||
1910 | * | ||
1911 | * void system_call (struct pt_regs* regs, int exccause) | ||
1912 | * a2 a3 | ||
1913 | */ | ||
1914 | |||
1915 | ENTRY(system_call) | ||
1916 | entry a1, 32 | ||
1917 | |||
1918 | /* regs->syscall = regs->areg[2] */ | ||
1919 | |||
1920 | l32i a3, a2, PT_AREG2 | ||
1921 | mov a6, a2 | ||
1922 | movi a4, do_syscall_trace_enter | ||
1923 | s32i a3, a2, PT_SYSCALL | ||
1924 | callx4 a4 | ||
1925 | |||
1926 | /* syscall = sys_call_table[syscall_nr] */ | ||
1927 | |||
1928 | movi a4, sys_call_table; | ||
1929 | movi a5, __NR_syscall_count | ||
1930 | movi a6, -ENOSYS | ||
1931 | bgeu a3, a5, 1f | ||
1932 | |||
1933 | addx4 a4, a3, a4 | ||
1934 | l32i a4, a4, 0 | ||
1935 | movi a5, sys_ni_syscall; | ||
1936 | beq a4, a5, 1f | ||
1937 | |||
1938 | /* Load args: arg0 - arg5 are passed via regs. */ | ||
1939 | |||
1940 | l32i a6, a2, PT_AREG6 | ||
1941 | l32i a7, a2, PT_AREG3 | ||
1942 | l32i a8, a2, PT_AREG4 | ||
1943 | l32i a9, a2, PT_AREG5 | ||
1944 | l32i a10, a2, PT_AREG8 | ||
1945 | l32i a11, a2, PT_AREG9 | ||
1946 | |||
1947 | /* Pass one additional argument to the syscall: pt_regs (on stack) */ | ||
1948 | s32i a2, a1, 0 | ||
1949 | |||
1950 | callx4 a4 | ||
1951 | |||
1952 | 1: /* regs->areg[2] = return_value */ | ||
1953 | |||
1954 | s32i a6, a2, PT_AREG2 | ||
1955 | movi a4, do_syscall_trace_leave | ||
1956 | mov a6, a2 | ||
1957 | callx4 a4 | ||
1958 | retw | ||
1959 | |||
1960 | |||
1961 | /* | ||
1962 | * Create a kernel thread | ||
1963 | * | ||
1964 | * int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | ||
1965 | * a2 a2 a3 a4 | ||
1966 | */ | ||
1967 | |||
1968 | ENTRY(kernel_thread) | ||
1969 | entry a1, 16 | ||
1970 | |||
1971 | mov a5, a2 # preserve fn over syscall | ||
1972 | mov a7, a3 # preserve args over syscall | ||
1973 | |||
1974 | movi a3, _CLONE_VM | _CLONE_UNTRACED | ||
1975 | movi a2, __NR_clone | ||
1976 | or a6, a4, a3 # arg0: flags | ||
1977 | mov a3, a1 # arg1: sp | ||
1978 | syscall | ||
1979 | |||
1980 | beq a3, a1, 1f # branch if parent | ||
1981 | mov a6, a7 # args | ||
1982 | callx4 a5 # fn(args) | ||
1983 | |||
1984 | movi a2, __NR_exit | ||
1985 | syscall # return value of fn(args) still in a6 | ||
1986 | |||
1987 | 1: retw | ||
1988 | |||
1989 | /* | ||
1990 | * Do a system call from kernel instead of calling sys_execve, so we end up | ||
1991 | * with proper pt_regs. | ||
1992 | * | ||
1993 | * int kernel_execve(const char *fname, char *const argv[], charg *const envp[]) | ||
1994 | * a2 a2 a3 a4 | ||
1995 | */ | ||
1996 | |||
1997 | ENTRY(kernel_execve) | ||
1998 | entry a1, 16 | ||
1999 | mov a6, a2 # arg0 is in a6 | ||
2000 | movi a2, __NR_execve | ||
2001 | syscall | ||
2002 | |||
2003 | retw | ||
2004 | |||
2005 | /* | ||
1910 | * Task switch. | 2006 | * Task switch. |
1911 | * | 2007 | * |
1912 | * struct task* _switch_to (struct task* prev, struct task* next) | 2008 | * struct task* _switch_to (struct task* prev, struct task* next) |
@@ -1924,7 +2020,7 @@ ENTRY(_switch_to) | |||
1924 | 2020 | ||
1925 | /* Disable ints while we manipulate the stack pointer; spill regs. */ | 2021 | /* Disable ints while we manipulate the stack pointer; spill regs. */ |
1926 | 2022 | ||
1927 | movi a5, PS_EXCM_MASK | LOCKLEVEL | 2023 | movi a5, (1 << PS_EXCM_BIT) | LOCKLEVEL |
1928 | xsr a5, PS | 2024 | xsr a5, PS |
1929 | rsr a3, EXCSAVE_1 | 2025 | rsr a3, EXCSAVE_1 |
1930 | rsync | 2026 | rsync |
@@ -1964,33 +2060,9 @@ ENTRY(ret_from_fork) | |||
1964 | movi a4, schedule_tail | 2060 | movi a4, schedule_tail |
1965 | callx4 a4 | 2061 | callx4 a4 |
1966 | 2062 | ||
1967 | movi a4, do_syscall_trace | 2063 | movi a4, do_syscall_trace_leave |
2064 | mov a6, a1 | ||
1968 | callx4 a4 | 2065 | callx4 a4 |
1969 | 2066 | ||
1970 | j common_exception_return | 2067 | j common_exception_return |
1971 | 2068 | ||
1972 | |||
1973 | |||
1974 | /* | ||
1975 | * Table of syscalls | ||
1976 | */ | ||
1977 | |||
1978 | .data | ||
1979 | .align 4 | ||
1980 | .global sys_call_table | ||
1981 | sys_call_table: | ||
1982 | |||
1983 | #define SYSCALL(call, narg) .word call | ||
1984 | #include "syscalls.h" | ||
1985 | |||
1986 | /* | ||
1987 | * Number of arguments of each syscall | ||
1988 | */ | ||
1989 | |||
1990 | .global sys_narg_table | ||
1991 | sys_narg_table: | ||
1992 | |||
1993 | #undef SYSCALL | ||
1994 | #define SYSCALL(call, narg) .byte narg | ||
1995 | #include "syscalls.h" | ||
1996 | |||
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S index c07cb2522993..ea89910efa44 100644 --- a/arch/xtensa/kernel/head.S +++ b/arch/xtensa/kernel/head.S | |||
@@ -15,9 +15,9 @@ | |||
15 | * Kevin Chea | 15 | * Kevin Chea |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <xtensa/cacheasm.h> | ||
19 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
20 | #include <asm/page.h> | 19 | #include <asm/page.h> |
20 | #include <asm/cacheasm.h> | ||
21 | 21 | ||
22 | /* | 22 | /* |
23 | * This module contains the entry code for kernel images. It performs the | 23 | * This module contains the entry code for kernel images. It performs the |
@@ -32,13 +32,6 @@ | |||
32 | * | 32 | * |
33 | */ | 33 | */ |
34 | 34 | ||
35 | .macro iterate from, to , cmd | ||
36 | .ifeq ((\to - \from) & ~0xfff) | ||
37 | \cmd \from | ||
38 | iterate "(\from+1)", \to, \cmd | ||
39 | .endif | ||
40 | .endm | ||
41 | |||
42 | /* | 35 | /* |
43 | * _start | 36 | * _start |
44 | * | 37 | * |
@@ -64,7 +57,7 @@ _startup: | |||
64 | 57 | ||
65 | /* Disable interrupts and exceptions. */ | 58 | /* Disable interrupts and exceptions. */ |
66 | 59 | ||
67 | movi a0, XCHAL_PS_EXCM_MASK | 60 | movi a0, LOCKLEVEL |
68 | wsr a0, PS | 61 | wsr a0, PS |
69 | 62 | ||
70 | /* Preserve the pointer to the boot parameter list in EXCSAVE_1 */ | 63 | /* Preserve the pointer to the boot parameter list in EXCSAVE_1 */ |
@@ -91,11 +84,11 @@ _startup: | |||
91 | movi a1, 15 | 84 | movi a1, 15 |
92 | wsr a0, ICOUNTLEVEL | 85 | wsr a0, ICOUNTLEVEL |
93 | 86 | ||
94 | .macro reset_dbreak num | 87 | .set _index, 0 |
95 | wsr a0, DBREAKC + \num | 88 | .rept XCHAL_NUM_DBREAK - 1 |
96 | .endm | 89 | wsr a0, DBREAKC + _index |
97 | 90 | .set _index, _index + 1 | |
98 | iterate 0, XCHAL_NUM_IBREAK-1, reset_dbreak | 91 | .endr |
99 | #endif | 92 | #endif |
100 | 93 | ||
101 | /* Clear CCOUNT (not really necessary, but nice) */ | 94 | /* Clear CCOUNT (not really necessary, but nice) */ |
@@ -110,10 +103,11 @@ _startup: | |||
110 | 103 | ||
111 | /* Disable all timers. */ | 104 | /* Disable all timers. */ |
112 | 105 | ||
113 | .macro reset_timer num | 106 | .set _index, 0 |
114 | wsr a0, CCOMPARE_0 + \num | 107 | .rept XCHAL_NUM_TIMERS - 1 |
115 | .endm | 108 | wsr a0, CCOMPARE + _index |
116 | iterate 0, XCHAL_NUM_TIMERS-1, reset_timer | 109 | .set _index, _index + 1 |
110 | .endr | ||
117 | 111 | ||
118 | /* Interrupt initialization. */ | 112 | /* Interrupt initialization. */ |
119 | 113 | ||
@@ -139,12 +133,21 @@ _startup: | |||
139 | rsync | 133 | rsync |
140 | 134 | ||
141 | /* Initialize the caches. | 135 | /* Initialize the caches. |
142 | * Does not include flushing writeback d-cache. | 136 | * a2, a3 are just working registers (clobbered). |
143 | * a6, a7 are just working registers (clobbered). | ||
144 | */ | 137 | */ |
145 | 138 | ||
146 | icache_reset a2, a3 | 139 | #if XCHAL_DCACHE_LINE_LOCKABLE |
147 | dcache_reset a2, a3 | 140 | ___unlock_dcache_all a2 a3 |
141 | #endif | ||
142 | |||
143 | #if XCHAL_ICACHE_LINE_LOCKABLE | ||
144 | ___unlock_icache_all a2 a3 | ||
145 | #endif | ||
146 | |||
147 | ___invalidate_dcache_all a2 a3 | ||
148 | ___invalidate_icache_all a2 a3 | ||
149 | |||
150 | isync | ||
148 | 151 | ||
149 | /* Unpack data sections | 152 | /* Unpack data sections |
150 | * | 153 | * |
@@ -181,9 +184,9 @@ _startup: | |||
181 | movi a2, _bss_start # start of BSS | 184 | movi a2, _bss_start # start of BSS |
182 | movi a3, _bss_end # end of BSS | 185 | movi a3, _bss_end # end of BSS |
183 | 186 | ||
184 | 1: addi a2, a2, 4 | 187 | __loopt a2, a3, a4, 2 |
185 | s32i a0, a2, 0 | 188 | s32i a0, a2, 0 |
186 | blt a2, a3, 1b | 189 | __endla a2, a4, 4 |
187 | 190 | ||
188 | #if XCHAL_DCACHE_IS_WRITEBACK | 191 | #if XCHAL_DCACHE_IS_WRITEBACK |
189 | 192 | ||
@@ -191,7 +194,7 @@ _startup: | |||
191 | * instructions/data are available. | 194 | * instructions/data are available. |
192 | */ | 195 | */ |
193 | 196 | ||
194 | dcache_writeback_all a2, a3 | 197 | ___flush_dcache_all a2 a3 |
195 | #endif | 198 | #endif |
196 | 199 | ||
197 | /* Setup stack and enable window exceptions (keep irqs disabled) */ | 200 | /* Setup stack and enable window exceptions (keep irqs disabled) */ |
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index 1cf744ee0959..c9ea73b7031b 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Xtensa built-in interrupt controller and some generic functions copied | 4 | * Xtensa built-in interrupt controller and some generic functions copied |
5 | * from i386. | 5 | * from i386. |
6 | * | 6 | * |
7 | * Copyright (C) 2002 - 2005 Tensilica, Inc. | 7 | * Copyright (C) 2002 - 2006 Tensilica, Inc. |
8 | * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar | 8 | * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar |
9 | * | 9 | * |
10 | * | 10 | * |
@@ -22,11 +22,6 @@ | |||
22 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
23 | #include <asm/platform.h> | 23 | #include <asm/platform.h> |
24 | 24 | ||
25 | static void enable_xtensa_irq(unsigned int irq); | ||
26 | static void disable_xtensa_irq(unsigned int irq); | ||
27 | static void mask_and_ack_xtensa(unsigned int irq); | ||
28 | static void end_xtensa_irq(unsigned int irq); | ||
29 | |||
30 | static unsigned int cached_irq_mask; | 25 | static unsigned int cached_irq_mask; |
31 | 26 | ||
32 | atomic_t irq_err_count; | 27 | atomic_t irq_err_count; |
@@ -46,8 +41,16 @@ void ack_bad_irq(unsigned int irq) | |||
46 | * handlers). | 41 | * handlers). |
47 | */ | 42 | */ |
48 | 43 | ||
49 | unsigned int do_IRQ(int irq, struct pt_regs *regs) | 44 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs) |
50 | { | 45 | { |
46 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
47 | struct irq_desc *desc = irq_desc + irq; | ||
48 | |||
49 | if (irq >= NR_IRQS) { | ||
50 | printk(KERN_EMERG "%s: cannot handle IRQ %d\n", | ||
51 | __FUNCTION__, irq); | ||
52 | } | ||
53 | |||
51 | irq_enter(); | 54 | irq_enter(); |
52 | 55 | ||
53 | #ifdef CONFIG_DEBUG_STACKOVERFLOW | 56 | #ifdef CONFIG_DEBUG_STACKOVERFLOW |
@@ -63,12 +66,10 @@ unsigned int do_IRQ(int irq, struct pt_regs *regs) | |||
63 | sp - sizeof(struct thread_info)); | 66 | sp - sizeof(struct thread_info)); |
64 | } | 67 | } |
65 | #endif | 68 | #endif |
66 | 69 | desc->handle_irq(irq, desc); | |
67 | __do_IRQ(irq, regs); | ||
68 | 70 | ||
69 | irq_exit(); | 71 | irq_exit(); |
70 | 72 | set_irq_regs(old_regs); | |
71 | return 1; | ||
72 | } | 73 | } |
73 | 74 | ||
74 | /* | 75 | /* |
@@ -118,72 +119,68 @@ skip: | |||
118 | } | 119 | } |
119 | return 0; | 120 | return 0; |
120 | } | 121 | } |
121 | /* shutdown is same as "disable" */ | ||
122 | #define shutdown_xtensa_irq disable_xtensa_irq | ||
123 | 122 | ||
124 | static unsigned int startup_xtensa_irq(unsigned int irq) | 123 | static void xtensa_irq_mask(unsigned int irq) |
125 | { | ||
126 | enable_xtensa_irq(irq); | ||
127 | return 0; /* never anything pending */ | ||
128 | } | ||
129 | |||
130 | static struct hw_interrupt_type xtensa_irq_type = { | ||
131 | "Xtensa-IRQ", | ||
132 | startup_xtensa_irq, | ||
133 | shutdown_xtensa_irq, | ||
134 | enable_xtensa_irq, | ||
135 | disable_xtensa_irq, | ||
136 | mask_and_ack_xtensa, | ||
137 | end_xtensa_irq | ||
138 | }; | ||
139 | |||
140 | static inline void mask_irq(unsigned int irq) | ||
141 | { | 124 | { |
142 | cached_irq_mask &= ~(1 << irq); | 125 | cached_irq_mask &= ~(1 << irq); |
143 | set_sr (cached_irq_mask, INTENABLE); | 126 | set_sr (cached_irq_mask, INTENABLE); |
144 | } | 127 | } |
145 | 128 | ||
146 | static inline void unmask_irq(unsigned int irq) | 129 | static void xtensa_irq_unmask(unsigned int irq) |
147 | { | 130 | { |
148 | cached_irq_mask |= 1 << irq; | 131 | cached_irq_mask |= 1 << irq; |
149 | set_sr (cached_irq_mask, INTENABLE); | 132 | set_sr (cached_irq_mask, INTENABLE); |
150 | } | 133 | } |
151 | 134 | ||
152 | static void disable_xtensa_irq(unsigned int irq) | 135 | static void xtensa_irq_ack(unsigned int irq) |
153 | { | 136 | { |
154 | unsigned long flags; | 137 | set_sr(1 << irq, INTCLEAR); |
155 | local_save_flags(flags); | ||
156 | mask_irq(irq); | ||
157 | local_irq_restore(flags); | ||
158 | } | 138 | } |
159 | 139 | ||
160 | static void enable_xtensa_irq(unsigned int irq) | 140 | static int xtensa_irq_retrigger(unsigned int irq) |
161 | { | 141 | { |
162 | unsigned long flags; | 142 | set_sr (1 << irq, INTSET); |
163 | local_save_flags(flags); | 143 | return 1; |
164 | unmask_irq(irq); | ||
165 | local_irq_restore(flags); | ||
166 | } | ||
167 | |||
168 | static void mask_and_ack_xtensa(unsigned int irq) | ||
169 | { | ||
170 | disable_xtensa_irq(irq); | ||
171 | } | 144 | } |
172 | 145 | ||
173 | static void end_xtensa_irq(unsigned int irq) | ||
174 | { | ||
175 | enable_xtensa_irq(irq); | ||
176 | } | ||
177 | 146 | ||
147 | static struct irq_chip xtensa_irq_chip = { | ||
148 | .name = "xtensa", | ||
149 | .mask = xtensa_irq_mask, | ||
150 | .unmask = xtensa_irq_unmask, | ||
151 | .ack = xtensa_irq_ack, | ||
152 | .retrigger = xtensa_irq_retrigger, | ||
153 | }; | ||
178 | 154 | ||
179 | void __init init_IRQ(void) | 155 | void __init init_IRQ(void) |
180 | { | 156 | { |
181 | int i; | 157 | int index; |
182 | 158 | ||
183 | for (i=0; i < XTENSA_NR_IRQS; i++) | 159 | for (index = 0; index < XTENSA_NR_IRQS; index++) { |
184 | irq_desc[i].chip = &xtensa_irq_type; | 160 | int mask = 1 << index; |
185 | 161 | ||
186 | cached_irq_mask = 0; | 162 | if (mask & XCHAL_INTTYPE_MASK_SOFTWARE) |
163 | set_irq_chip_and_handler(index, &xtensa_irq_chip, | ||
164 | handle_simple_irq); | ||
187 | 165 | ||
188 | platform_init_irq(); | 166 | else if (mask & XCHAL_INTTYPE_MASK_EXTERN_EDGE) |
167 | set_irq_chip_and_handler(index, &xtensa_irq_chip, | ||
168 | handle_edge_irq); | ||
169 | |||
170 | else if (mask & XCHAL_INTTYPE_MASK_EXTERN_LEVEL) | ||
171 | set_irq_chip_and_handler(index, &xtensa_irq_chip, | ||
172 | handle_level_irq); | ||
173 | |||
174 | else if (mask & XCHAL_INTTYPE_MASK_TIMER) | ||
175 | set_irq_chip_and_handler(index, &xtensa_irq_chip, | ||
176 | handle_edge_irq); | ||
177 | |||
178 | else /* XCHAL_INTTYPE_MASK_WRITE_ERROR */ | ||
179 | /* XCHAL_INTTYPE_MASK_NMI */ | ||
180 | |||
181 | set_irq_chip_and_handler(index, &xtensa_irq_chip, | ||
182 | handle_level_irq); | ||
183 | } | ||
184 | |||
185 | cached_irq_mask = 0; | ||
189 | } | 186 | } |
diff --git a/arch/xtensa/kernel/pci-dma.c b/arch/xtensa/kernel/pci-dma.c index 6648fa9d9192..ca76f071666e 100644 --- a/arch/xtensa/kernel/pci-dma.c +++ b/arch/xtensa/kernel/pci-dma.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/xtensa/kernel/pci-dma.c | 2 | * arch/xtensa/pci-dma.c |
3 | * | 3 | * |
4 | * DMA coherent memory allocation. | 4 | * DMA coherent memory allocation. |
5 | * | 5 | * |
@@ -29,28 +29,48 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | void * | 31 | void * |
32 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) | 32 | dma_alloc_coherent(struct device *dev,size_t size,dma_addr_t *handle,gfp_t flag) |
33 | { | 33 | { |
34 | void *ret; | 34 | unsigned long ret; |
35 | unsigned long uncached = 0; | ||
35 | 36 | ||
36 | /* ignore region speicifiers */ | 37 | /* ignore region speicifiers */ |
37 | gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); | ||
38 | 38 | ||
39 | if (dev == NULL || (*dev->dma_mask < 0xffffffff)) | 39 | flag &= ~(__GFP_DMA | __GFP_HIGHMEM); |
40 | gfp |= GFP_DMA; | ||
41 | ret = (void *)__get_free_pages(gfp, get_order(size)); | ||
42 | 40 | ||
43 | if (ret != NULL) { | 41 | if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff)) |
44 | memset(ret, 0, size); | 42 | flag |= GFP_DMA; |
45 | *handle = virt_to_bus(ret); | 43 | ret = (unsigned long)__get_free_pages(flag, get_order(size)); |
44 | |||
45 | if (ret == 0) | ||
46 | return NULL; | ||
47 | |||
48 | /* We currently don't support coherent memory outside KSEG */ | ||
49 | |||
50 | if (ret < XCHAL_KSEG_CACHED_VADDR | ||
51 | || ret >= XCHAL_KSEG_CACHED_VADDR + XCHAL_KSEG_SIZE) | ||
52 | BUG(); | ||
53 | |||
54 | |||
55 | if (ret != 0) { | ||
56 | memset((void*) ret, 0, size); | ||
57 | uncached = ret+XCHAL_KSEG_BYPASS_VADDR-XCHAL_KSEG_CACHED_VADDR; | ||
58 | *handle = virt_to_bus((void*)ret); | ||
59 | __flush_invalidate_dcache_range(ret, size); | ||
46 | } | 60 | } |
47 | return (void*) BYPASS_ADDR((unsigned long)ret); | 61 | |
62 | return (void*)uncached; | ||
48 | } | 63 | } |
49 | 64 | ||
50 | void dma_free_coherent(struct device *hwdev, size_t size, | 65 | void dma_free_coherent(struct device *hwdev, size_t size, |
51 | void *vaddr, dma_addr_t dma_handle) | 66 | void *vaddr, dma_addr_t dma_handle) |
52 | { | 67 | { |
53 | free_pages(CACHED_ADDR((unsigned long)vaddr), get_order(size)); | 68 | long addr=(long)vaddr+XCHAL_KSEG_CACHED_VADDR-XCHAL_KSEG_BYPASS_VADDR; |
69 | |||
70 | if (addr < 0 || addr >= XCHAL_KSEG_SIZE) | ||
71 | BUG(); | ||
72 | |||
73 | free_pages(addr, get_order(size)); | ||
54 | } | 74 | } |
55 | 75 | ||
56 | 76 | ||
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index a7c4178c2a8c..795bd5ac6f4c 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -1,4 +1,3 @@ | |||
1 | // TODO verify coprocessor handling | ||
2 | /* | 1 | /* |
3 | * arch/xtensa/kernel/process.c | 2 | * arch/xtensa/kernel/process.c |
4 | * | 3 | * |
@@ -43,7 +42,7 @@ | |||
43 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
44 | #include <asm/atomic.h> | 43 | #include <asm/atomic.h> |
45 | #include <asm/asm-offsets.h> | 44 | #include <asm/asm-offsets.h> |
46 | #include <asm/coprocessor.h> | 45 | #include <asm/regs.h> |
47 | 46 | ||
48 | extern void ret_from_fork(void); | 47 | extern void ret_from_fork(void); |
49 | 48 | ||
@@ -67,25 +66,6 @@ void (*pm_power_off)(void) = NULL; | |||
67 | EXPORT_SYMBOL(pm_power_off); | 66 | EXPORT_SYMBOL(pm_power_off); |
68 | 67 | ||
69 | 68 | ||
70 | #if XCHAL_CP_NUM > 0 | ||
71 | |||
72 | /* | ||
73 | * Coprocessor ownership. | ||
74 | */ | ||
75 | |||
76 | coprocessor_info_t coprocessor_info[] = { | ||
77 | { 0, XTENSA_CPE_CP0_OFFSET }, | ||
78 | { 0, XTENSA_CPE_CP1_OFFSET }, | ||
79 | { 0, XTENSA_CPE_CP2_OFFSET }, | ||
80 | { 0, XTENSA_CPE_CP3_OFFSET }, | ||
81 | { 0, XTENSA_CPE_CP4_OFFSET }, | ||
82 | { 0, XTENSA_CPE_CP5_OFFSET }, | ||
83 | { 0, XTENSA_CPE_CP6_OFFSET }, | ||
84 | { 0, XTENSA_CPE_CP7_OFFSET }, | ||
85 | }; | ||
86 | |||
87 | #endif | ||
88 | |||
89 | /* | 69 | /* |
90 | * Powermanagement idle function, if any is provided by the platform. | 70 | * Powermanagement idle function, if any is provided by the platform. |
91 | */ | 71 | */ |
@@ -110,12 +90,10 @@ void cpu_idle(void) | |||
110 | 90 | ||
111 | void exit_thread(void) | 91 | void exit_thread(void) |
112 | { | 92 | { |
113 | release_coprocessors(current); /* Empty macro if no CPs are defined */ | ||
114 | } | 93 | } |
115 | 94 | ||
116 | void flush_thread(void) | 95 | void flush_thread(void) |
117 | { | 96 | { |
118 | release_coprocessors(current); /* Empty macro if no CPs are defined */ | ||
119 | } | 97 | } |
120 | 98 | ||
121 | /* | 99 | /* |
@@ -183,36 +161,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
183 | 161 | ||
184 | 162 | ||
185 | /* | 163 | /* |
186 | * Create a kernel thread | ||
187 | */ | ||
188 | |||
189 | int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | ||
190 | { | ||
191 | long retval; | ||
192 | __asm__ __volatile__ | ||
193 | ("mov a5, %4\n\t" /* preserve fn in a5 */ | ||
194 | "mov a6, %3\n\t" /* preserve and setup arg in a6 */ | ||
195 | "movi a2, %1\n\t" /* load __NR_clone for syscall*/ | ||
196 | "mov a3, sp\n\t" /* sp check and sys_clone */ | ||
197 | "mov a4, %5\n\t" /* load flags for syscall */ | ||
198 | "syscall\n\t" | ||
199 | "beq a3, sp, 1f\n\t" /* branch if parent */ | ||
200 | "callx4 a5\n\t" /* call fn */ | ||
201 | "movi a2, %2\n\t" /* load __NR_exit for syscall */ | ||
202 | "mov a3, a6\n\t" /* load fn return value */ | ||
203 | "syscall\n" | ||
204 | "1:\n\t" | ||
205 | "mov %0, a2\n\t" /* parent returns zero */ | ||
206 | :"=r" (retval) | ||
207 | :"i" (__NR_clone), "i" (__NR_exit), | ||
208 | "r" (arg), "r" (fn), | ||
209 | "r" (flags | CLONE_VM) | ||
210 | : "a2", "a3", "a4", "a5", "a6" ); | ||
211 | return retval; | ||
212 | } | ||
213 | |||
214 | |||
215 | /* | ||
216 | * These bracket the sleeping functions.. | 164 | * These bracket the sleeping functions.. |
217 | */ | 165 | */ |
218 | 166 | ||
@@ -275,7 +223,7 @@ void do_copy_regs (xtensa_gregset_t *elfregs, struct pt_regs *regs, | |||
275 | */ | 223 | */ |
276 | 224 | ||
277 | elfregs->pc = regs->pc; | 225 | elfregs->pc = regs->pc; |
278 | elfregs->ps = (regs->ps & ~XCHAL_PS_EXCM_MASK); | 226 | elfregs->ps = (regs->ps & ~(1 << PS_EXCM_BIT)); |
279 | elfregs->exccause = regs->exccause; | 227 | elfregs->exccause = regs->exccause; |
280 | elfregs->excvaddr = regs->excvaddr; | 228 | elfregs->excvaddr = regs->excvaddr; |
281 | elfregs->windowbase = regs->windowbase; | 229 | elfregs->windowbase = regs->windowbase; |
@@ -325,7 +273,7 @@ void do_restore_regs (xtensa_gregset_t *elfregs, struct pt_regs *regs, | |||
325 | */ | 273 | */ |
326 | 274 | ||
327 | regs->pc = elfregs->pc; | 275 | regs->pc = elfregs->pc; |
328 | regs->ps = (elfregs->ps | XCHAL_PS_EXCM_MASK); | 276 | regs->ps = (elfregs->ps | (1 << PS_EXCM_BIT)); |
329 | regs->exccause = elfregs->exccause; | 277 | regs->exccause = elfregs->exccause; |
330 | regs->excvaddr = elfregs->excvaddr; | 278 | regs->excvaddr = elfregs->excvaddr; |
331 | regs->windowbase = elfregs->windowbase; | 279 | regs->windowbase = elfregs->windowbase; |
@@ -459,16 +407,7 @@ int do_restore_fpregs (elf_fpregset_t *fpregs, struct pt_regs *regs, | |||
459 | int | 407 | int |
460 | dump_task_fpu(struct pt_regs *regs, struct task_struct *task, elf_fpregset_t *r) | 408 | dump_task_fpu(struct pt_regs *regs, struct task_struct *task, elf_fpregset_t *r) |
461 | { | 409 | { |
462 | /* see asm/coprocessor.h for this magic number 16 */ | ||
463 | #if XTENSA_CP_EXTRA_SIZE > 16 | ||
464 | do_save_fpregs (r, regs, task); | ||
465 | |||
466 | /* For now, bit 16 means some extra state may be present: */ | ||
467 | // FIXME!! need to track to return more accurate mask | ||
468 | return 0x10000 | XCHAL_CP_MASK; | ||
469 | #else | ||
470 | return 0; /* no coprocessors active on this processor */ | 410 | return 0; /* no coprocessors active on this processor */ |
471 | #endif | ||
472 | } | 411 | } |
473 | 412 | ||
474 | /* | 413 | /* |
@@ -483,3 +422,44 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *r) | |||
483 | { | 422 | { |
484 | return dump_task_fpu(regs, current, r); | 423 | return dump_task_fpu(regs, current, r); |
485 | } | 424 | } |
425 | |||
426 | asmlinkage | ||
427 | long xtensa_clone(unsigned long clone_flags, unsigned long newsp, | ||
428 | void __user *parent_tid, void *child_tls, | ||
429 | void __user *child_tid, long a5, | ||
430 | struct pt_regs *regs) | ||
431 | { | ||
432 | if (!newsp) | ||
433 | newsp = regs->areg[1]; | ||
434 | return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid); | ||
435 | } | ||
436 | |||
437 | /* | ||
438 | * * xtensa_execve() executes a new program. | ||
439 | * */ | ||
440 | |||
441 | asmlinkage | ||
442 | long xtensa_execve(char __user *name, char __user * __user *argv, | ||
443 | char __user * __user *envp, | ||
444 | long a3, long a4, long a5, | ||
445 | struct pt_regs *regs) | ||
446 | { | ||
447 | long error; | ||
448 | char * filename; | ||
449 | |||
450 | filename = getname(name); | ||
451 | error = PTR_ERR(filename); | ||
452 | if (IS_ERR(filename)) | ||
453 | goto out; | ||
454 | // FIXME: release coprocessor?? | ||
455 | error = do_execve(filename, argv, envp, regs); | ||
456 | if (error == 0) { | ||
457 | task_lock(current); | ||
458 | current->ptrace &= ~PT_DTRACE; | ||
459 | task_unlock(current); | ||
460 | } | ||
461 | putname(filename); | ||
462 | out: | ||
463 | return error; | ||
464 | } | ||
465 | |||
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index 9aea23cc0dc5..8b6d3d0623b6 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c | |||
@@ -96,7 +96,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
96 | /* Note: PS.EXCM is not set while user task is running; | 96 | /* Note: PS.EXCM is not set while user task is running; |
97 | * its being set in regs is for exception handling | 97 | * its being set in regs is for exception handling |
98 | * convenience. */ | 98 | * convenience. */ |
99 | tmp = (regs->ps & ~XCHAL_PS_EXCM_MASK); | 99 | tmp = (regs->ps & ~(1 << PS_EXCM_BIT)); |
100 | break; | 100 | break; |
101 | case REG_WB: | 101 | case REG_WB: |
102 | tmp = regs->windowbase; | 102 | tmp = regs->windowbase; |
@@ -332,12 +332,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
332 | 332 | ||
333 | void do_syscall_trace(void) | 333 | void do_syscall_trace(void) |
334 | { | 334 | { |
335 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | ||
336 | return; | ||
337 | |||
338 | if (!(current->ptrace & PT_PTRACED)) | ||
339 | return; | ||
340 | |||
341 | /* | 335 | /* |
342 | * The 0x80 provides a way for the tracing parent to distinguish | 336 | * The 0x80 provides a way for the tracing parent to distinguish |
343 | * between a syscall stop and SIGTRAP delivery | 337 | * between a syscall stop and SIGTRAP delivery |
@@ -354,3 +348,23 @@ void do_syscall_trace(void) | |||
354 | current->exit_code = 0; | 348 | current->exit_code = 0; |
355 | } | 349 | } |
356 | } | 350 | } |
351 | |||
352 | void do_syscall_trace_enter(struct pt_regs *regs) | ||
353 | { | ||
354 | if (test_thread_flag(TIF_SYSCALL_TRACE) | ||
355 | && (current->ptrace & PT_PTRACED)) | ||
356 | do_syscall_trace(); | ||
357 | |||
358 | #if 0 | ||
359 | if (unlikely(current->audit_context)) | ||
360 | audit_syscall_entry(current, AUDIT_ARCH_XTENSA..); | ||
361 | #endif | ||
362 | } | ||
363 | |||
364 | void do_syscall_trace_leave(struct pt_regs *regs) | ||
365 | { | ||
366 | if ((test_thread_flag(TIF_SYSCALL_TRACE)) | ||
367 | && (current->ptrace & PT_PTRACED)) | ||
368 | do_syscall_trace(); | ||
369 | } | ||
370 | |||
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index c99ab72b41b6..b6374c09de20 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c | |||
@@ -42,8 +42,6 @@ | |||
42 | #include <asm/page.h> | 42 | #include <asm/page.h> |
43 | #include <asm/setup.h> | 43 | #include <asm/setup.h> |
44 | 44 | ||
45 | #include <xtensa/config/system.h> | ||
46 | |||
47 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) | 45 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) |
48 | struct screen_info screen_info = { 0, 24, 0, 0, 0, 80, 0, 0, 0, 24, 1, 16}; | 46 | struct screen_info screen_info = { 0, 24, 0, 0, 0, 80, 0, 0, 0, 24, 1, 16}; |
49 | #endif | 47 | #endif |
@@ -336,7 +334,7 @@ c_show(struct seq_file *f, void *slot) | |||
336 | /* high-level stuff */ | 334 | /* high-level stuff */ |
337 | seq_printf(f,"processor\t: 0\n" | 335 | seq_printf(f,"processor\t: 0\n" |
338 | "vendor_id\t: Tensilica\n" | 336 | "vendor_id\t: Tensilica\n" |
339 | "model\t\t: Xtensa " XCHAL_HW_RELEASE_NAME "\n" | 337 | "model\t\t: Xtensa " XCHAL_HW_VERSION_NAME "\n" |
340 | "core ID\t\t: " XCHAL_CORE_ID "\n" | 338 | "core ID\t\t: " XCHAL_CORE_ID "\n" |
341 | "build ID\t: 0x%x\n" | 339 | "build ID\t: 0x%x\n" |
342 | "byte order\t: %s\n" | 340 | "byte order\t: %s\n" |
@@ -420,25 +418,6 @@ c_show(struct seq_file *f, void *slot) | |||
420 | XCHAL_NUM_TIMERS, | 418 | XCHAL_NUM_TIMERS, |
421 | XCHAL_DEBUGLEVEL); | 419 | XCHAL_DEBUGLEVEL); |
422 | 420 | ||
423 | /* Coprocessors */ | ||
424 | #if XCHAL_HAVE_CP | ||
425 | seq_printf(f, "coprocessors\t: %d\n", XCHAL_CP_NUM); | ||
426 | #else | ||
427 | seq_printf(f, "coprocessors\t: none\n"); | ||
428 | #endif | ||
429 | |||
430 | /* {I,D}{RAM,ROM} and XLMI */ | ||
431 | seq_printf(f,"inst ROMs\t: %d\n" | ||
432 | "inst RAMs\t: %d\n" | ||
433 | "data ROMs\t: %d\n" | ||
434 | "data RAMs\t: %d\n" | ||
435 | "XLMI ports\t: %d\n", | ||
436 | XCHAL_NUM_IROM, | ||
437 | XCHAL_NUM_IRAM, | ||
438 | XCHAL_NUM_DROM, | ||
439 | XCHAL_NUM_DRAM, | ||
440 | XCHAL_NUM_XLMI); | ||
441 | |||
442 | /* Cache */ | 421 | /* Cache */ |
443 | seq_printf(f,"icache line size: %d\n" | 422 | seq_printf(f,"icache line size: %d\n" |
444 | "icache ways\t: %d\n" | 423 | "icache ways\t: %d\n" |
@@ -466,24 +445,6 @@ c_show(struct seq_file *f, void *slot) | |||
466 | XCHAL_DCACHE_WAYS, | 445 | XCHAL_DCACHE_WAYS, |
467 | XCHAL_DCACHE_SIZE); | 446 | XCHAL_DCACHE_SIZE); |
468 | 447 | ||
469 | /* MMU */ | ||
470 | seq_printf(f,"ASID bits\t: %d\n" | ||
471 | "ASID invalid\t: %d\n" | ||
472 | "ASID kernel\t: %d\n" | ||
473 | "rings\t\t: %d\n" | ||
474 | "itlb ways\t: %d\n" | ||
475 | "itlb AR ways\t: %d\n" | ||
476 | "dtlb ways\t: %d\n" | ||
477 | "dtlb AR ways\t: %d\n", | ||
478 | XCHAL_MMU_ASID_BITS, | ||
479 | XCHAL_MMU_ASID_INVALID, | ||
480 | XCHAL_MMU_ASID_KERNEL, | ||
481 | XCHAL_MMU_RINGS, | ||
482 | XCHAL_ITLB_WAYS, | ||
483 | XCHAL_ITLB_ARF_WAYS, | ||
484 | XCHAL_DTLB_WAYS, | ||
485 | XCHAL_DTLB_ARF_WAYS); | ||
486 | |||
487 | return 0; | 448 | return 0; |
488 | } | 449 | } |
489 | 450 | ||
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index c494f0826fc5..c6d9880a4cdb 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c | |||
@@ -12,8 +12,8 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <xtensa/config/core.h> | 15 | #include <asm/variant/core.h> |
16 | #include <xtensa/hal.h> | 16 | #include <asm/coprocessor.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
@@ -46,7 +46,7 @@ extern struct task_struct *coproc_owners[]; | |||
46 | * Atomically swap in the new signal mask, and wait for a signal. | 46 | * Atomically swap in the new signal mask, and wait for a signal. |
47 | */ | 47 | */ |
48 | 48 | ||
49 | int sys_sigsuspend(struct pt_regs *regs) | 49 | int xtensa_sigsuspend(struct pt_regs *regs) |
50 | { | 50 | { |
51 | old_sigset_t mask = (old_sigset_t) regs->areg[3]; | 51 | old_sigset_t mask = (old_sigset_t) regs->areg[3]; |
52 | sigset_t saveset; | 52 | sigset_t saveset; |
@@ -68,7 +68,7 @@ int sys_sigsuspend(struct pt_regs *regs) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | asmlinkage int | 70 | asmlinkage int |
71 | sys_rt_sigsuspend(struct pt_regs *regs) | 71 | xtensa_rt_sigsuspend(struct pt_regs *regs) |
72 | { | 72 | { |
73 | sigset_t *unewset = (sigset_t *) regs->areg[4]; | 73 | sigset_t *unewset = (sigset_t *) regs->areg[4]; |
74 | size_t sigsetsize = (size_t) regs->areg[3]; | 74 | size_t sigsetsize = (size_t) regs->areg[3]; |
@@ -96,7 +96,7 @@ sys_rt_sigsuspend(struct pt_regs *regs) | |||
96 | } | 96 | } |
97 | 97 | ||
98 | asmlinkage int | 98 | asmlinkage int |
99 | sys_sigaction(int sig, const struct old_sigaction *act, | 99 | xtensa_sigaction(int sig, const struct old_sigaction *act, |
100 | struct old_sigaction *oact) | 100 | struct old_sigaction *oact) |
101 | { | 101 | { |
102 | struct k_sigaction new_ka, old_ka; | 102 | struct k_sigaction new_ka, old_ka; |
@@ -128,7 +128,7 @@ sys_sigaction(int sig, const struct old_sigaction *act, | |||
128 | } | 128 | } |
129 | 129 | ||
130 | asmlinkage int | 130 | asmlinkage int |
131 | sys_sigaltstack(struct pt_regs *regs) | 131 | xtensa_sigaltstack(struct pt_regs *regs) |
132 | { | 132 | { |
133 | const stack_t *uss = (stack_t *) regs->areg[4]; | 133 | const stack_t *uss = (stack_t *) regs->areg[4]; |
134 | stack_t *uoss = (stack_t *) regs->areg[3]; | 134 | stack_t *uoss = (stack_t *) regs->areg[3]; |
@@ -216,8 +216,8 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc) | |||
216 | * handler, or the user mode value doesn't matter (e.g. PS.OWB). | 216 | * handler, or the user mode value doesn't matter (e.g. PS.OWB). |
217 | */ | 217 | */ |
218 | err |= __get_user(ps, &sc->sc_ps); | 218 | err |= __get_user(ps, &sc->sc_ps); |
219 | regs->ps = (regs->ps & ~XCHAL_PS_CALLINC_MASK) | 219 | regs->ps = (regs->ps & ~PS_CALLINC_MASK) |
220 | | (ps & XCHAL_PS_CALLINC_MASK); | 220 | | (ps & PS_CALLINC_MASK); |
221 | 221 | ||
222 | /* Additional corruption checks */ | 222 | /* Additional corruption checks */ |
223 | 223 | ||
@@ -280,7 +280,7 @@ flush_my_cpstate(struct task_struct *tsk) | |||
280 | static int | 280 | static int |
281 | save_cpextra (struct _cpstate *buf) | 281 | save_cpextra (struct _cpstate *buf) |
282 | { | 282 | { |
283 | #if (XCHAL_EXTRA_SA_SIZE == 0) && (XCHAL_CP_NUM == 0) | 283 | #if XCHAL_CP_NUM == 0 |
284 | return 0; | 284 | return 0; |
285 | #else | 285 | #else |
286 | 286 | ||
@@ -350,7 +350,7 @@ setup_sigcontext(struct sigcontext *sc, struct _cpstate *cpstate, | |||
350 | return err; | 350 | return err; |
351 | } | 351 | } |
352 | 352 | ||
353 | asmlinkage int sys_sigreturn(struct pt_regs *regs) | 353 | asmlinkage int xtensa_sigreturn(struct pt_regs *regs) |
354 | { | 354 | { |
355 | struct sigframe *frame = (struct sigframe *)regs->areg[1]; | 355 | struct sigframe *frame = (struct sigframe *)regs->areg[1]; |
356 | sigset_t set; | 356 | sigset_t set; |
@@ -382,7 +382,7 @@ badframe: | |||
382 | return 0; | 382 | return 0; |
383 | } | 383 | } |
384 | 384 | ||
385 | asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) | 385 | asmlinkage int xtensa_rt_sigreturn(struct pt_regs *regs) |
386 | { | 386 | { |
387 | struct rt_sigframe *frame = (struct rt_sigframe *)regs->areg[1]; | 387 | struct rt_sigframe *frame = (struct rt_sigframe *)regs->areg[1]; |
388 | sigset_t set; | 388 | sigset_t set; |
@@ -497,8 +497,10 @@ gen_return_code(unsigned char *codemem, unsigned int use_rt_sigreturn) | |||
497 | 497 | ||
498 | /* Flush generated code out of the data cache */ | 498 | /* Flush generated code out of the data cache */ |
499 | 499 | ||
500 | if (err == 0) | 500 | if (err == 0) { |
501 | __flush_invalidate_cache_range((unsigned long)codemem, 6UL); | 501 | __invalidate_icache_range((unsigned long)codemem, 6UL); |
502 | __flush_invalidate_dcache_range((unsigned long)codemem, 6UL); | ||
503 | } | ||
502 | 504 | ||
503 | return err; | 505 | return err; |
504 | } | 506 | } |
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c new file mode 100644 index 000000000000..418268f49766 --- /dev/null +++ b/arch/xtensa/kernel/syscall.c | |||
@@ -0,0 +1,95 @@ | |||
1 | /* | ||
2 | * arch/xtensa/kernel/syscall.c | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | * Copyright (C) 2000 Silicon Graphics, Inc. | ||
10 | * Copyright (C) 1995 - 2000 by Ralf Baechle | ||
11 | * | ||
12 | * Joe Taylor <joe@tensilica.com, joetylr@yahoo.com> | ||
13 | * Marc Gauthier <marc@tensilica.com, marc@alumni.uwaterloo.ca> | ||
14 | * Chris Zankel <chris@zankel.net> | ||
15 | * Kevin Chea | ||
16 | * | ||
17 | */ | ||
18 | #include <asm/uaccess.h> | ||
19 | #include <asm/syscalls.h> | ||
20 | #include <asm/unistd.h> | ||
21 | #include <linux/linkage.h> | ||
22 | #include <linux/stringify.h> | ||
23 | #include <linux/errno.h> | ||
24 | #include <linux/syscalls.h> | ||
25 | #include <linux/file.h> | ||
26 | #include <linux/fs.h> | ||
27 | #include <linux/mman.h> | ||
28 | #include <linux/shm.h> | ||
29 | |||
30 | typedef void (*syscall_t)(void); | ||
31 | |||
32 | syscall_t sys_call_table[__NR_syscall_count] /* FIXME __cacheline_aligned */= { | ||
33 | [0 ... __NR_syscall_count - 1] = (syscall_t)&sys_ni_syscall, | ||
34 | |||
35 | #undef __SYSCALL | ||
36 | #define __SYSCALL(nr,symbol,nargs) [ nr ] = (syscall_t)symbol, | ||
37 | #undef _XTENSA_UNISTD_H | ||
38 | #undef __KERNEL_SYSCALLS__ | ||
39 | #include <asm/unistd.h> | ||
40 | }; | ||
41 | |||
42 | /* | ||
43 | * xtensa_pipe() is the normal C calling standard for creating a pipe. It's not | ||
44 | * the way unix traditional does this, though. | ||
45 | */ | ||
46 | |||
47 | asmlinkage long xtensa_pipe(int __user *userfds) | ||
48 | { | ||
49 | int fd[2]; | ||
50 | int error; | ||
51 | |||
52 | error = do_pipe(fd); | ||
53 | if (!error) { | ||
54 | if (copy_to_user(userfds, fd, 2 * sizeof(int))) | ||
55 | error = -EFAULT; | ||
56 | } | ||
57 | return error; | ||
58 | } | ||
59 | |||
60 | |||
61 | asmlinkage long xtensa_mmap2(unsigned long addr, unsigned long len, | ||
62 | unsigned long prot, unsigned long flags, | ||
63 | unsigned long fd, unsigned long pgoff) | ||
64 | { | ||
65 | int error = -EBADF; | ||
66 | struct file * file = NULL; | ||
67 | |||
68 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | ||
69 | if (!(flags & MAP_ANONYMOUS)) { | ||
70 | file = fget(fd); | ||
71 | if (!file) | ||
72 | goto out; | ||
73 | } | ||
74 | |||
75 | down_write(¤t->mm->mmap_sem); | ||
76 | error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); | ||
77 | up_write(¤t->mm->mmap_sem); | ||
78 | |||
79 | if (file) | ||
80 | fput(file); | ||
81 | out: | ||
82 | return error; | ||
83 | } | ||
84 | |||
85 | asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) | ||
86 | { | ||
87 | unsigned long ret; | ||
88 | long err; | ||
89 | |||
90 | err = do_shmat(shmid, shmaddr, shmflg, &ret); | ||
91 | if (err) | ||
92 | return err; | ||
93 | return (long)ret; | ||
94 | } | ||
95 | |||
diff --git a/arch/xtensa/kernel/syscalls.c b/arch/xtensa/kernel/syscalls.c deleted file mode 100644 index f49cb239e603..000000000000 --- a/arch/xtensa/kernel/syscalls.c +++ /dev/null | |||
@@ -1,288 +0,0 @@ | |||
1 | /* | ||
2 | * arch/xtensa/kernel/syscalls.c | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | * Copyright (C) 2000 Silicon Graphics, Inc. | ||
10 | * Copyright (C) 1995 - 2000 by Ralf Baechle | ||
11 | * | ||
12 | * Joe Taylor <joe@tensilica.com, joetylr@yahoo.com> | ||
13 | * Marc Gauthier <marc@tensilica.com, marc@alumni.uwaterloo.ca> | ||
14 | * Chris Zankel <chris@zankel.net> | ||
15 | * Kevin Chea | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #define DEBUG 0 | ||
20 | |||
21 | #include <linux/linkage.h> | ||
22 | #include <linux/mm.h> | ||
23 | #include <linux/smp.h> | ||
24 | #include <linux/smp_lock.h> | ||
25 | #include <linux/mman.h> | ||
26 | #include <linux/sched.h> | ||
27 | #include <linux/file.h> | ||
28 | #include <linux/slab.h> | ||
29 | #include <linux/utsname.h> | ||
30 | #include <linux/unistd.h> | ||
31 | #include <linux/stringify.h> | ||
32 | #include <linux/syscalls.h> | ||
33 | #include <linux/sem.h> | ||
34 | #include <linux/msg.h> | ||
35 | #include <linux/shm.h> | ||
36 | #include <linux/errno.h> | ||
37 | #include <asm/ptrace.h> | ||
38 | #include <asm/signal.h> | ||
39 | #include <asm/uaccess.h> | ||
40 | #include <asm/hardirq.h> | ||
41 | #include <asm/mman.h> | ||
42 | #include <asm/shmparam.h> | ||
43 | #include <asm/page.h> | ||
44 | |||
45 | extern void do_syscall_trace(void); | ||
46 | typedef int (*syscall_t)(void *a0,...); | ||
47 | extern syscall_t sys_call_table[]; | ||
48 | extern unsigned char sys_narg_table[]; | ||
49 | |||
50 | /* | ||
51 | * sys_pipe() is the normal C calling standard for creating a pipe. It's not | ||
52 | * the way unix traditional does this, though. | ||
53 | */ | ||
54 | |||
55 | int sys_pipe(int __user *userfds) | ||
56 | { | ||
57 | int fd[2]; | ||
58 | int error; | ||
59 | |||
60 | error = do_pipe(fd); | ||
61 | if (!error) { | ||
62 | if (copy_to_user(userfds, fd, 2 * sizeof(int))) | ||
63 | error = -EFAULT; | ||
64 | } | ||
65 | return error; | ||
66 | } | ||
67 | |||
68 | /* | ||
69 | * Common code for old and new mmaps. | ||
70 | */ | ||
71 | long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, | ||
72 | unsigned long flags, unsigned long fd, unsigned long pgoff) | ||
73 | { | ||
74 | int error = -EBADF; | ||
75 | struct file * file = NULL; | ||
76 | |||
77 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | ||
78 | if (!(flags & MAP_ANONYMOUS)) { | ||
79 | file = fget(fd); | ||
80 | if (!file) | ||
81 | goto out; | ||
82 | } | ||
83 | |||
84 | down_write(¤t->mm->mmap_sem); | ||
85 | error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); | ||
86 | up_write(¤t->mm->mmap_sem); | ||
87 | |||
88 | if (file) | ||
89 | fput(file); | ||
90 | out: | ||
91 | return error; | ||
92 | } | ||
93 | |||
94 | int sys_clone(struct pt_regs *regs) | ||
95 | { | ||
96 | unsigned long clone_flags; | ||
97 | unsigned long newsp; | ||
98 | int __user *parent_tidptr, *child_tidptr; | ||
99 | clone_flags = regs->areg[4]; | ||
100 | newsp = regs->areg[3]; | ||
101 | parent_tidptr = (int __user *)regs->areg[5]; | ||
102 | child_tidptr = (int __user *)regs->areg[6]; | ||
103 | if (!newsp) | ||
104 | newsp = regs->areg[1]; | ||
105 | return do_fork(clone_flags,newsp,regs,0,parent_tidptr,child_tidptr); | ||
106 | } | ||
107 | |||
108 | /* | ||
109 | * sys_execve() executes a new program. | ||
110 | */ | ||
111 | |||
112 | int sys_execve(struct pt_regs *regs) | ||
113 | { | ||
114 | int error; | ||
115 | char * filename; | ||
116 | |||
117 | filename = getname((char *) (long)regs->areg[5]); | ||
118 | error = PTR_ERR(filename); | ||
119 | if (IS_ERR(filename)) | ||
120 | goto out; | ||
121 | error = do_execve(filename, (char **) (long)regs->areg[3], | ||
122 | (char **) (long)regs->areg[4], regs); | ||
123 | putname(filename); | ||
124 | |||
125 | out: | ||
126 | return error; | ||
127 | } | ||
128 | |||
129 | int sys_uname(struct old_utsname * name) | ||
130 | { | ||
131 | if (name && !copy_to_user(name, utsname(), sizeof (*name))) | ||
132 | return 0; | ||
133 | return -EFAULT; | ||
134 | } | ||
135 | |||
136 | /* | ||
137 | * Build the string table for the builtin "poor man's strace". | ||
138 | */ | ||
139 | |||
140 | #if DEBUG | ||
141 | #define SYSCALL(fun, narg) #fun, | ||
142 | static char *sfnames[] = { | ||
143 | #include "syscalls.h" | ||
144 | }; | ||
145 | #undef SYS | ||
146 | #endif | ||
147 | |||
148 | void system_call (struct pt_regs *regs) | ||
149 | { | ||
150 | syscall_t syscall; | ||
151 | unsigned long parm0, parm1, parm2, parm3, parm4, parm5; | ||
152 | int nargs, res; | ||
153 | unsigned int syscallnr; | ||
154 | int ps; | ||
155 | |||
156 | #if DEBUG | ||
157 | int i; | ||
158 | unsigned long parms[6]; | ||
159 | char *sysname; | ||
160 | #endif | ||
161 | |||
162 | regs->syscall = regs->areg[2]; | ||
163 | |||
164 | do_syscall_trace(); | ||
165 | |||
166 | /* Have to load after syscall_trace because strace | ||
167 | * sometimes changes regs->syscall. | ||
168 | */ | ||
169 | syscallnr = regs->syscall; | ||
170 | |||
171 | parm0 = parm1 = parm2 = parm3 = parm4 = parm5 = 0; | ||
172 | |||
173 | /* Restore interrupt level to syscall invoker's. | ||
174 | * If this were in assembly, we wouldn't disable | ||
175 | * interrupts in the first place: | ||
176 | */ | ||
177 | local_save_flags (ps); | ||
178 | local_irq_restore((ps & ~XCHAL_PS_INTLEVEL_MASK) | | ||
179 | (regs->ps & XCHAL_PS_INTLEVEL_MASK) ); | ||
180 | |||
181 | if (syscallnr > __NR_Linux_syscalls) { | ||
182 | regs->areg[2] = -ENOSYS; | ||
183 | return; | ||
184 | } | ||
185 | |||
186 | syscall = sys_call_table[syscallnr]; | ||
187 | nargs = sys_narg_table[syscallnr]; | ||
188 | |||
189 | if (syscall == NULL) { | ||
190 | regs->areg[2] = -ENOSYS; | ||
191 | return; | ||
192 | } | ||
193 | |||
194 | /* There shouldn't be more than six arguments in the table! */ | ||
195 | |||
196 | if (nargs > 6) | ||
197 | panic("Internal error - too many syscall arguments (%d)!\n", | ||
198 | nargs); | ||
199 | |||
200 | /* Linux takes system-call arguments in registers. The ABI | ||
201 | * and Xtensa software conventions require the system-call | ||
202 | * number in a2. If an argument exists in a2, we move it to | ||
203 | * the next available register. Note that for improved | ||
204 | * efficiency, we do NOT shift all parameters down one | ||
205 | * register to maintain the original order. | ||
206 | * | ||
207 | * At best case (zero arguments), we just write the syscall | ||
208 | * number to a2. At worst case (1 to 6 arguments), we move | ||
209 | * the argument in a2 to the next available register, then | ||
210 | * write the syscall number to a2. | ||
211 | * | ||
212 | * For clarity, the following truth table enumerates all | ||
213 | * possibilities. | ||
214 | * | ||
215 | * arguments syscall number arg0, arg1, arg2, arg3, arg4, arg5 | ||
216 | * --------- -------------- ---------------------------------- | ||
217 | * 0 a2 | ||
218 | * 1 a2 a3 | ||
219 | * 2 a2 a4, a3 | ||
220 | * 3 a2 a5, a3, a4 | ||
221 | * 4 a2 a6, a3, a4, a5 | ||
222 | * 5 a2 a7, a3, a4, a5, a6 | ||
223 | * 6 a2 a8, a3, a4, a5, a6, a7 | ||
224 | */ | ||
225 | if (nargs) { | ||
226 | parm0 = regs->areg[nargs+2]; | ||
227 | parm1 = regs->areg[3]; | ||
228 | parm2 = regs->areg[4]; | ||
229 | parm3 = regs->areg[5]; | ||
230 | parm4 = regs->areg[6]; | ||
231 | parm5 = regs->areg[7]; | ||
232 | } else /* nargs == 0 */ | ||
233 | parm0 = (unsigned long) regs; | ||
234 | |||
235 | #if DEBUG | ||
236 | parms[0] = parm0; | ||
237 | parms[1] = parm1; | ||
238 | parms[2] = parm2; | ||
239 | parms[3] = parm3; | ||
240 | parms[4] = parm4; | ||
241 | parms[5] = parm5; | ||
242 | |||
243 | sysname = sfnames[syscallnr]; | ||
244 | if (strncmp(sysname, "sys_", 4) == 0) | ||
245 | sysname = sysname + 4; | ||
246 | |||
247 | printk("\017SYSCALL:I:%x:%d:%s %s(", regs->pc, current->pid, | ||
248 | current->comm, sysname); | ||
249 | for (i = 0; i < nargs; i++) | ||
250 | printk((i>0) ? ", %#lx" : "%#lx", parms[i]); | ||
251 | printk(")\n"); | ||
252 | #endif | ||
253 | |||
254 | res = syscall((void *)parm0, parm1, parm2, parm3, parm4, parm5); | ||
255 | |||
256 | #if DEBUG | ||
257 | printk("\017SYSCALL:O:%d:%s %s(",current->pid, current->comm, sysname); | ||
258 | for (i = 0; i < nargs; i++) | ||
259 | printk((i>0) ? ", %#lx" : "%#lx", parms[i]); | ||
260 | if (res < 4096) | ||
261 | printk(") = %d\n", res); | ||
262 | else | ||
263 | printk(") = %#x\n", res); | ||
264 | #endif /* DEBUG */ | ||
265 | |||
266 | regs->areg[2] = res; | ||
267 | do_syscall_trace(); | ||
268 | } | ||
269 | |||
270 | /* | ||
271 | * Do a system call from kernel instead of calling sys_execve so we | ||
272 | * end up with proper pt_regs. | ||
273 | */ | ||
274 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | ||
275 | { | ||
276 | long __res; | ||
277 | asm volatile ( | ||
278 | " mov a5, %2 \n" | ||
279 | " mov a4, %4 \n" | ||
280 | " mov a3, %3 \n" | ||
281 | " movi a2, %1 \n" | ||
282 | " syscall \n" | ||
283 | " mov %0, a2 \n" | ||
284 | : "=a" (__res) | ||
285 | : "i" (__NR_execve), "a" (filename), "a" (argv), "a" (envp) | ||
286 | : "a2", "a3", "a4", "a5"); | ||
287 | return __res; | ||
288 | } | ||
diff --git a/arch/xtensa/kernel/syscalls.h b/arch/xtensa/kernel/syscalls.h deleted file mode 100644 index 216c10a31501..000000000000 --- a/arch/xtensa/kernel/syscalls.h +++ /dev/null | |||
@@ -1,247 +0,0 @@ | |||
1 | /* | ||
2 | * arch/xtensa/kernel/syscalls.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 1995, 1996, 1997, 1998 by Ralf Baechle | ||
9 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
10 | * | ||
11 | * Changes by Joe Taylor <joe@tensilica.com> | ||
12 | */ | ||
13 | |||
14 | /* | ||
15 | * This file is being included twice - once to build a list of all | ||
16 | * syscalls and once to build a table of how many arguments each syscall | ||
17 | * accepts. Syscalls that receive a pointer to the saved registers are | ||
18 | * marked as having zero arguments. | ||
19 | * | ||
20 | * The binary compatibility calls are in a separate list. | ||
21 | * | ||
22 | * Entry '0' used to be system_call. It's removed to disable indirect | ||
23 | * system calls for now so user tasks can't recurse. See mips' | ||
24 | * sys_syscall for a comparable example. | ||
25 | */ | ||
26 | |||
27 | SYSCALL(0, 0) /* 00 */ | ||
28 | SYSCALL(sys_exit, 1) | ||
29 | SYSCALL(sys_ni_syscall, 0) | ||
30 | SYSCALL(sys_read, 3) | ||
31 | SYSCALL(sys_write, 3) | ||
32 | SYSCALL(sys_open, 3) /* 05 */ | ||
33 | SYSCALL(sys_close, 1) | ||
34 | SYSCALL(sys_ni_syscall, 3) | ||
35 | SYSCALL(sys_creat, 2) | ||
36 | SYSCALL(sys_link, 2) | ||
37 | SYSCALL(sys_unlink, 1) /* 10 */ | ||
38 | SYSCALL(sys_execve, 0) | ||
39 | SYSCALL(sys_chdir, 1) | ||
40 | SYSCALL(sys_ni_syscall, 1) | ||
41 | SYSCALL(sys_mknod, 3) | ||
42 | SYSCALL(sys_chmod, 2) /* 15 */ | ||
43 | SYSCALL(sys_lchown, 3) | ||
44 | SYSCALL(sys_ni_syscall, 0) | ||
45 | SYSCALL(sys_newstat, 2) | ||
46 | SYSCALL(sys_lseek, 3) | ||
47 | SYSCALL(sys_getpid, 0) /* 20 */ | ||
48 | SYSCALL(sys_mount, 5) | ||
49 | SYSCALL(sys_ni_syscall, 1) | ||
50 | SYSCALL(sys_setuid, 1) | ||
51 | SYSCALL(sys_getuid, 0) | ||
52 | SYSCALL(sys_ni_syscall, 1) /* 25 */ | ||
53 | SYSCALL(sys_ptrace, 4) | ||
54 | SYSCALL(sys_ni_syscall, 1) | ||
55 | SYSCALL(sys_newfstat, 2) | ||
56 | SYSCALL(sys_ni_syscall, 0) | ||
57 | SYSCALL(sys_utime, 2) /* 30 */ | ||
58 | SYSCALL(sys_ni_syscall, 0) | ||
59 | SYSCALL(sys_ni_syscall, 0) | ||
60 | SYSCALL(sys_access, 2) | ||
61 | SYSCALL(sys_ni_syscall, 1) | ||
62 | SYSCALL(sys_ni_syscall, 0) /* 35 */ | ||
63 | SYSCALL(sys_sync, 0) | ||
64 | SYSCALL(sys_kill, 2) | ||
65 | SYSCALL(sys_rename, 2) | ||
66 | SYSCALL(sys_mkdir, 2) | ||
67 | SYSCALL(sys_rmdir, 1) /* 40 */ | ||
68 | SYSCALL(sys_dup, 1) | ||
69 | SYSCALL(sys_pipe, 1) | ||
70 | SYSCALL(sys_times, 1) | ||
71 | SYSCALL(sys_ni_syscall, 0) | ||
72 | SYSCALL(sys_brk, 1) /* 45 */ | ||
73 | SYSCALL(sys_setgid, 1) | ||
74 | SYSCALL(sys_getgid, 0) | ||
75 | SYSCALL(sys_ni_syscall, 0) | ||
76 | SYSCALL(sys_geteuid, 0) | ||
77 | SYSCALL(sys_getegid, 0) /* 50 */ | ||
78 | SYSCALL(sys_acct, 1) | ||
79 | SYSCALL(sys_umount, 2) | ||
80 | SYSCALL(sys_ni_syscall, 0) | ||
81 | SYSCALL(sys_ioctl, 3) | ||
82 | SYSCALL(sys_fcntl, 3) /* 55 */ | ||
83 | SYSCALL(sys_ni_syscall, 2) | ||
84 | SYSCALL(sys_setpgid, 2) | ||
85 | SYSCALL(sys_ni_syscall, 0) | ||
86 | SYSCALL(sys_ni_syscall, 0) | ||
87 | SYSCALL(sys_umask, 1) /* 60 */ | ||
88 | SYSCALL(sys_chroot, 1) | ||
89 | SYSCALL(sys_ustat, 2) | ||
90 | SYSCALL(sys_dup2, 2) | ||
91 | SYSCALL(sys_getppid, 0) | ||
92 | SYSCALL(sys_ni_syscall, 0) /* 65 */ | ||
93 | SYSCALL(sys_setsid, 0) | ||
94 | SYSCALL(sys_sigaction, 3) | ||
95 | SYSCALL(sys_ni_syscall, 0) | ||
96 | SYSCALL(sys_ni_syscall, 1) | ||
97 | SYSCALL(sys_setreuid, 2) /* 70 */ | ||
98 | SYSCALL(sys_setregid, 2) | ||
99 | SYSCALL(sys_sigsuspend, 0) | ||
100 | SYSCALL(sys_ni_syscall, 1) | ||
101 | SYSCALL(sys_sethostname, 2) | ||
102 | SYSCALL(sys_setrlimit, 2) /* 75 */ | ||
103 | SYSCALL(sys_getrlimit, 2) | ||
104 | SYSCALL(sys_getrusage, 2) | ||
105 | SYSCALL(sys_gettimeofday, 2) | ||
106 | SYSCALL(sys_settimeofday, 2) | ||
107 | SYSCALL(sys_getgroups, 2) /* 80 */ | ||
108 | SYSCALL(sys_setgroups, 2) | ||
109 | SYSCALL(sys_ni_syscall, 0) | ||
110 | SYSCALL(sys_symlink, 2) | ||
111 | SYSCALL(sys_newlstat, 2) | ||
112 | SYSCALL(sys_readlink, 3) /* 85 */ | ||
113 | SYSCALL(sys_uselib, 1) | ||
114 | SYSCALL(sys_swapon, 2) | ||
115 | SYSCALL(sys_reboot, 3) | ||
116 | SYSCALL(sys_ni_syscall, 3) | ||
117 | SYSCALL(sys_ni_syscall, 6) /* 90 */ | ||
118 | SYSCALL(sys_munmap, 2) | ||
119 | SYSCALL(sys_truncate, 2) | ||
120 | SYSCALL(sys_ftruncate, 2) | ||
121 | SYSCALL(sys_fchmod, 2) | ||
122 | SYSCALL(sys_fchown, 3) /* 95 */ | ||
123 | SYSCALL(sys_getpriority, 2) | ||
124 | SYSCALL(sys_setpriority, 3) | ||
125 | SYSCALL(sys_ni_syscall, 0) | ||
126 | SYSCALL(sys_statfs, 2) | ||
127 | SYSCALL(sys_fstatfs, 2) /* 100 */ | ||
128 | SYSCALL(sys_ni_syscall, 3) | ||
129 | SYSCALL(sys_ni_syscall, 2) | ||
130 | SYSCALL(sys_syslog, 3) | ||
131 | SYSCALL(sys_setitimer, 3) | ||
132 | SYSCALL(sys_getitimer, 2) /* 105 */ | ||
133 | SYSCALL(sys_newstat, 2) | ||
134 | SYSCALL(sys_newlstat, 2) | ||
135 | SYSCALL(sys_newfstat, 2) | ||
136 | SYSCALL(sys_uname, 1) | ||
137 | SYSCALL(sys_ni_syscall, 0) /* 110 */ | ||
138 | SYSCALL(sys_vhangup, 0) | ||
139 | SYSCALL(sys_ni_syscall, 0) | ||
140 | SYSCALL(sys_ni_syscall, 0) | ||
141 | SYSCALL(sys_wait4, 4) | ||
142 | SYSCALL(sys_swapoff, 1) /* 115 */ | ||
143 | SYSCALL(sys_sysinfo, 1) | ||
144 | SYSCALL(sys_ni_syscall, 0) | ||
145 | SYSCALL(sys_fsync, 1) | ||
146 | SYSCALL(sys_sigreturn, 0) | ||
147 | SYSCALL(sys_clone, 0) /* 120 */ | ||
148 | SYSCALL(sys_setdomainname, 2) | ||
149 | SYSCALL(sys_newuname, 1) | ||
150 | SYSCALL(sys_ni_syscall, 0) | ||
151 | SYSCALL(sys_adjtimex, 1) | ||
152 | SYSCALL(sys_mprotect, 3) /* 125 */ | ||
153 | SYSCALL(sys_ni_syscall, 3) | ||
154 | SYSCALL(sys_ni_syscall, 2) | ||
155 | SYSCALL(sys_init_module, 2) | ||
156 | SYSCALL(sys_delete_module, 1) | ||
157 | SYSCALL(sys_ni_syscall, 1) /* 130 */ | ||
158 | SYSCALL(sys_quotactl, 0) | ||
159 | SYSCALL(sys_getpgid, 1) | ||
160 | SYSCALL(sys_fchdir, 1) | ||
161 | SYSCALL(sys_bdflush, 2) | ||
162 | SYSCALL(sys_sysfs, 3) /* 135 */ | ||
163 | SYSCALL(sys_personality, 1) | ||
164 | SYSCALL(sys_ni_syscall, 0) | ||
165 | SYSCALL(sys_setfsuid, 1) | ||
166 | SYSCALL(sys_setfsgid, 1) | ||
167 | SYSCALL(sys_llseek, 5) /* 140 */ | ||
168 | SYSCALL(sys_getdents, 3) | ||
169 | SYSCALL(sys_select, 5) | ||
170 | SYSCALL(sys_flock, 2) | ||
171 | SYSCALL(sys_msync, 3) | ||
172 | SYSCALL(sys_readv, 3) /* 145 */ | ||
173 | SYSCALL(sys_writev, 3) | ||
174 | SYSCALL(sys_ni_syscall, 3) | ||
175 | SYSCALL(sys_ni_syscall, 3) | ||
176 | SYSCALL(sys_ni_syscall, 4) /* handled in fast syscall handler. */ | ||
177 | SYSCALL(sys_ni_syscall, 0) /* 150 */ | ||
178 | SYSCALL(sys_getsid, 1) | ||
179 | SYSCALL(sys_fdatasync, 1) | ||
180 | SYSCALL(sys_sysctl, 1) | ||
181 | SYSCALL(sys_mlock, 2) | ||
182 | SYSCALL(sys_munlock, 2) /* 155 */ | ||
183 | SYSCALL(sys_mlockall, 1) | ||
184 | SYSCALL(sys_munlockall, 0) | ||
185 | SYSCALL(sys_sched_setparam,2) | ||
186 | SYSCALL(sys_sched_getparam,2) | ||
187 | SYSCALL(sys_sched_setscheduler,3) /* 160 */ | ||
188 | SYSCALL(sys_sched_getscheduler,1) | ||
189 | SYSCALL(sys_sched_yield,0) | ||
190 | SYSCALL(sys_sched_get_priority_max,1) | ||
191 | SYSCALL(sys_sched_get_priority_min,1) | ||
192 | SYSCALL(sys_sched_rr_get_interval,2) /* 165 */ | ||
193 | SYSCALL(sys_nanosleep,2) | ||
194 | SYSCALL(sys_mremap,4) | ||
195 | SYSCALL(sys_accept, 3) | ||
196 | SYSCALL(sys_bind, 3) | ||
197 | SYSCALL(sys_connect, 3) /* 170 */ | ||
198 | SYSCALL(sys_getpeername, 3) | ||
199 | SYSCALL(sys_getsockname, 3) | ||
200 | SYSCALL(sys_getsockopt, 5) | ||
201 | SYSCALL(sys_listen, 2) | ||
202 | SYSCALL(sys_recv, 4) /* 175 */ | ||
203 | SYSCALL(sys_recvfrom, 6) | ||
204 | SYSCALL(sys_recvmsg, 3) | ||
205 | SYSCALL(sys_send, 4) | ||
206 | SYSCALL(sys_sendmsg, 3) | ||
207 | SYSCALL(sys_sendto, 6) /* 180 */ | ||
208 | SYSCALL(sys_setsockopt, 5) | ||
209 | SYSCALL(sys_shutdown, 2) | ||
210 | SYSCALL(sys_socket, 3) | ||
211 | SYSCALL(sys_socketpair, 4) | ||
212 | SYSCALL(sys_setresuid, 3) /* 185 */ | ||
213 | SYSCALL(sys_getresuid, 3) | ||
214 | SYSCALL(sys_ni_syscall, 5) | ||
215 | SYSCALL(sys_poll, 3) | ||
216 | SYSCALL(sys_nfsservctl, 3) | ||
217 | SYSCALL(sys_setresgid, 3) /* 190 */ | ||
218 | SYSCALL(sys_getresgid, 3) | ||
219 | SYSCALL(sys_prctl, 5) | ||
220 | SYSCALL(sys_rt_sigreturn, 0) | ||
221 | SYSCALL(sys_rt_sigaction, 4) | ||
222 | SYSCALL(sys_rt_sigprocmask, 4) /* 195 */ | ||
223 | SYSCALL(sys_rt_sigpending, 2) | ||
224 | SYSCALL(sys_rt_sigtimedwait, 4) | ||
225 | SYSCALL(sys_rt_sigqueueinfo, 3) | ||
226 | SYSCALL(sys_rt_sigsuspend, 0) | ||
227 | SYSCALL(sys_pread64, 5) /* 200 */ | ||
228 | SYSCALL(sys_pwrite64, 5) | ||
229 | SYSCALL(sys_chown, 3) | ||
230 | SYSCALL(sys_getcwd, 2) | ||
231 | SYSCALL(sys_capget, 2) | ||
232 | SYSCALL(sys_capset, 2) /* 205 */ | ||
233 | SYSCALL(sys_sigaltstack, 0) | ||
234 | SYSCALL(sys_sendfile, 4) | ||
235 | SYSCALL(sys_ni_syscall, 0) | ||
236 | SYSCALL(sys_ni_syscall, 0) | ||
237 | SYSCALL(sys_mmap, 6) /* 210 */ | ||
238 | SYSCALL(sys_truncate64, 2) | ||
239 | SYSCALL(sys_ftruncate64, 2) | ||
240 | SYSCALL(sys_stat64, 2) | ||
241 | SYSCALL(sys_lstat64, 2) | ||
242 | SYSCALL(sys_fstat64, 2) /* 215 */ | ||
243 | SYSCALL(sys_pivot_root, 2) | ||
244 | SYSCALL(sys_mincore, 3) | ||
245 | SYSCALL(sys_madvise, 3) | ||
246 | SYSCALL(sys_getdents64, 3) | ||
247 | SYSCALL(sys_ni_syscall, 0) /* 220 */ | ||
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index 37347e369987..a350431363a0 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c | |||
@@ -47,7 +47,7 @@ unsigned long long sched_clock(void) | |||
47 | return (unsigned long long)jiffies * (1000000000 / HZ); | 47 | return (unsigned long long)jiffies * (1000000000 / HZ); |
48 | } | 48 | } |
49 | 49 | ||
50 | static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 50 | static irqreturn_t timer_interrupt(int irq, void *dev_id); |
51 | static struct irqaction timer_irqaction = { | 51 | static struct irqaction timer_irqaction = { |
52 | .handler = timer_interrupt, | 52 | .handler = timer_interrupt, |
53 | .flags = IRQF_DISABLED, | 53 | .flags = IRQF_DISABLED, |
@@ -150,7 +150,7 @@ EXPORT_SYMBOL(do_gettimeofday); | |||
150 | * The timer interrupt is called HZ times per second. | 150 | * The timer interrupt is called HZ times per second. |
151 | */ | 151 | */ |
152 | 152 | ||
153 | irqreturn_t timer_interrupt (int irq, void *dev_id, struct pt_regs *regs) | 153 | irqreturn_t timer_interrupt (int irq, void *dev_id) |
154 | { | 154 | { |
155 | 155 | ||
156 | unsigned long next; | 156 | unsigned long next; |
@@ -160,9 +160,9 @@ irqreturn_t timer_interrupt (int irq, void *dev_id, struct pt_regs *regs) | |||
160 | again: | 160 | again: |
161 | while ((signed long)(get_ccount() - next) > 0) { | 161 | while ((signed long)(get_ccount() - next) > 0) { |
162 | 162 | ||
163 | profile_tick(CPU_PROFILING, regs); | 163 | profile_tick(CPU_PROFILING); |
164 | #ifndef CONFIG_SMP | 164 | #ifndef CONFIG_SMP |
165 | update_process_times(user_mode(regs)); | 165 | update_process_times(user_mode(get_irq_regs())); |
166 | #endif | 166 | #endif |
167 | 167 | ||
168 | write_seqlock(&xtime_lock); | 168 | write_seqlock(&xtime_lock); |
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index ce077d6bf3a0..693ab268485e 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c | |||
@@ -75,7 +75,7 @@ extern void system_call (struct pt_regs*); | |||
75 | #define USER 0x02 | 75 | #define USER 0x02 |
76 | 76 | ||
77 | #define COPROCESSOR(x) \ | 77 | #define COPROCESSOR(x) \ |
78 | { XCHAL_EXCCAUSE_COPROCESSOR ## x ## _DISABLED, USER, fast_coprocessor } | 78 | { EXCCAUSE_COPROCESSOR ## x ## _DISABLED, USER, fast_coprocessor } |
79 | 79 | ||
80 | typedef struct { | 80 | typedef struct { |
81 | int cause; | 81 | int cause; |
@@ -85,38 +85,38 @@ typedef struct { | |||
85 | 85 | ||
86 | dispatch_init_table_t __init dispatch_init_table[] = { | 86 | dispatch_init_table_t __init dispatch_init_table[] = { |
87 | 87 | ||
88 | { XCHAL_EXCCAUSE_ILLEGAL_INSTRUCTION, 0, do_illegal_instruction}, | 88 | { EXCCAUSE_ILLEGAL_INSTRUCTION, 0, do_illegal_instruction}, |
89 | { XCHAL_EXCCAUSE_SYSTEM_CALL, KRNL, fast_syscall_kernel }, | 89 | { EXCCAUSE_SYSTEM_CALL, KRNL, fast_syscall_kernel }, |
90 | { XCHAL_EXCCAUSE_SYSTEM_CALL, USER, fast_syscall_user }, | 90 | { EXCCAUSE_SYSTEM_CALL, USER, fast_syscall_user }, |
91 | { XCHAL_EXCCAUSE_SYSTEM_CALL, 0, system_call }, | 91 | { EXCCAUSE_SYSTEM_CALL, 0, system_call }, |
92 | /* XCHAL_EXCCAUSE_INSTRUCTION_FETCH unhandled */ | 92 | /* EXCCAUSE_INSTRUCTION_FETCH unhandled */ |
93 | /* XCHAL_EXCCAUSE_LOAD_STORE_ERROR unhandled*/ | 93 | /* EXCCAUSE_LOAD_STORE_ERROR unhandled*/ |
94 | { XCHAL_EXCCAUSE_LEVEL1_INTERRUPT, 0, do_interrupt }, | 94 | { EXCCAUSE_LEVEL1_INTERRUPT, 0, do_interrupt }, |
95 | { XCHAL_EXCCAUSE_ALLOCA, USER|KRNL, fast_alloca }, | 95 | { EXCCAUSE_ALLOCA, USER|KRNL, fast_alloca }, |
96 | /* XCHAL_EXCCAUSE_INTEGER_DIVIDE_BY_ZERO unhandled */ | 96 | /* EXCCAUSE_INTEGER_DIVIDE_BY_ZERO unhandled */ |
97 | /* XCHAL_EXCCAUSE_PRIVILEGED unhandled */ | 97 | /* EXCCAUSE_PRIVILEGED unhandled */ |
98 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION | 98 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION |
99 | #ifdef CONFIG_UNALIGNED_USER | 99 | #ifdef CONFIG_UNALIGNED_USER |
100 | { XCHAL_EXCCAUSE_UNALIGNED, USER, fast_unaligned }, | 100 | { EXCCAUSE_UNALIGNED, USER, fast_unaligned }, |
101 | #else | 101 | #else |
102 | { XCHAL_EXCCAUSE_UNALIGNED, 0, do_unaligned_user }, | 102 | { EXCCAUSE_UNALIGNED, 0, do_unaligned_user }, |
103 | #endif | 103 | #endif |
104 | { XCHAL_EXCCAUSE_UNALIGNED, KRNL, fast_unaligned }, | 104 | { EXCCAUSE_UNALIGNED, KRNL, fast_unaligned }, |
105 | #endif | 105 | #endif |
106 | { XCHAL_EXCCAUSE_ITLB_MISS, 0, do_page_fault }, | 106 | { EXCCAUSE_ITLB_MISS, 0, do_page_fault }, |
107 | { XCHAL_EXCCAUSE_ITLB_MISS, USER|KRNL, fast_second_level_miss}, | 107 | { EXCCAUSE_ITLB_MISS, USER|KRNL, fast_second_level_miss}, |
108 | { XCHAL_EXCCAUSE_ITLB_MULTIHIT, 0, do_multihit }, | 108 | { EXCCAUSE_ITLB_MULTIHIT, 0, do_multihit }, |
109 | { XCHAL_EXCCAUSE_ITLB_PRIVILEGE, 0, do_page_fault }, | 109 | { EXCCAUSE_ITLB_PRIVILEGE, 0, do_page_fault }, |
110 | /* XCHAL_EXCCAUSE_SIZE_RESTRICTION unhandled */ | 110 | /* EXCCAUSE_SIZE_RESTRICTION unhandled */ |
111 | { XCHAL_EXCCAUSE_FETCH_CACHE_ATTRIBUTE, 0, do_page_fault }, | 111 | { EXCCAUSE_FETCH_CACHE_ATTRIBUTE, 0, do_page_fault }, |
112 | { XCHAL_EXCCAUSE_DTLB_MISS, USER|KRNL, fast_second_level_miss}, | 112 | { EXCCAUSE_DTLB_MISS, USER|KRNL, fast_second_level_miss}, |
113 | { XCHAL_EXCCAUSE_DTLB_MISS, 0, do_page_fault }, | 113 | { EXCCAUSE_DTLB_MISS, 0, do_page_fault }, |
114 | { XCHAL_EXCCAUSE_DTLB_MULTIHIT, 0, do_multihit }, | 114 | { EXCCAUSE_DTLB_MULTIHIT, 0, do_multihit }, |
115 | { XCHAL_EXCCAUSE_DTLB_PRIVILEGE, 0, do_page_fault }, | 115 | { EXCCAUSE_DTLB_PRIVILEGE, 0, do_page_fault }, |
116 | /* XCHAL_EXCCAUSE_DTLB_SIZE_RESTRICTION unhandled */ | 116 | /* EXCCAUSE_DTLB_SIZE_RESTRICTION unhandled */ |
117 | { XCHAL_EXCCAUSE_STORE_CACHE_ATTRIBUTE, USER|KRNL, fast_store_prohibited }, | 117 | { EXCCAUSE_STORE_CACHE_ATTRIBUTE, USER|KRNL, fast_store_prohibited }, |
118 | { XCHAL_EXCCAUSE_STORE_CACHE_ATTRIBUTE, 0, do_page_fault }, | 118 | { EXCCAUSE_STORE_CACHE_ATTRIBUTE, 0, do_page_fault }, |
119 | { XCHAL_EXCCAUSE_LOAD_CACHE_ATTRIBUTE, 0, do_page_fault }, | 119 | { EXCCAUSE_LOAD_CACHE_ATTRIBUTE, 0, do_page_fault }, |
120 | /* XCCHAL_EXCCAUSE_FLOATING_POINT unhandled */ | 120 | /* XCCHAL_EXCCAUSE_FLOATING_POINT unhandled */ |
121 | #if (XCHAL_CP_MASK & 1) | 121 | #if (XCHAL_CP_MASK & 1) |
122 | COPROCESSOR(0), | 122 | COPROCESSOR(0), |
diff --git a/arch/xtensa/kernel/vectors.S b/arch/xtensa/kernel/vectors.S index 0e74397bfa2b..eb2d7bb69ee0 100644 --- a/arch/xtensa/kernel/vectors.S +++ b/arch/xtensa/kernel/vectors.S | |||
@@ -53,6 +53,8 @@ | |||
53 | #include <asm/thread_info.h> | 53 | #include <asm/thread_info.h> |
54 | #include <asm/processor.h> | 54 | #include <asm/processor.h> |
55 | 55 | ||
56 | #define WINDOW_VECTORS_SIZE 0x180 | ||
57 | |||
56 | 58 | ||
57 | /* | 59 | /* |
58 | * User exception vector. (Exceptions with PS.UM == 1, PS.EXCM == 0) | 60 | * User exception vector. (Exceptions with PS.UM == 1, PS.EXCM == 0) |
@@ -210,7 +212,7 @@ ENTRY(_DoubleExceptionVector) | |||
210 | /* Check for kernel double exception (usually fatal). */ | 212 | /* Check for kernel double exception (usually fatal). */ |
211 | 213 | ||
212 | rsr a3, PS | 214 | rsr a3, PS |
213 | _bbci.l a3, PS_UM_SHIFT, .Lksp | 215 | _bbci.l a3, PS_UM_BIT, .Lksp |
214 | 216 | ||
215 | /* Check if we are currently handling a window exception. */ | 217 | /* Check if we are currently handling a window exception. */ |
216 | /* Note: We don't need to indicate that we enter a critical section. */ | 218 | /* Note: We don't need to indicate that we enter a critical section. */ |
@@ -219,7 +221,7 @@ ENTRY(_DoubleExceptionVector) | |||
219 | 221 | ||
220 | movi a3, XCHAL_WINDOW_VECTORS_VADDR | 222 | movi a3, XCHAL_WINDOW_VECTORS_VADDR |
221 | _bltu a0, a3, .Lfixup | 223 | _bltu a0, a3, .Lfixup |
222 | addi a3, a3, XSHAL_WINDOW_VECTORS_SIZE | 224 | addi a3, a3, WINDOW_VECTORS_SIZE |
223 | _bgeu a0, a3, .Lfixup | 225 | _bgeu a0, a3, .Lfixup |
224 | 226 | ||
225 | /* Window overflow/underflow exception. Get stack pointer. */ | 227 | /* Window overflow/underflow exception. Get stack pointer. */ |
@@ -245,7 +247,7 @@ ENTRY(_DoubleExceptionVector) | |||
245 | 247 | ||
246 | wsr a2, DEPC # save stack pointer temporarily | 248 | wsr a2, DEPC # save stack pointer temporarily |
247 | rsr a0, PS | 249 | rsr a0, PS |
248 | extui a0, a0, XCHAL_PS_OWB_SHIFT, XCHAL_PS_OWB_BITS | 250 | extui a0, a0, PS_OWB_SHIFT, 4 |
249 | wsr a0, WINDOWBASE | 251 | wsr a0, WINDOWBASE |
250 | rsync | 252 | rsync |
251 | 253 | ||
@@ -312,8 +314,8 @@ ENTRY(_DoubleExceptionVector) | |||
312 | .Lksp: /* a0: a0, a1: a1, a2: a2, a3: trashed, depc: depc, excsave: a3 */ | 314 | .Lksp: /* a0: a0, a1: a1, a2: a2, a3: trashed, depc: depc, excsave: a3 */ |
313 | 315 | ||
314 | rsr a3, EXCCAUSE | 316 | rsr a3, EXCCAUSE |
315 | beqi a3, XCHAL_EXCCAUSE_ITLB_MISS, 1f | 317 | beqi a3, EXCCAUSE_ITLB_MISS, 1f |
316 | addi a3, a3, -XCHAL_EXCCAUSE_DTLB_MISS | 318 | addi a3, a3, -EXCCAUSE_DTLB_MISS |
317 | bnez a3, .Lunrecoverable | 319 | bnez a3, .Lunrecoverable |
318 | 1: movi a3, fast_second_level_miss_double_kernel | 320 | 1: movi a3, fast_second_level_miss_double_kernel |
319 | jx a3 | 321 | jx a3 |
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index cfe75f528725..a36c104c3a52 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S | |||
@@ -16,19 +16,17 @@ | |||
16 | 16 | ||
17 | #include <asm-generic/vmlinux.lds.h> | 17 | #include <asm-generic/vmlinux.lds.h> |
18 | 18 | ||
19 | #define _NOCLANGUAGE | 19 | #include <asm/variant/core.h> |
20 | #include <xtensa/config/core.h> | ||
21 | #include <xtensa/config/system.h> | ||
22 | OUTPUT_ARCH(xtensa) | 20 | OUTPUT_ARCH(xtensa) |
23 | ENTRY(_start) | 21 | ENTRY(_start) |
24 | 22 | ||
25 | #if XCHAL_MEMORY_ORDER == XTHAL_BIGENDIAN | 23 | #ifdef __XTENSA_EB__ |
26 | jiffies = jiffies_64 + 4; | 24 | jiffies = jiffies_64 + 4; |
27 | #else | 25 | #else |
28 | jiffies = jiffies_64; | 26 | jiffies = jiffies_64; |
29 | #endif | 27 | #endif |
30 | 28 | ||
31 | #define KERNELOFFSET 0x1000 | 29 | #define KERNELOFFSET 0xd0001000 |
32 | 30 | ||
33 | /* Note: In the following macros, it would be nice to specify only the | 31 | /* Note: In the following macros, it would be nice to specify only the |
34 | vector name and section kind and construct "sym" and "section" using | 32 | vector name and section kind and construct "sym" and "section" using |
@@ -75,7 +73,7 @@ jiffies = jiffies_64; | |||
75 | 73 | ||
76 | SECTIONS | 74 | SECTIONS |
77 | { | 75 | { |
78 | . = XCHAL_KSEG_CACHED_VADDR + KERNELOFFSET; | 76 | . = KERNELOFFSET; |
79 | /* .text section */ | 77 | /* .text section */ |
80 | 78 | ||
81 | _text = .; | 79 | _text = .; |
@@ -159,7 +157,7 @@ SECTIONS | |||
159 | 157 | ||
160 | /* Initialization code and data: */ | 158 | /* Initialization code and data: */ |
161 | 159 | ||
162 | . = ALIGN(1<<XCHAL_MMU_MIN_PTE_PAGE_SIZE); | 160 | . = ALIGN(1 << 12); |
163 | __init_begin = .; | 161 | __init_begin = .; |
164 | .init.text : { | 162 | .init.text : { |
165 | _sinittext = .; | 163 | _sinittext = .; |
@@ -223,32 +221,32 @@ SECTIONS | |||
223 | .dummy) | 221 | .dummy) |
224 | SECTION_VECTOR (_DebugInterruptVector_literal, | 222 | SECTION_VECTOR (_DebugInterruptVector_literal, |
225 | .DebugInterruptVector.literal, | 223 | .DebugInterruptVector.literal, |
226 | XCHAL_INTLEVEL_VECTOR_VADDR(XCHAL_DEBUGLEVEL) - 4, | 224 | XCHAL_DEBUG_VECTOR_VADDR - 4, |
227 | SIZEOF(.WindowVectors.text), | 225 | SIZEOF(.WindowVectors.text), |
228 | .WindowVectors.text) | 226 | .WindowVectors.text) |
229 | SECTION_VECTOR (_DebugInterruptVector_text, | 227 | SECTION_VECTOR (_DebugInterruptVector_text, |
230 | .DebugInterruptVector.text, | 228 | .DebugInterruptVector.text, |
231 | XCHAL_INTLEVEL_VECTOR_VADDR(XCHAL_DEBUGLEVEL), | 229 | XCHAL_DEBUG_VECTOR_VADDR, |
232 | 4, | 230 | 4, |
233 | .DebugInterruptVector.literal) | 231 | .DebugInterruptVector.literal) |
234 | SECTION_VECTOR (_KernelExceptionVector_literal, | 232 | SECTION_VECTOR (_KernelExceptionVector_literal, |
235 | .KernelExceptionVector.literal, | 233 | .KernelExceptionVector.literal, |
236 | XCHAL_KERNELEXC_VECTOR_VADDR - 4, | 234 | XCHAL_KERNEL_VECTOR_VADDR - 4, |
237 | SIZEOF(.DebugInterruptVector.text), | 235 | SIZEOF(.DebugInterruptVector.text), |
238 | .DebugInterruptVector.text) | 236 | .DebugInterruptVector.text) |
239 | SECTION_VECTOR (_KernelExceptionVector_text, | 237 | SECTION_VECTOR (_KernelExceptionVector_text, |
240 | .KernelExceptionVector.text, | 238 | .KernelExceptionVector.text, |
241 | XCHAL_KERNELEXC_VECTOR_VADDR, | 239 | XCHAL_KERNEL_VECTOR_VADDR, |
242 | 4, | 240 | 4, |
243 | .KernelExceptionVector.literal) | 241 | .KernelExceptionVector.literal) |
244 | SECTION_VECTOR (_UserExceptionVector_literal, | 242 | SECTION_VECTOR (_UserExceptionVector_literal, |
245 | .UserExceptionVector.literal, | 243 | .UserExceptionVector.literal, |
246 | XCHAL_USEREXC_VECTOR_VADDR - 4, | 244 | XCHAL_USER_VECTOR_VADDR - 4, |
247 | SIZEOF(.KernelExceptionVector.text), | 245 | SIZEOF(.KernelExceptionVector.text), |
248 | .KernelExceptionVector.text) | 246 | .KernelExceptionVector.text) |
249 | SECTION_VECTOR (_UserExceptionVector_text, | 247 | SECTION_VECTOR (_UserExceptionVector_text, |
250 | .UserExceptionVector.text, | 248 | .UserExceptionVector.text, |
251 | XCHAL_USEREXC_VECTOR_VADDR, | 249 | XCHAL_USER_VECTOR_VADDR, |
252 | 4, | 250 | 4, |
253 | .UserExceptionVector.literal) | 251 | .UserExceptionVector.literal) |
254 | SECTION_VECTOR (_DoubleExceptionVector_literal, | 252 | SECTION_VECTOR (_DoubleExceptionVector_literal, |
@@ -263,7 +261,7 @@ SECTIONS | |||
263 | .DoubleExceptionVector.literal) | 261 | .DoubleExceptionVector.literal) |
264 | 262 | ||
265 | . = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3; | 263 | . = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3; |
266 | . = ALIGN(1<<XCHAL_MMU_MIN_PTE_PAGE_SIZE); | 264 | . = ALIGN(1 << 12); |
267 | 265 | ||
268 | __init_end = .; | 266 | __init_end = .; |
269 | 267 | ||
diff --git a/arch/xtensa/lib/checksum.S b/arch/xtensa/lib/checksum.S index e2d64dfd530c..9d9cd990afa6 100644 --- a/arch/xtensa/lib/checksum.S +++ b/arch/xtensa/lib/checksum.S | |||
@@ -16,8 +16,7 @@ | |||
16 | 16 | ||
17 | #include <asm/errno.h> | 17 | #include <asm/errno.h> |
18 | #include <linux/linkage.h> | 18 | #include <linux/linkage.h> |
19 | #define _ASMLANGUAGE | 19 | #include <asm/variant/core.h> |
20 | #include <xtensa/config/core.h> | ||
21 | 20 | ||
22 | /* | 21 | /* |
23 | * computes a partial checksum, e.g. for TCP/UDP fragments | 22 | * computes a partial checksum, e.g. for TCP/UDP fragments |
diff --git a/arch/xtensa/lib/memcopy.S b/arch/xtensa/lib/memcopy.S index e8f6d7eb7222..ddda8f4bc862 100644 --- a/arch/xtensa/lib/memcopy.S +++ b/arch/xtensa/lib/memcopy.S | |||
@@ -9,7 +9,7 @@ | |||
9 | * Copyright (C) 2002 - 2005 Tensilica Inc. | 9 | * Copyright (C) 2002 - 2005 Tensilica Inc. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <xtensa/coreasm.h> | 12 | #include <asm/variant/core.h> |
13 | 13 | ||
14 | .macro src_b r, w0, w1 | 14 | .macro src_b r, w0, w1 |
15 | #ifdef __XTENSA_EB__ | 15 | #ifdef __XTENSA_EB__ |
diff --git a/arch/xtensa/lib/memset.S b/arch/xtensa/lib/memset.S index 4de25134bc62..56a17495b2db 100644 --- a/arch/xtensa/lib/memset.S +++ b/arch/xtensa/lib/memset.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * Copyright (C) 2002 Tensilica Inc. | 11 | * Copyright (C) 2002 Tensilica Inc. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <xtensa/coreasm.h> | 14 | #include <asm/variant/core.h> |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * void *memset(void *dst, int c, size_t length) | 17 | * void *memset(void *dst, int c, size_t length) |
diff --git a/arch/xtensa/lib/strncpy_user.S b/arch/xtensa/lib/strncpy_user.S index 71d55df43893..a834057bda6b 100644 --- a/arch/xtensa/lib/strncpy_user.S +++ b/arch/xtensa/lib/strncpy_user.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * Copyright (C) 2002 Tensilica Inc. | 11 | * Copyright (C) 2002 Tensilica Inc. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <xtensa/coreasm.h> | 14 | #include <asm/variant/core.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | 16 | ||
17 | /* Load or store instructions that may cause exceptions use the EX macro. */ | 17 | /* Load or store instructions that may cause exceptions use the EX macro. */ |
diff --git a/arch/xtensa/lib/strnlen_user.S b/arch/xtensa/lib/strnlen_user.S index cdff4d670f3b..5e9c1e709b2e 100644 --- a/arch/xtensa/lib/strnlen_user.S +++ b/arch/xtensa/lib/strnlen_user.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * Copyright (C) 2002 Tensilica Inc. | 11 | * Copyright (C) 2002 Tensilica Inc. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <xtensa/coreasm.h> | 14 | #include <asm/variant/core.h> |
15 | 15 | ||
16 | /* Load or store instructions that may cause exceptions use the EX macro. */ | 16 | /* Load or store instructions that may cause exceptions use the EX macro. */ |
17 | 17 | ||
diff --git a/arch/xtensa/lib/usercopy.S b/arch/xtensa/lib/usercopy.S index 4641ef510f0e..a8ab1d4fe0ae 100644 --- a/arch/xtensa/lib/usercopy.S +++ b/arch/xtensa/lib/usercopy.S | |||
@@ -53,7 +53,7 @@ | |||
53 | * a11/ original length | 53 | * a11/ original length |
54 | */ | 54 | */ |
55 | 55 | ||
56 | #include <xtensa/coreasm.h> | 56 | #include <asm/variant/core.h> |
57 | 57 | ||
58 | #ifdef __XTENSA_EB__ | 58 | #ifdef __XTENSA_EB__ |
59 | #define ALIGN(R, W0, W1) src R, W0, W1 | 59 | #define ALIGN(R, W0, W1) src R, W0, W1 |
diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c index dd0dbec2e57e..3dc6f2f07bbe 100644 --- a/arch/xtensa/mm/fault.c +++ b/arch/xtensa/mm/fault.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <asm/system.h> | 21 | #include <asm/system.h> |
22 | #include <asm/pgalloc.h> | 22 | #include <asm/pgalloc.h> |
23 | 23 | ||
24 | unsigned long asid_cache = ASID_FIRST_VERSION; | 24 | unsigned long asid_cache = ASID_USER_FIRST; |
25 | void bad_page_fault(struct pt_regs*, unsigned long, int); | 25 | void bad_page_fault(struct pt_regs*, unsigned long, int); |
26 | 26 | ||
27 | /* | 27 | /* |
@@ -58,10 +58,10 @@ void do_page_fault(struct pt_regs *regs) | |||
58 | return; | 58 | return; |
59 | } | 59 | } |
60 | 60 | ||
61 | is_write = (exccause == XCHAL_EXCCAUSE_STORE_CACHE_ATTRIBUTE) ? 1 : 0; | 61 | is_write = (exccause == EXCCAUSE_STORE_CACHE_ATTRIBUTE) ? 1 : 0; |
62 | is_exec = (exccause == XCHAL_EXCCAUSE_ITLB_PRIVILEGE || | 62 | is_exec = (exccause == EXCCAUSE_ITLB_PRIVILEGE || |
63 | exccause == XCHAL_EXCCAUSE_ITLB_MISS || | 63 | exccause == EXCCAUSE_ITLB_MISS || |
64 | exccause == XCHAL_EXCCAUSE_FETCH_CACHE_ATTRIBUTE) ? 1 : 0; | 64 | exccause == EXCCAUSE_FETCH_CACHE_ATTRIBUTE) ? 1 : 0; |
65 | 65 | ||
66 | #if 0 | 66 | #if 0 |
67 | printk("[%s:%d:%08x:%d:%08x:%s%s]\n", current->comm, current->pid, | 67 | printk("[%s:%d:%08x:%d:%08x:%s%s]\n", current->comm, current->pid, |
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index 660ef058c149..e1ec2d1e8189 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c | |||
@@ -141,8 +141,8 @@ void __init bootmem_init(void) | |||
141 | if (min_low_pfn > max_pfn) | 141 | if (min_low_pfn > max_pfn) |
142 | panic("No memory found!\n"); | 142 | panic("No memory found!\n"); |
143 | 143 | ||
144 | max_low_pfn = max_pfn < MAX_LOW_MEMORY >> PAGE_SHIFT ? | 144 | max_low_pfn = max_pfn < MAX_MEM_PFN >> PAGE_SHIFT ? |
145 | max_pfn : MAX_LOW_MEMORY >> PAGE_SHIFT; | 145 | max_pfn : MAX_MEM_PFN >> PAGE_SHIFT; |
146 | 146 | ||
147 | /* Find an area to use for the bootmem bitmap. */ | 147 | /* Find an area to use for the bootmem bitmap. */ |
148 | 148 | ||
@@ -215,7 +215,7 @@ void __init init_mmu (void) | |||
215 | 215 | ||
216 | /* Set rasid register to a known value. */ | 216 | /* Set rasid register to a known value. */ |
217 | 217 | ||
218 | set_rasid_register (ASID_ALL_RESERVED); | 218 | set_rasid_register (ASID_USER_FIRST); |
219 | 219 | ||
220 | /* Set PTEVADDR special register to the start of the page | 220 | /* Set PTEVADDR special register to the start of the page |
221 | * table, which is in kernel mappable space (ie. not | 221 | * table, which is in kernel mappable space (ie. not |
diff --git a/arch/xtensa/mm/misc.S b/arch/xtensa/mm/misc.S index 327c0f17187c..ae085332c607 100644 --- a/arch/xtensa/mm/misc.S +++ b/arch/xtensa/mm/misc.S | |||
@@ -19,9 +19,8 @@ | |||
19 | #include <linux/linkage.h> | 19 | #include <linux/linkage.h> |
20 | #include <asm/page.h> | 20 | #include <asm/page.h> |
21 | #include <asm/pgtable.h> | 21 | #include <asm/pgtable.h> |
22 | 22 | #include <asm/asmmacro.h> | |
23 | #include <xtensa/cacheasm.h> | 23 | #include <asm/cacheasm.h> |
24 | #include <xtensa/cacheattrasm.h> | ||
25 | 24 | ||
26 | /* clear_page (page) */ | 25 | /* clear_page (page) */ |
27 | 26 | ||
@@ -74,104 +73,66 @@ ENTRY(copy_page) | |||
74 | 73 | ||
75 | retw | 74 | retw |
76 | 75 | ||
77 | |||
78 | /* | 76 | /* |
79 | * void __flush_invalidate_cache_all(void) | 77 | * void __invalidate_icache_page(ulong start) |
80 | */ | 78 | */ |
81 | 79 | ||
82 | ENTRY(__flush_invalidate_cache_all) | 80 | ENTRY(__invalidate_icache_page) |
83 | entry sp, 16 | 81 | entry sp, 16 |
84 | dcache_writeback_inv_all a2, a3 | ||
85 | icache_invalidate_all a2, a3 | ||
86 | retw | ||
87 | 82 | ||
88 | /* | 83 | ___invalidate_icache_page a2 a3 |
89 | * void __invalidate_icache_all(void) | 84 | isync |
90 | */ | ||
91 | 85 | ||
92 | ENTRY(__invalidate_icache_all) | ||
93 | entry sp, 16 | ||
94 | icache_invalidate_all a2, a3 | ||
95 | retw | 86 | retw |
96 | 87 | ||
97 | /* | 88 | /* |
98 | * void __flush_invalidate_dcache_all(void) | 89 | * void __invalidate_dcache_page(ulong start) |
99 | */ | 90 | */ |
100 | 91 | ||
101 | ENTRY(__flush_invalidate_dcache_all) | 92 | ENTRY(__invalidate_dcache_page) |
102 | entry sp, 16 | 93 | entry sp, 16 |
103 | dcache_writeback_inv_all a2, a3 | ||
104 | retw | ||
105 | |||
106 | 94 | ||
107 | /* | 95 | ___invalidate_dcache_page a2 a3 |
108 | * void __flush_invalidate_cache_range(ulong start, ulong size) | 96 | dsync |
109 | */ | ||
110 | 97 | ||
111 | ENTRY(__flush_invalidate_cache_range) | ||
112 | entry sp, 16 | ||
113 | mov a4, a2 | ||
114 | mov a5, a3 | ||
115 | dcache_writeback_inv_region a4, a5, a6 | ||
116 | icache_invalidate_region a2, a3, a4 | ||
117 | retw | 98 | retw |
118 | 99 | ||
119 | /* | 100 | /* |
120 | * void __invalidate_icache_page(ulong start) | 101 | * void __flush_invalidate_dcache_page(ulong start) |
121 | */ | 102 | */ |
122 | 103 | ||
123 | ENTRY(__invalidate_icache_page) | 104 | ENTRY(__flush_invalidate_dcache_page) |
124 | entry sp, 16 | 105 | entry sp, 16 |
125 | movi a3, PAGE_SIZE | ||
126 | icache_invalidate_region a2, a3, a4 | ||
127 | retw | ||
128 | 106 | ||
129 | /* | 107 | ___flush_invalidate_dcache_page a2 a3 |
130 | * void __invalidate_dcache_page(ulong start) | ||
131 | */ | ||
132 | 108 | ||
133 | ENTRY(__invalidate_dcache_page) | 109 | dsync |
134 | entry sp, 16 | ||
135 | movi a3, PAGE_SIZE | ||
136 | dcache_invalidate_region a2, a3, a4 | ||
137 | retw | 110 | retw |
138 | 111 | ||
139 | /* | 112 | /* |
140 | * void __invalidate_icache_range(ulong start, ulong size) | 113 | * void __flush_dcache_page(ulong start) |
141 | */ | 114 | */ |
142 | 115 | ||
143 | ENTRY(__invalidate_icache_range) | 116 | ENTRY(__flush_dcache_page) |
144 | entry sp, 16 | 117 | entry sp, 16 |
145 | icache_invalidate_region a2, a3, a4 | ||
146 | retw | ||
147 | 118 | ||
148 | /* | 119 | ___flush_dcache_page a2 a3 |
149 | * void __invalidate_dcache_range(ulong start, ulong size) | ||
150 | */ | ||
151 | 120 | ||
152 | ENTRY(__invalidate_dcache_range) | 121 | dsync |
153 | entry sp, 16 | ||
154 | dcache_invalidate_region a2, a3, a4 | ||
155 | retw | 122 | retw |
156 | 123 | ||
157 | /* | ||
158 | * void __flush_dcache_page(ulong start) | ||
159 | */ | ||
160 | 124 | ||
161 | ENTRY(__flush_dcache_page) | ||
162 | entry sp, 16 | ||
163 | movi a3, PAGE_SIZE | ||
164 | dcache_writeback_region a2, a3, a4 | ||
165 | retw | ||
166 | 125 | ||
167 | /* | 126 | /* |
168 | * void __flush_invalidate_dcache_page(ulong start) | 127 | * void __invalidate_icache_range(ulong start, ulong size) |
169 | */ | 128 | */ |
170 | 129 | ||
171 | ENTRY(__flush_invalidate_dcache_page) | 130 | ENTRY(__invalidate_icache_range) |
172 | entry sp, 16 | 131 | entry sp, 16 |
173 | movi a3, PAGE_SIZE | 132 | |
174 | dcache_writeback_inv_region a2, a3, a4 | 133 | ___invalidate_icache_range a2 a3 a4 |
134 | isync | ||
135 | |||
175 | retw | 136 | retw |
176 | 137 | ||
177 | /* | 138 | /* |
@@ -180,195 +141,69 @@ ENTRY(__flush_invalidate_dcache_page) | |||
180 | 141 | ||
181 | ENTRY(__flush_invalidate_dcache_range) | 142 | ENTRY(__flush_invalidate_dcache_range) |
182 | entry sp, 16 | 143 | entry sp, 16 |
183 | dcache_writeback_inv_region a2, a3, a4 | ||
184 | retw | ||
185 | 144 | ||
186 | /* | 145 | ___flush_invalidate_dcache_range a2 a3 a4 |
187 | * void __invalidate_dcache_all(void) | 146 | dsync |
188 | */ | ||
189 | 147 | ||
190 | ENTRY(__invalidate_dcache_all) | ||
191 | entry sp, 16 | ||
192 | dcache_invalidate_all a2, a3 | ||
193 | retw | 148 | retw |
194 | 149 | ||
195 | /* | 150 | /* |
196 | * void __flush_invalidate_dcache_page_phys(ulong start) | 151 | * void _flush_dcache_range(ulong start, ulong size) |
197 | */ | 152 | */ |
198 | 153 | ||
199 | ENTRY(__flush_invalidate_dcache_page_phys) | 154 | ENTRY(__flush_dcache_range) |
200 | entry sp, 16 | 155 | entry sp, 16 |
201 | 156 | ||
202 | movi a3, XCHAL_DCACHE_SIZE | 157 | ___flush_dcache_range a2 a3 a4 |
203 | movi a4, PAGE_MASK | 1 | ||
204 | addi a2, a2, 1 | ||
205 | |||
206 | 1: addi a3, a3, -XCHAL_DCACHE_LINESIZE | ||
207 | |||
208 | ldct a6, a3 | ||
209 | dsync | 158 | dsync |
210 | and a6, a6, a4 | ||
211 | beq a6, a2, 2f | ||
212 | bgeui a3, 2, 1b | ||
213 | retw | ||
214 | 159 | ||
215 | 2: diwbi a3, 0 | ||
216 | bgeui a3, 2, 1b | ||
217 | retw | 160 | retw |
218 | 161 | ||
219 | ENTRY(check_dcache_low0) | 162 | /* |
220 | entry sp, 16 | 163 | * void _invalidate_dcache_range(ulong start, ulong size) |
221 | 164 | */ | |
222 | movi a3, XCHAL_DCACHE_SIZE / 4 | ||
223 | movi a4, PAGE_MASK | 1 | ||
224 | addi a2, a2, 1 | ||
225 | |||
226 | 1: addi a3, a3, -XCHAL_DCACHE_LINESIZE | ||
227 | |||
228 | ldct a6, a3 | ||
229 | dsync | ||
230 | and a6, a6, a4 | ||
231 | beq a6, a2, 2f | ||
232 | bgeui a3, 2, 1b | ||
233 | retw | ||
234 | |||
235 | 2: j 2b | ||
236 | |||
237 | ENTRY(check_dcache_high0) | ||
238 | entry sp, 16 | ||
239 | |||
240 | movi a5, XCHAL_DCACHE_SIZE / 4 | ||
241 | movi a3, XCHAL_DCACHE_SIZE / 2 | ||
242 | movi a4, PAGE_MASK | 1 | ||
243 | addi a2, a2, 1 | ||
244 | |||
245 | 1: addi a3, a3, -XCHAL_DCACHE_LINESIZE | ||
246 | addi a5, a5, -XCHAL_DCACHE_LINESIZE | ||
247 | |||
248 | ldct a6, a3 | ||
249 | dsync | ||
250 | and a6, a6, a4 | ||
251 | beq a6, a2, 2f | ||
252 | bgeui a5, 2, 1b | ||
253 | retw | ||
254 | |||
255 | 2: j 2b | ||
256 | 165 | ||
257 | ENTRY(check_dcache_low1) | 166 | ENTRY(__invalidate_dcache_range) |
258 | entry sp, 16 | 167 | entry sp, 16 |
259 | 168 | ||
260 | movi a5, XCHAL_DCACHE_SIZE / 4 | 169 | ___invalidate_dcache_range a2 a3 a4 |
261 | movi a3, XCHAL_DCACHE_SIZE * 3 / 4 | ||
262 | movi a4, PAGE_MASK | 1 | ||
263 | addi a2, a2, 1 | ||
264 | 170 | ||
265 | 1: addi a3, a3, -XCHAL_DCACHE_LINESIZE | ||
266 | addi a5, a5, -XCHAL_DCACHE_LINESIZE | ||
267 | 171 | ||
268 | ldct a6, a3 | ||
269 | dsync | ||
270 | and a6, a6, a4 | ||
271 | beq a6, a2, 2f | ||
272 | bgeui a5, 2, 1b | ||
273 | retw | 172 | retw |
274 | 173 | ||
275 | 2: j 2b | 174 | /* |
175 | * void _invalidate_icache_all(void) | ||
176 | */ | ||
276 | 177 | ||
277 | ENTRY(check_dcache_high1) | 178 | ENTRY(__invalidate_icache_all) |
278 | entry sp, 16 | 179 | entry sp, 16 |
279 | 180 | ||
280 | movi a5, XCHAL_DCACHE_SIZE / 4 | 181 | ___invalidate_icache_all a2 a3 |
281 | movi a3, XCHAL_DCACHE_SIZE | 182 | isync |
282 | movi a4, PAGE_MASK | 1 | ||
283 | addi a2, a2, 1 | ||
284 | |||
285 | 1: addi a3, a3, -XCHAL_DCACHE_LINESIZE | ||
286 | addi a5, a5, -XCHAL_DCACHE_LINESIZE | ||
287 | 183 | ||
288 | ldct a6, a3 | ||
289 | dsync | ||
290 | and a6, a6, a4 | ||
291 | beq a6, a2, 2f | ||
292 | bgeui a5, 2, 1b | ||
293 | retw | 184 | retw |
294 | 185 | ||
295 | 2: j 2b | ||
296 | |||
297 | |||
298 | /* | 186 | /* |
299 | * void __invalidate_icache_page_phys(ulong start) | 187 | * void _flush_invalidate_dcache_all(void) |
300 | */ | 188 | */ |
301 | 189 | ||
302 | ENTRY(__invalidate_icache_page_phys) | 190 | ENTRY(__flush_invalidate_dcache_all) |
303 | entry sp, 16 | 191 | entry sp, 16 |
304 | 192 | ||
305 | movi a3, XCHAL_ICACHE_SIZE | 193 | ___flush_invalidate_dcache_all a2 a3 |
306 | movi a4, PAGE_MASK | 1 | 194 | dsync |
307 | addi a2, a2, 1 | ||
308 | |||
309 | 1: addi a3, a3, -XCHAL_ICACHE_LINESIZE | ||
310 | |||
311 | lict a6, a3 | ||
312 | isync | ||
313 | and a6, a6, a4 | ||
314 | beq a6, a2, 2f | ||
315 | bgeui a3, 2, 1b | ||
316 | retw | ||
317 | 195 | ||
318 | 2: iii a3, 0 | ||
319 | bgeui a3, 2, 1b | ||
320 | retw | 196 | retw |
321 | 197 | ||
198 | /* | ||
199 | * void _invalidate_dcache_all(void) | ||
200 | */ | ||
322 | 201 | ||
323 | #if 0 | 202 | ENTRY(__invalidate_dcache_all) |
324 | |||
325 | movi a3, XCHAL_DCACHE_WAYS - 1 | ||
326 | movi a4, PAGE_SIZE | ||
327 | |||
328 | 1: mov a5, a2 | ||
329 | add a6, a2, a4 | ||
330 | |||
331 | 2: diwbi a5, 0 | ||
332 | diwbi a5, XCHAL_DCACHE_LINESIZE | ||
333 | diwbi a5, XCHAL_DCACHE_LINESIZE * 2 | ||
334 | diwbi a5, XCHAL_DCACHE_LINESIZE * 3 | ||
335 | |||
336 | addi a5, a5, XCHAL_DCACHE_LINESIZE * 4 | ||
337 | blt a5, a6, 2b | ||
338 | |||
339 | addi a3, a3, -1 | ||
340 | addi a2, a2, XCHAL_DCACHE_SIZE / XCHAL_DCACHE_WAYS | ||
341 | bgez a3, 1b | ||
342 | |||
343 | retw | ||
344 | |||
345 | ENTRY(__invalidate_icache_page_index) | ||
346 | entry sp, 16 | 203 | entry sp, 16 |
347 | 204 | ||
348 | movi a3, XCHAL_ICACHE_WAYS - 1 | 205 | ___invalidate_dcache_all a2 a3 |
349 | movi a4, PAGE_SIZE | 206 | dsync |
350 | |||
351 | 1: mov a5, a2 | ||
352 | add a6, a2, a4 | ||
353 | |||
354 | 2: iii a5, 0 | ||
355 | iii a5, XCHAL_ICACHE_LINESIZE | ||
356 | iii a5, XCHAL_ICACHE_LINESIZE * 2 | ||
357 | iii a5, XCHAL_ICACHE_LINESIZE * 3 | ||
358 | |||
359 | addi a5, a5, XCHAL_ICACHE_LINESIZE * 4 | ||
360 | blt a5, a6, 2b | ||
361 | |||
362 | addi a3, a3, -1 | ||
363 | addi a2, a2, XCHAL_ICACHE_SIZE / XCHAL_ICACHE_WAYS | ||
364 | bgez a3, 2b | ||
365 | 207 | ||
366 | retw | 208 | retw |
367 | 209 | ||
368 | #endif | ||
369 | |||
370 | |||
371 | |||
372 | |||
373 | |||
374 | |||
diff --git a/arch/xtensa/mm/tlb.c b/arch/xtensa/mm/tlb.c index 0fefb8666874..239461d8ea88 100644 --- a/arch/xtensa/mm/tlb.c +++ b/arch/xtensa/mm/tlb.c | |||
@@ -24,12 +24,12 @@ | |||
24 | 24 | ||
25 | static inline void __flush_itlb_all (void) | 25 | static inline void __flush_itlb_all (void) |
26 | { | 26 | { |
27 | int way, index; | 27 | int w, i; |
28 | 28 | ||
29 | for (way = 0; way < XCHAL_ITLB_ARF_WAYS; way++) { | 29 | for (w = 0; w < ITLB_ARF_WAYS; w++) { |
30 | for (index = 0; index < ITLB_ENTRIES_PER_ARF_WAY; index++) { | 30 | for (i = 0; i < (1 << XCHAL_ITLB_ARF_ENTRIES_LOG2); i++) { |
31 | int entry = way + (index << PAGE_SHIFT); | 31 | int e = w + (i << PAGE_SHIFT); |
32 | invalidate_itlb_entry_no_isync (entry); | 32 | invalidate_itlb_entry_no_isync(e); |
33 | } | 33 | } |
34 | } | 34 | } |
35 | asm volatile ("isync\n"); | 35 | asm volatile ("isync\n"); |
@@ -37,12 +37,12 @@ static inline void __flush_itlb_all (void) | |||
37 | 37 | ||
38 | static inline void __flush_dtlb_all (void) | 38 | static inline void __flush_dtlb_all (void) |
39 | { | 39 | { |
40 | int way, index; | 40 | int w, i; |
41 | 41 | ||
42 | for (way = 0; way < XCHAL_DTLB_ARF_WAYS; way++) { | 42 | for (w = 0; w < DTLB_ARF_WAYS; w++) { |
43 | for (index = 0; index < DTLB_ENTRIES_PER_ARF_WAY; index++) { | 43 | for (i = 0; i < (1 << XCHAL_DTLB_ARF_ENTRIES_LOG2); i++) { |
44 | int entry = way + (index << PAGE_SHIFT); | 44 | int e = w + (i << PAGE_SHIFT); |
45 | invalidate_dtlb_entry_no_isync (entry); | 45 | invalidate_dtlb_entry_no_isync(e); |
46 | } | 46 | } |
47 | } | 47 | } |
48 | asm volatile ("isync\n"); | 48 | asm volatile ("isync\n"); |
@@ -63,21 +63,25 @@ void flush_tlb_all (void) | |||
63 | 63 | ||
64 | void flush_tlb_mm(struct mm_struct *mm) | 64 | void flush_tlb_mm(struct mm_struct *mm) |
65 | { | 65 | { |
66 | #if 0 | ||
67 | printk("[tlbmm<%lx>]\n", (unsigned long)mm->context); | ||
68 | #endif | ||
69 | |||
70 | if (mm == current->active_mm) { | 66 | if (mm == current->active_mm) { |
71 | int flags; | 67 | int flags; |
72 | local_save_flags(flags); | 68 | local_save_flags(flags); |
73 | get_new_mmu_context(mm, asid_cache); | 69 | __get_new_mmu_context(mm); |
74 | set_rasid_register(ASID_INSERT(mm->context)); | 70 | __load_mmu_context(mm); |
75 | local_irq_restore(flags); | 71 | local_irq_restore(flags); |
76 | } | 72 | } |
77 | else | 73 | else |
78 | mm->context = 0; | 74 | mm->context = 0; |
79 | } | 75 | } |
80 | 76 | ||
77 | #define _ITLB_ENTRIES (ITLB_ARF_WAYS << XCHAL_ITLB_ARF_ENTRIES_LOG2) | ||
78 | #define _DTLB_ENTRIES (DTLB_ARF_WAYS << XCHAL_DTLB_ARF_ENTRIES_LOG2) | ||
79 | #if _ITLB_ENTRIES > _DTLB_ENTRIES | ||
80 | # define _TLB_ENTRIES _ITLB_ENTRIES | ||
81 | #else | ||
82 | # define _TLB_ENTRIES _DTLB_ENTRIES | ||
83 | #endif | ||
84 | |||
81 | void flush_tlb_range (struct vm_area_struct *vma, | 85 | void flush_tlb_range (struct vm_area_struct *vma, |
82 | unsigned long start, unsigned long end) | 86 | unsigned long start, unsigned long end) |
83 | { | 87 | { |
@@ -93,7 +97,7 @@ void flush_tlb_range (struct vm_area_struct *vma, | |||
93 | #endif | 97 | #endif |
94 | local_save_flags(flags); | 98 | local_save_flags(flags); |
95 | 99 | ||
96 | if (end-start + (PAGE_SIZE-1) <= SMALLEST_NTLB_ENTRIES << PAGE_SHIFT) { | 100 | if (end-start + (PAGE_SIZE-1) <= _TLB_ENTRIES << PAGE_SHIFT) { |
97 | int oldpid = get_rasid_register(); | 101 | int oldpid = get_rasid_register(); |
98 | set_rasid_register (ASID_INSERT(mm->context)); | 102 | set_rasid_register (ASID_INSERT(mm->context)); |
99 | start &= PAGE_MASK; | 103 | start &= PAGE_MASK; |
@@ -111,9 +115,7 @@ void flush_tlb_range (struct vm_area_struct *vma, | |||
111 | 115 | ||
112 | set_rasid_register(oldpid); | 116 | set_rasid_register(oldpid); |
113 | } else { | 117 | } else { |
114 | get_new_mmu_context(mm, asid_cache); | 118 | flush_tlb_mm(mm); |
115 | if (mm == current->active_mm) | ||
116 | set_rasid_register(ASID_INSERT(mm->context)); | ||
117 | } | 119 | } |
118 | local_irq_restore(flags); | 120 | local_irq_restore(flags); |
119 | } | 121 | } |
@@ -123,10 +125,6 @@ void flush_tlb_page (struct vm_area_struct *vma, unsigned long page) | |||
123 | struct mm_struct* mm = vma->vm_mm; | 125 | struct mm_struct* mm = vma->vm_mm; |
124 | unsigned long flags; | 126 | unsigned long flags; |
125 | int oldpid; | 127 | int oldpid; |
126 | #if 0 | ||
127 | printk("[tlbpage<%02lx,%08lx>]\n", | ||
128 | (unsigned long)mm->context, page); | ||
129 | #endif | ||
130 | 128 | ||
131 | if(mm->context == NO_CONTEXT) | 129 | if(mm->context == NO_CONTEXT) |
132 | return; | 130 | return; |
@@ -142,404 +140,5 @@ void flush_tlb_page (struct vm_area_struct *vma, unsigned long page) | |||
142 | set_rasid_register(oldpid); | 140 | set_rasid_register(oldpid); |
143 | 141 | ||
144 | local_irq_restore(flags); | 142 | local_irq_restore(flags); |
145 | |||
146 | #if 0 | ||
147 | flush_tlb_all(); | ||
148 | return; | ||
149 | #endif | ||
150 | } | ||
151 | |||
152 | |||
153 | #ifdef DEBUG_TLB | ||
154 | |||
155 | #define USE_ITLB 0 | ||
156 | #define USE_DTLB 1 | ||
157 | |||
158 | struct way_config_t { | ||
159 | int indicies; | ||
160 | int indicies_log2; | ||
161 | int pgsz_log2; | ||
162 | int arf; | ||
163 | }; | ||
164 | |||
165 | static struct way_config_t itlb[XCHAL_ITLB_WAYS] = | ||
166 | { | ||
167 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY0_SET, ENTRIES), | ||
168 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY0_SET, ENTRIES_LOG2), | ||
169 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY0_SET, PAGESZ_LOG2_MIN), | ||
170 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY0_SET, ARF) | ||
171 | }, | ||
172 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY1_SET, ENTRIES), | ||
173 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY1_SET, ENTRIES_LOG2), | ||
174 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY1_SET, PAGESZ_LOG2_MIN), | ||
175 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY1_SET, ARF) | ||
176 | }, | ||
177 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY2_SET, ENTRIES), | ||
178 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY2_SET, ENTRIES_LOG2), | ||
179 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY2_SET, PAGESZ_LOG2_MIN), | ||
180 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY2_SET, ARF) | ||
181 | }, | ||
182 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY3_SET, ENTRIES), | ||
183 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY3_SET, ENTRIES_LOG2), | ||
184 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY3_SET, PAGESZ_LOG2_MIN), | ||
185 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY3_SET, ARF) | ||
186 | }, | ||
187 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY4_SET, ENTRIES), | ||
188 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY4_SET, ENTRIES_LOG2), | ||
189 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY4_SET, PAGESZ_LOG2_MIN), | ||
190 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY4_SET, ARF) | ||
191 | }, | ||
192 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY5_SET, ENTRIES), | ||
193 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY5_SET, ENTRIES_LOG2), | ||
194 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY5_SET, PAGESZ_LOG2_MIN), | ||
195 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY5_SET, ARF) | ||
196 | }, | ||
197 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY6_SET, ENTRIES), | ||
198 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY6_SET, ENTRIES_LOG2), | ||
199 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY6_SET, PAGESZ_LOG2_MIN), | ||
200 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY6_SET, ARF) | ||
201 | } | ||
202 | }; | ||
203 | |||
204 | static struct way_config_t dtlb[XCHAL_DTLB_WAYS] = | ||
205 | { | ||
206 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY0_SET, ENTRIES), | ||
207 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY0_SET, ENTRIES_LOG2), | ||
208 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY0_SET, PAGESZ_LOG2_MIN), | ||
209 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY0_SET, ARF) | ||
210 | }, | ||
211 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY1_SET, ENTRIES), | ||
212 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY1_SET, ENTRIES_LOG2), | ||
213 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY1_SET, PAGESZ_LOG2_MIN), | ||
214 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY1_SET, ARF) | ||
215 | }, | ||
216 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY2_SET, ENTRIES), | ||
217 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY2_SET, ENTRIES_LOG2), | ||
218 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY2_SET, PAGESZ_LOG2_MIN), | ||
219 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY2_SET, ARF) | ||
220 | }, | ||
221 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY3_SET, ENTRIES), | ||
222 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY3_SET, ENTRIES_LOG2), | ||
223 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY3_SET, PAGESZ_LOG2_MIN), | ||
224 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY3_SET, ARF) | ||
225 | }, | ||
226 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY4_SET, ENTRIES), | ||
227 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY4_SET, ENTRIES_LOG2), | ||
228 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY4_SET, PAGESZ_LOG2_MIN), | ||
229 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY4_SET, ARF) | ||
230 | }, | ||
231 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY5_SET, ENTRIES), | ||
232 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY5_SET, ENTRIES_LOG2), | ||
233 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY5_SET, PAGESZ_LOG2_MIN), | ||
234 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY5_SET, ARF) | ||
235 | }, | ||
236 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY6_SET, ENTRIES), | ||
237 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY6_SET, ENTRIES_LOG2), | ||
238 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY6_SET, PAGESZ_LOG2_MIN), | ||
239 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY6_SET, ARF) | ||
240 | }, | ||
241 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY7_SET, ENTRIES), | ||
242 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY7_SET, ENTRIES_LOG2), | ||
243 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY7_SET, PAGESZ_LOG2_MIN), | ||
244 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY7_SET, ARF) | ||
245 | }, | ||
246 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY8_SET, ENTRIES), | ||
247 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY8_SET, ENTRIES_LOG2), | ||
248 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY8_SET, PAGESZ_LOG2_MIN), | ||
249 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY8_SET, ARF) | ||
250 | }, | ||
251 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY9_SET, ENTRIES), | ||
252 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY9_SET, ENTRIES_LOG2), | ||
253 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY9_SET, PAGESZ_LOG2_MIN), | ||
254 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY9_SET, ARF) | ||
255 | } | ||
256 | }; | ||
257 | |||
258 | /* Total number of entries: */ | ||
259 | #define ITLB_TOTAL_ENTRIES \ | ||
260 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY0_SET, ENTRIES) + \ | ||
261 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY1_SET, ENTRIES) + \ | ||
262 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY2_SET, ENTRIES) + \ | ||
263 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY3_SET, ENTRIES) + \ | ||
264 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY4_SET, ENTRIES) + \ | ||
265 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY5_SET, ENTRIES) + \ | ||
266 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY6_SET, ENTRIES) | ||
267 | #define DTLB_TOTAL_ENTRIES \ | ||
268 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY0_SET, ENTRIES) + \ | ||
269 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY1_SET, ENTRIES) + \ | ||
270 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY2_SET, ENTRIES) + \ | ||
271 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY3_SET, ENTRIES) + \ | ||
272 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY4_SET, ENTRIES) + \ | ||
273 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY5_SET, ENTRIES) + \ | ||
274 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY6_SET, ENTRIES) + \ | ||
275 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY7_SET, ENTRIES) + \ | ||
276 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY8_SET, ENTRIES) + \ | ||
277 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY9_SET, ENTRIES) | ||
278 | |||
279 | |||
280 | typedef struct { | ||
281 | unsigned va; | ||
282 | unsigned pa; | ||
283 | unsigned char asid; | ||
284 | unsigned char ca; | ||
285 | unsigned char way; | ||
286 | unsigned char index; | ||
287 | unsigned char pgsz_log2; /* 0 .. 32 */ | ||
288 | unsigned char type; /* 0=ITLB 1=DTLB */ | ||
289 | } tlb_dump_entry_t; | ||
290 | |||
291 | /* Return -1 if a precedes b, +1 if a follows b, 0 if same: */ | ||
292 | int cmp_tlb_dump_info( tlb_dump_entry_t *a, tlb_dump_entry_t *b ) | ||
293 | { | ||
294 | if (a->asid < b->asid) return -1; | ||
295 | if (a->asid > b->asid) return 1; | ||
296 | if (a->va < b->va) return -1; | ||
297 | if (a->va > b->va) return 1; | ||
298 | if (a->pa < b->pa) return -1; | ||
299 | if (a->pa > b->pa) return 1; | ||
300 | if (a->ca < b->ca) return -1; | ||
301 | if (a->ca > b->ca) return 1; | ||
302 | if (a->way < b->way) return -1; | ||
303 | if (a->way > b->way) return 1; | ||
304 | if (a->index < b->index) return -1; | ||
305 | if (a->index > b->index) return 1; | ||
306 | return 0; | ||
307 | } | ||
308 | |||
309 | void sort_tlb_dump_info( tlb_dump_entry_t *t, int n ) | ||
310 | { | ||
311 | int i, j; | ||
312 | /* Simple O(n*n) sort: */ | ||
313 | for (i = 0; i < n-1; i++) | ||
314 | for (j = i+1; j < n; j++) | ||
315 | if (cmp_tlb_dump_info(t+i, t+j) > 0) { | ||
316 | tlb_dump_entry_t tmp = t[i]; | ||
317 | t[i] = t[j]; | ||
318 | t[j] = tmp; | ||
319 | } | ||
320 | } | ||
321 | |||
322 | |||
323 | static tlb_dump_entry_t itlb_dump_info[ITLB_TOTAL_ENTRIES]; | ||
324 | static tlb_dump_entry_t dtlb_dump_info[DTLB_TOTAL_ENTRIES]; | ||
325 | |||
326 | |||
327 | static inline char *way_type (int type) | ||
328 | { | ||
329 | return type ? "autorefill" : "non-autorefill"; | ||
330 | } | ||
331 | |||
332 | void print_entry (struct way_config_t *way_info, | ||
333 | unsigned int way, | ||
334 | unsigned int index, | ||
335 | unsigned int virtual, | ||
336 | unsigned int translation) | ||
337 | { | ||
338 | char valid_chr; | ||
339 | unsigned int va, pa, asid, ca; | ||
340 | |||
341 | va = virtual & | ||
342 | ~((1 << (way_info->pgsz_log2 + way_info->indicies_log2)) - 1); | ||
343 | asid = virtual & ((1 << XCHAL_MMU_ASID_BITS) - 1); | ||
344 | pa = translation & ~((1 << way_info->pgsz_log2) - 1); | ||
345 | ca = translation & ((1 << XCHAL_MMU_CA_BITS) - 1); | ||
346 | valid_chr = asid ? 'V' : 'I'; | ||
347 | |||
348 | /* Compute and incorporate the effect of the index bits on the | ||
349 | * va. It's more useful for kernel debugging, since we always | ||
350 | * want to know the effective va anyway. */ | ||
351 | |||
352 | va += index << way_info->pgsz_log2; | ||
353 | |||
354 | printk ("\t[%d,%d] (%c) vpn 0x%.8x ppn 0x%.8x asid 0x%.2x am 0x%x\n", | ||
355 | way, index, valid_chr, va, pa, asid, ca); | ||
356 | } | ||
357 | |||
358 | void print_itlb_entry (struct way_config_t *way_info, int way, int index) | ||
359 | { | ||
360 | print_entry (way_info, way, index, | ||
361 | read_itlb_virtual (way + (index << way_info->pgsz_log2)), | ||
362 | read_itlb_translation (way + (index << way_info->pgsz_log2))); | ||
363 | } | ||
364 | |||
365 | void print_dtlb_entry (struct way_config_t *way_info, int way, int index) | ||
366 | { | ||
367 | print_entry (way_info, way, index, | ||
368 | read_dtlb_virtual (way + (index << way_info->pgsz_log2)), | ||
369 | read_dtlb_translation (way + (index << way_info->pgsz_log2))); | ||
370 | } | ||
371 | |||
372 | void dump_itlb (void) | ||
373 | { | ||
374 | int way, index; | ||
375 | |||
376 | printk ("\nITLB: ways = %d\n", XCHAL_ITLB_WAYS); | ||
377 | |||
378 | for (way = 0; way < XCHAL_ITLB_WAYS; way++) { | ||
379 | printk ("\nWay: %d, Entries: %d, MinPageSize: %d, Type: %s\n", | ||
380 | way, itlb[way].indicies, | ||
381 | itlb[way].pgsz_log2, way_type(itlb[way].arf)); | ||
382 | for (index = 0; index < itlb[way].indicies; index++) { | ||
383 | print_itlb_entry(&itlb[way], way, index); | ||
384 | } | ||
385 | } | ||
386 | } | ||
387 | |||
388 | void dump_dtlb (void) | ||
389 | { | ||
390 | int way, index; | ||
391 | |||
392 | printk ("\nDTLB: ways = %d\n", XCHAL_DTLB_WAYS); | ||
393 | |||
394 | for (way = 0; way < XCHAL_DTLB_WAYS; way++) { | ||
395 | printk ("\nWay: %d, Entries: %d, MinPageSize: %d, Type: %s\n", | ||
396 | way, dtlb[way].indicies, | ||
397 | dtlb[way].pgsz_log2, way_type(dtlb[way].arf)); | ||
398 | for (index = 0; index < dtlb[way].indicies; index++) { | ||
399 | print_dtlb_entry(&dtlb[way], way, index); | ||
400 | } | ||
401 | } | ||
402 | } | ||
403 | |||
404 | void dump_tlb (tlb_dump_entry_t *tinfo, struct way_config_t *config, | ||
405 | int entries, int ways, int type, int show_invalid) | ||
406 | { | ||
407 | tlb_dump_entry_t *e = tinfo; | ||
408 | int way, i; | ||
409 | |||
410 | /* Gather all info: */ | ||
411 | for (way = 0; way < ways; way++) { | ||
412 | struct way_config_t *cfg = config + way; | ||
413 | for (i = 0; i < cfg->indicies; i++) { | ||
414 | unsigned wayindex = way + (i << cfg->pgsz_log2); | ||
415 | unsigned vv = (type ? read_dtlb_virtual (wayindex) | ||
416 | : read_itlb_virtual (wayindex)); | ||
417 | unsigned pp = (type ? read_dtlb_translation (wayindex) | ||
418 | : read_itlb_translation (wayindex)); | ||
419 | |||
420 | /* Compute and incorporate the effect of the index bits on the | ||
421 | * va. It's more useful for kernel debugging, since we always | ||
422 | * want to know the effective va anyway. */ | ||
423 | |||
424 | e->va = (vv & ~((1 << (cfg->pgsz_log2 + cfg->indicies_log2)) - 1)); | ||
425 | e->va += (i << cfg->pgsz_log2); | ||
426 | e->pa = (pp & ~((1 << cfg->pgsz_log2) - 1)); | ||
427 | e->asid = (vv & ((1 << XCHAL_MMU_ASID_BITS) - 1)); | ||
428 | e->ca = (pp & ((1 << XCHAL_MMU_CA_BITS) - 1)); | ||
429 | e->way = way; | ||
430 | e->index = i; | ||
431 | e->pgsz_log2 = cfg->pgsz_log2; | ||
432 | e->type = type; | ||
433 | e++; | ||
434 | } | ||
435 | } | ||
436 | #if 1 | ||
437 | /* Sort by ASID and VADDR: */ | ||
438 | sort_tlb_dump_info (tinfo, entries); | ||
439 | #endif | ||
440 | |||
441 | /* Display all sorted info: */ | ||
442 | printk ("\n%cTLB dump:\n", (type ? 'D' : 'I')); | ||
443 | for (e = tinfo, i = 0; i < entries; i++, e++) { | ||
444 | #if 0 | ||
445 | if (e->asid == 0 && !show_invalid) | ||
446 | continue; | ||
447 | #endif | ||
448 | printk ("%c way=%d i=%d ASID=%02X V=%08X -> P=%08X CA=%X (%d %cB)\n", | ||
449 | (e->type ? 'D' : 'I'), e->way, e->index, | ||
450 | e->asid, e->va, e->pa, e->ca, | ||
451 | (1 << (e->pgsz_log2 % 10)), | ||
452 | " kMG"[e->pgsz_log2 / 10] | ||
453 | ); | ||
454 | } | ||
455 | } | ||
456 | |||
457 | void dump_tlbs2 (int showinv) | ||
458 | { | ||
459 | dump_tlb (itlb_dump_info, itlb, ITLB_TOTAL_ENTRIES, XCHAL_ITLB_WAYS, 0, showinv); | ||
460 | dump_tlb (dtlb_dump_info, dtlb, DTLB_TOTAL_ENTRIES, XCHAL_DTLB_WAYS, 1, showinv); | ||
461 | } | ||
462 | |||
463 | void dump_all_tlbs (void) | ||
464 | { | ||
465 | dump_tlbs2 (1); | ||
466 | } | ||
467 | |||
468 | void dump_valid_tlbs (void) | ||
469 | { | ||
470 | dump_tlbs2 (0); | ||
471 | } | 143 | } |
472 | 144 | ||
473 | |||
474 | void dump_tlbs (void) | ||
475 | { | ||
476 | dump_itlb(); | ||
477 | dump_dtlb(); | ||
478 | } | ||
479 | |||
480 | void dump_cache_tag(int dcache, int idx) | ||
481 | { | ||
482 | int w, i, s, e; | ||
483 | unsigned long tag, index; | ||
484 | unsigned long num_lines, num_ways, cache_size, line_size; | ||
485 | |||
486 | num_ways = dcache ? XCHAL_DCACHE_WAYS : XCHAL_ICACHE_WAYS; | ||
487 | cache_size = dcache ? XCHAL_DCACHE_SIZE : XCHAL_ICACHE_SIZE; | ||
488 | line_size = dcache ? XCHAL_DCACHE_LINESIZE : XCHAL_ICACHE_LINESIZE; | ||
489 | |||
490 | num_lines = cache_size / num_ways; | ||
491 | |||
492 | s = 0; e = num_lines; | ||
493 | |||
494 | if (idx >= 0) | ||
495 | e = (s = idx * line_size) + 1; | ||
496 | |||
497 | for (i = s; i < e; i+= line_size) { | ||
498 | printk("\nline %#08x:", i); | ||
499 | for (w = 0; w < num_ways; w++) { | ||
500 | index = w * num_lines + i; | ||
501 | if (dcache) | ||
502 | __asm__ __volatile__("ldct %0, %1\n\t" | ||
503 | : "=a"(tag) : "a"(index)); | ||
504 | else | ||
505 | __asm__ __volatile__("lict %0, %1\n\t" | ||
506 | : "=a"(tag) : "a"(index)); | ||
507 | |||
508 | printk(" %#010lx", tag); | ||
509 | } | ||
510 | } | ||
511 | printk ("\n"); | ||
512 | } | ||
513 | |||
514 | void dump_icache(int index) | ||
515 | { | ||
516 | unsigned long data, addr; | ||
517 | int w, i; | ||
518 | |||
519 | const unsigned long num_ways = XCHAL_ICACHE_WAYS; | ||
520 | const unsigned long cache_size = XCHAL_ICACHE_SIZE; | ||
521 | const unsigned long line_size = XCHAL_ICACHE_LINESIZE; | ||
522 | const unsigned long num_lines = cache_size / num_ways / line_size; | ||
523 | |||
524 | for (w = 0; w < num_ways; w++) { | ||
525 | printk ("\nWay %d", w); | ||
526 | |||
527 | for (i = 0; i < line_size; i+= 4) { | ||
528 | addr = w * num_lines + index * line_size + i; | ||
529 | __asm__ __volatile__("licw %0, %1\n\t" | ||
530 | : "=a"(data) : "a"(addr)); | ||
531 | printk(" %#010lx", data); | ||
532 | } | ||
533 | } | ||
534 | printk ("\n"); | ||
535 | } | ||
536 | |||
537 | void dump_cache_tags(void) | ||
538 | { | ||
539 | printk("Instruction cache\n"); | ||
540 | dump_cache_tag(0, -1); | ||
541 | printk("Data cache\n"); | ||
542 | dump_cache_tag(1, -1); | ||
543 | } | ||
544 | |||
545 | #endif | ||
diff --git a/arch/xtensa/platform-iss/console.c b/arch/xtensa/platform-iss/console.c index 5c947cae7520..2f4f20ffe666 100644 --- a/arch/xtensa/platform-iss/console.c +++ b/arch/xtensa/platform-iss/console.c | |||
@@ -25,11 +25,15 @@ | |||
25 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
26 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
27 | 27 | ||
28 | #include <xtensa/simcall.h> | 28 | #include <asm/platform/simcall.h> |
29 | 29 | ||
30 | #include <linux/tty.h> | 30 | #include <linux/tty.h> |
31 | #include <linux/tty_flip.h> | 31 | #include <linux/tty_flip.h> |
32 | 32 | ||
33 | #ifdef SERIAL_INLINE | ||
34 | #define _INLINE_ inline | ||
35 | #endif | ||
36 | |||
33 | #define SERIAL_MAX_NUM_LINES 1 | 37 | #define SERIAL_MAX_NUM_LINES 1 |
34 | #define SERIAL_TIMER_VALUE (20 * HZ) | 38 | #define SERIAL_TIMER_VALUE (20 * HZ) |
35 | 39 | ||
@@ -191,7 +195,7 @@ static int rs_read_proc(char *page, char **start, off_t off, int count, | |||
191 | } | 195 | } |
192 | 196 | ||
193 | 197 | ||
194 | static const struct tty_operations serial_ops = { | 198 | static struct tty_operations serial_ops = { |
195 | .open = rs_open, | 199 | .open = rs_open, |
196 | .close = rs_close, | 200 | .close = rs_close, |
197 | .write = rs_write, | 201 | .write = rs_write, |
diff --git a/arch/xtensa/platform-iss/network.c b/arch/xtensa/platform-iss/network.c index 15d64414bd60..8ebfc8761229 100644 --- a/arch/xtensa/platform-iss/network.c +++ b/arch/xtensa/platform-iss/network.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/timer.h> | 34 | #include <linux/timer.h> |
35 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
36 | 36 | ||
37 | #include <xtensa/simcall.h> | 37 | #include <asm/platform/simcall.h> |
38 | 38 | ||
39 | #define DRIVER_NAME "iss-netdev" | 39 | #define DRIVER_NAME "iss-netdev" |
40 | #define ETH_MAX_PACKET 1500 | 40 | #define ETH_MAX_PACKET 1500 |