aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/osf_sys.c69
-rw-r--r--arch/frv/mm/Makefile2
-rw-r--r--arch/ia64/ia32/ia32_signal.c2
-rw-r--r--arch/ia64/kernel/acpi.c2
-rw-r--r--arch/ia64/kernel/irq.c4
-rw-r--r--arch/ia64/kernel/palinfo.c2
-rw-r--r--arch/ia64/kernel/perfmon.c199
-rw-r--r--arch/ia64/kernel/signal.c15
-rw-r--r--arch/ia64/kernel/smp.c68
-rw-r--r--arch/ia64/kernel/time.c5
-rw-r--r--arch/ia64/kernel/topology.c16
-rw-r--r--arch/ia64/kvm/kvm-ia64.c3
-rw-r--r--arch/m32r/Makefile2
-rw-r--r--arch/m32r/defconfig863
-rw-r--r--arch/m32r/kernel/vmlinux.lds.S3
-rw-r--r--arch/m68knommu/kernel/asm-offsets.c1
-rw-r--r--arch/m68knommu/kernel/entry.S9
-rw-r--r--arch/m68knommu/kernel/setup.c2
-rw-r--r--arch/m68knommu/kernel/signal.c21
-rw-r--r--arch/m68knommu/kernel/traps.c88
-rw-r--r--arch/m68knommu/kernel/vmlinux.lds.S3
-rw-r--r--arch/m68knommu/platform/5206e/config.c2
-rw-r--r--arch/m68knommu/platform/5272/config.c4
-rw-r--r--arch/m68knommu/platform/528x/config.c266
-rw-r--r--arch/m68knommu/platform/5307/config.c3
-rw-r--r--arch/m68knommu/platform/coldfire/entry.S18
-rw-r--r--arch/mips/kernel/binfmt_elfn32.c5
-rw-r--r--arch/mips/kernel/binfmt_elfo32.c5
-rw-r--r--arch/mips/kernel/irixioctl.c55
-rw-r--r--arch/mips/kernel/kspd.c1
-rw-r--r--arch/powerpc/kernel/time.c4
-rw-r--r--arch/powerpc/platforms/cell/spufs/coredump.c1
-rw-r--r--arch/x86/Kconfig16
-rw-r--r--arch/x86/Kconfig.cpu10
-rw-r--r--arch/x86/Kconfig.debug8
-rw-r--r--arch/x86/kernel/Makefile1
-rw-r--r--arch/x86/kernel/genapic_64.c2
-rw-r--r--arch/x86/kernel/head_32.S19
-rw-r--r--arch/x86/kernel/hpet.c5
-rw-r--r--arch/x86/kernel/pci-dma.c2
-rw-r--r--arch/x86/kernel/reboot.c1
-rw-r--r--arch/x86/kvm/i8254.c6
-rw-r--r--arch/x86/kvm/lapic.c6
-rw-r--r--arch/x86/mach-voyager/voyager_cat.c2
-rw-r--r--arch/x86/mm/highmem_32.c1
-rw-r--r--arch/x86/mm/ioremap.c23
-rw-r--r--arch/x86/mm/pageattr.c10
-rw-r--r--arch/x86/pci/Makefile_324
-rw-r--r--arch/x86/pci/i386.c12
-rw-r--r--arch/x86/vdso/vdso32-setup.c2
50 files changed, 611 insertions, 1262 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 9fee37e2596f..32ca1b927307 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -981,27 +981,18 @@ asmlinkage int
981osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, 981osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
982 struct timeval32 __user *tvp) 982 struct timeval32 __user *tvp)
983{ 983{
984 fd_set_bits fds; 984 s64 timeout = MAX_SCHEDULE_TIMEOUT;
985 char *bits;
986 size_t size;
987 long timeout;
988 int ret = -EINVAL;
989 struct fdtable *fdt;
990 int max_fds;
991
992 timeout = MAX_SCHEDULE_TIMEOUT;
993 if (tvp) { 985 if (tvp) {
994 time_t sec, usec; 986 time_t sec, usec;
995 987
996 if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp)) 988 if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp))
997 || __get_user(sec, &tvp->tv_sec) 989 || __get_user(sec, &tvp->tv_sec)
998 || __get_user(usec, &tvp->tv_usec)) { 990 || __get_user(usec, &tvp->tv_usec)) {
999 ret = -EFAULT; 991 return -EFAULT;
1000 goto out_nofds;
1001 } 992 }
1002 993
1003 if (sec < 0 || usec < 0) 994 if (sec < 0 || usec < 0)
1004 goto out_nofds; 995 return -EINVAL;
1005 996
1006 if ((unsigned long) sec < MAX_SELECT_SECONDS) { 997 if ((unsigned long) sec < MAX_SELECT_SECONDS) {
1007 timeout = (usec + 1000000/HZ - 1) / (1000000/HZ); 998 timeout = (usec + 1000000/HZ - 1) / (1000000/HZ);
@@ -1009,60 +1000,8 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
1009 } 1000 }
1010 } 1001 }
1011 1002
1012 rcu_read_lock();
1013 fdt = files_fdtable(current->files);
1014 max_fds = fdt->max_fds;
1015 rcu_read_unlock();
1016 if (n < 0 || n > max_fds)
1017 goto out_nofds;
1018
1019 /*
1020 * We need 6 bitmaps (in/out/ex for both incoming and outgoing),
1021 * since we used fdset we need to allocate memory in units of
1022 * long-words.
1023 */
1024 ret = -ENOMEM;
1025 size = FDS_BYTES(n);
1026 bits = kmalloc(6 * size, GFP_KERNEL);
1027 if (!bits)
1028 goto out_nofds;
1029 fds.in = (unsigned long *) bits;
1030 fds.out = (unsigned long *) (bits + size);
1031 fds.ex = (unsigned long *) (bits + 2*size);
1032 fds.res_in = (unsigned long *) (bits + 3*size);
1033 fds.res_out = (unsigned long *) (bits + 4*size);
1034 fds.res_ex = (unsigned long *) (bits + 5*size);
1035
1036 if ((ret = get_fd_set(n, inp->fds_bits, fds.in)) ||
1037 (ret = get_fd_set(n, outp->fds_bits, fds.out)) ||
1038 (ret = get_fd_set(n, exp->fds_bits, fds.ex)))
1039 goto out;
1040 zero_fd_set(n, fds.res_in);
1041 zero_fd_set(n, fds.res_out);
1042 zero_fd_set(n, fds.res_ex);
1043
1044 ret = do_select(n, &fds, &timeout);
1045
1046 /* OSF does not copy back the remaining time. */ 1003 /* OSF does not copy back the remaining time. */
1047 1004 return core_sys_select(n, inp, outp, exp, &timeout);
1048 if (ret < 0)
1049 goto out;
1050 if (!ret) {
1051 ret = -ERESTARTNOHAND;
1052 if (signal_pending(current))
1053 goto out;
1054 ret = 0;
1055 }
1056
1057 if (set_fd_set(n, inp->fds_bits, fds.res_in) ||
1058 set_fd_set(n, outp->fds_bits, fds.res_out) ||
1059 set_fd_set(n, exp->fds_bits, fds.res_ex))
1060 ret = -EFAULT;
1061
1062 out:
1063 kfree(bits);
1064 out_nofds:
1065 return ret;
1066} 1005}
1067 1006
1068struct rusage32 { 1007struct rusage32 {
diff --git a/arch/frv/mm/Makefile b/arch/frv/mm/Makefile
index fb8b1d860f46..1bca5ab8a6ab 100644
--- a/arch/frv/mm/Makefile
+++ b/arch/frv/mm/Makefile
@@ -6,4 +6,4 @@ obj-y := init.o kmap.o
6 6
7obj-$(CONFIG_MMU) += \ 7obj-$(CONFIG_MMU) += \
8 pgalloc.o highmem.o fault.o extable.o cache-page.o tlb-flush.o tlb-miss.o \ 8 pgalloc.o highmem.o fault.o extable.o cache-page.o tlb-flush.o tlb-miss.o \
9 mmu-context.o dma-alloc.o unaligned.o elf-fdpic.o 9 mmu-context.o dma-alloc.o elf-fdpic.o
diff --git a/arch/ia64/ia32/ia32_signal.c b/arch/ia64/ia32/ia32_signal.c
index 256a7faeda07..b763ca19ef17 100644
--- a/arch/ia64/ia32/ia32_signal.c
+++ b/arch/ia64/ia32/ia32_signal.c
@@ -463,7 +463,7 @@ sys32_sigsuspend (int history0, int history1, old_sigset_t mask)
463 463
464 current->state = TASK_INTERRUPTIBLE; 464 current->state = TASK_INTERRUPTIBLE;
465 schedule(); 465 schedule();
466 set_thread_flag(TIF_RESTORE_SIGMASK); 466 set_restore_sigmask();
467 return -ERESTARTNOHAND; 467 return -ERESTARTNOHAND;
468} 468}
469 469
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index c7467f863c7a..19709a079635 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -966,7 +966,7 @@ acpi_map_iosapics (void)
966fs_initcall(acpi_map_iosapics); 966fs_initcall(acpi_map_iosapics);
967#endif /* CONFIG_ACPI_NUMA */ 967#endif /* CONFIG_ACPI_NUMA */
968 968
969int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) 969int __ref acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base)
970{ 970{
971 int err; 971 int err;
972 972
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index 6dee579f205f..7fd18f54c056 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -183,10 +183,10 @@ void fixup_irqs(void)
183{ 183{
184 unsigned int irq; 184 unsigned int irq;
185 extern void ia64_process_pending_intr(void); 185 extern void ia64_process_pending_intr(void);
186 extern void ia64_disable_timer(void);
187 extern volatile int time_keeper_id; 186 extern volatile int time_keeper_id;
188 187
189 ia64_disable_timer(); 188 /* Mask ITV to disable timer */
189 ia64_set_itv(1 << 16);
190 190
191 /* 191 /*
192 * Find a new timesync master 192 * Find a new timesync master
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
index 396004e8cd14..4547a2092af9 100644
--- a/arch/ia64/kernel/palinfo.c
+++ b/arch/ia64/kernel/palinfo.c
@@ -1053,7 +1053,7 @@ static int __cpuinit palinfo_cpu_callback(struct notifier_block *nfb,
1053 return NOTIFY_OK; 1053 return NOTIFY_OK;
1054} 1054}
1055 1055
1056static struct notifier_block palinfo_cpu_notifier __cpuinitdata = 1056static struct notifier_block __refdata palinfo_cpu_notifier =
1057{ 1057{
1058 .notifier_call = palinfo_cpu_callback, 1058 .notifier_call = palinfo_cpu_callback,
1059 .priority = 0, 1059 .priority = 0,
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 7fbb51e10bbe..c1ad27de2dd2 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -867,7 +867,7 @@ pfm_rvfree(void *mem, unsigned long size)
867} 867}
868 868
869static pfm_context_t * 869static pfm_context_t *
870pfm_context_alloc(void) 870pfm_context_alloc(int ctx_flags)
871{ 871{
872 pfm_context_t *ctx; 872 pfm_context_t *ctx;
873 873
@@ -878,6 +878,46 @@ pfm_context_alloc(void)
878 ctx = kzalloc(sizeof(pfm_context_t), GFP_KERNEL); 878 ctx = kzalloc(sizeof(pfm_context_t), GFP_KERNEL);
879 if (ctx) { 879 if (ctx) {
880 DPRINT(("alloc ctx @%p\n", ctx)); 880 DPRINT(("alloc ctx @%p\n", ctx));
881
882 /*
883 * init context protection lock
884 */
885 spin_lock_init(&ctx->ctx_lock);
886
887 /*
888 * context is unloaded
889 */
890 ctx->ctx_state = PFM_CTX_UNLOADED;
891
892 /*
893 * initialization of context's flags
894 */
895 ctx->ctx_fl_block = (ctx_flags & PFM_FL_NOTIFY_BLOCK) ? 1 : 0;
896 ctx->ctx_fl_system = (ctx_flags & PFM_FL_SYSTEM_WIDE) ? 1: 0;
897 ctx->ctx_fl_no_msg = (ctx_flags & PFM_FL_OVFL_NO_MSG) ? 1: 0;
898 /*
899 * will move to set properties
900 * ctx->ctx_fl_excl_idle = (ctx_flags & PFM_FL_EXCL_IDLE) ? 1: 0;
901 */
902
903 /*
904 * init restart semaphore to locked
905 */
906 init_completion(&ctx->ctx_restart_done);
907
908 /*
909 * activation is used in SMP only
910 */
911 ctx->ctx_last_activation = PFM_INVALID_ACTIVATION;
912 SET_LAST_CPU(ctx, -1);
913
914 /*
915 * initialize notification message queue
916 */
917 ctx->ctx_msgq_head = ctx->ctx_msgq_tail = 0;
918 init_waitqueue_head(&ctx->ctx_msgq_wait);
919 init_waitqueue_head(&ctx->ctx_zombieq);
920
881 } 921 }
882 return ctx; 922 return ctx;
883} 923}
@@ -2165,28 +2205,21 @@ static struct dentry_operations pfmfs_dentry_operations = {
2165}; 2205};
2166 2206
2167 2207
2168static int 2208static struct file *
2169pfm_alloc_fd(struct file **cfile) 2209pfm_alloc_file(pfm_context_t *ctx)
2170{ 2210{
2171 int fd, ret = 0; 2211 struct file *file;
2172 struct file *file = NULL; 2212 struct inode *inode;
2173 struct inode * inode; 2213 struct dentry *dentry;
2174 char name[32]; 2214 char name[32];
2175 struct qstr this; 2215 struct qstr this;
2176 2216
2177 fd = get_unused_fd();
2178 if (fd < 0) return -ENFILE;
2179
2180 ret = -ENFILE;
2181
2182 file = get_empty_filp();
2183 if (!file) goto out;
2184
2185 /* 2217 /*
2186 * allocate a new inode 2218 * allocate a new inode
2187 */ 2219 */
2188 inode = new_inode(pfmfs_mnt->mnt_sb); 2220 inode = new_inode(pfmfs_mnt->mnt_sb);
2189 if (!inode) goto out; 2221 if (!inode)
2222 return ERR_PTR(-ENOMEM);
2190 2223
2191 DPRINT(("new inode ino=%ld @%p\n", inode->i_ino, inode)); 2224 DPRINT(("new inode ino=%ld @%p\n", inode->i_ino, inode));
2192 2225
@@ -2199,59 +2232,28 @@ pfm_alloc_fd(struct file **cfile)
2199 this.len = strlen(name); 2232 this.len = strlen(name);
2200 this.hash = inode->i_ino; 2233 this.hash = inode->i_ino;
2201 2234
2202 ret = -ENOMEM;
2203
2204 /* 2235 /*
2205 * allocate a new dcache entry 2236 * allocate a new dcache entry
2206 */ 2237 */
2207 file->f_path.dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); 2238 dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this);
2208 if (!file->f_path.dentry) goto out; 2239 if (!dentry) {
2240 iput(inode);
2241 return ERR_PTR(-ENOMEM);
2242 }
2209 2243
2210 file->f_path.dentry->d_op = &pfmfs_dentry_operations; 2244 dentry->d_op = &pfmfs_dentry_operations;
2245 d_add(dentry, inode);
2211 2246
2212 d_add(file->f_path.dentry, inode); 2247 file = alloc_file(pfmfs_mnt, dentry, FMODE_READ, &pfm_file_ops);
2213 file->f_path.mnt = mntget(pfmfs_mnt); 2248 if (!file) {
2214 file->f_mapping = inode->i_mapping; 2249 dput(dentry);
2250 return ERR_PTR(-ENFILE);
2251 }
2215 2252
2216 file->f_op = &pfm_file_ops;
2217 file->f_mode = FMODE_READ;
2218 file->f_flags = O_RDONLY; 2253 file->f_flags = O_RDONLY;
2219 file->f_pos = 0; 2254 file->private_data = ctx;
2220
2221 /*
2222 * may have to delay until context is attached?
2223 */
2224 fd_install(fd, file);
2225
2226 /*
2227 * the file structure we will use
2228 */
2229 *cfile = file;
2230
2231 return fd;
2232out:
2233 if (file) put_filp(file);
2234 put_unused_fd(fd);
2235 return ret;
2236}
2237
2238static void
2239pfm_free_fd(int fd, struct file *file)
2240{
2241 struct files_struct *files = current->files;
2242 struct fdtable *fdt;
2243 2255
2244 /* 2256 return file;
2245 * there ie no fd_uninstall(), so we do it here
2246 */
2247 spin_lock(&files->file_lock);
2248 fdt = files_fdtable(files);
2249 rcu_assign_pointer(fdt->fd[fd], NULL);
2250 spin_unlock(&files->file_lock);
2251
2252 if (file)
2253 put_filp(file);
2254 put_unused_fd(fd);
2255} 2257}
2256 2258
2257static int 2259static int
@@ -2475,6 +2477,7 @@ pfm_setup_buffer_fmt(struct task_struct *task, struct file *filp, pfm_context_t
2475 2477
2476 /* link buffer format and context */ 2478 /* link buffer format and context */
2477 ctx->ctx_buf_fmt = fmt; 2479 ctx->ctx_buf_fmt = fmt;
2480 ctx->ctx_fl_is_sampling = 1; /* assume record() is defined */
2478 2481
2479 /* 2482 /*
2480 * check if buffer format wants to use perfmon buffer allocation/mapping service 2483 * check if buffer format wants to use perfmon buffer allocation/mapping service
@@ -2669,78 +2672,45 @@ pfm_context_create(pfm_context_t *ctx, void *arg, int count, struct pt_regs *reg
2669{ 2672{
2670 pfarg_context_t *req = (pfarg_context_t *)arg; 2673 pfarg_context_t *req = (pfarg_context_t *)arg;
2671 struct file *filp; 2674 struct file *filp;
2675 struct path path;
2672 int ctx_flags; 2676 int ctx_flags;
2677 int fd;
2673 int ret; 2678 int ret;
2674 2679
2675 /* let's check the arguments first */ 2680 /* let's check the arguments first */
2676 ret = pfarg_is_sane(current, req); 2681 ret = pfarg_is_sane(current, req);
2677 if (ret < 0) return ret; 2682 if (ret < 0)
2683 return ret;
2678 2684
2679 ctx_flags = req->ctx_flags; 2685 ctx_flags = req->ctx_flags;
2680 2686
2681 ret = -ENOMEM; 2687 ret = -ENOMEM;
2682 2688
2683 ctx = pfm_context_alloc(); 2689 fd = get_unused_fd();
2684 if (!ctx) goto error; 2690 if (fd < 0)
2691 return fd;
2685 2692
2686 ret = pfm_alloc_fd(&filp); 2693 ctx = pfm_context_alloc(ctx_flags);
2687 if (ret < 0) goto error_file; 2694 if (!ctx)
2695 goto error;
2688 2696
2689 req->ctx_fd = ctx->ctx_fd = ret; 2697 filp = pfm_alloc_file(ctx);
2698 if (IS_ERR(filp)) {
2699 ret = PTR_ERR(filp);
2700 goto error_file;
2701 }
2690 2702
2691 /* 2703 req->ctx_fd = ctx->ctx_fd = fd;
2692 * attach context to file
2693 */
2694 filp->private_data = ctx;
2695 2704
2696 /* 2705 /*
2697 * does the user want to sample? 2706 * does the user want to sample?
2698 */ 2707 */
2699 if (pfm_uuid_cmp(req->ctx_smpl_buf_id, pfm_null_uuid)) { 2708 if (pfm_uuid_cmp(req->ctx_smpl_buf_id, pfm_null_uuid)) {
2700 ret = pfm_setup_buffer_fmt(current, filp, ctx, ctx_flags, 0, req); 2709 ret = pfm_setup_buffer_fmt(current, filp, ctx, ctx_flags, 0, req);
2701 if (ret) goto buffer_error; 2710 if (ret)
2711 goto buffer_error;
2702 } 2712 }
2703 2713
2704 /*
2705 * init context protection lock
2706 */
2707 spin_lock_init(&ctx->ctx_lock);
2708
2709 /*
2710 * context is unloaded
2711 */
2712 ctx->ctx_state = PFM_CTX_UNLOADED;
2713
2714 /*
2715 * initialization of context's flags
2716 */
2717 ctx->ctx_fl_block = (ctx_flags & PFM_FL_NOTIFY_BLOCK) ? 1 : 0;
2718 ctx->ctx_fl_system = (ctx_flags & PFM_FL_SYSTEM_WIDE) ? 1: 0;
2719 ctx->ctx_fl_is_sampling = ctx->ctx_buf_fmt ? 1 : 0; /* assume record() is defined */
2720 ctx->ctx_fl_no_msg = (ctx_flags & PFM_FL_OVFL_NO_MSG) ? 1: 0;
2721 /*
2722 * will move to set properties
2723 * ctx->ctx_fl_excl_idle = (ctx_flags & PFM_FL_EXCL_IDLE) ? 1: 0;
2724 */
2725
2726 /*
2727 * init restart semaphore to locked
2728 */
2729 init_completion(&ctx->ctx_restart_done);
2730
2731 /*
2732 * activation is used in SMP only
2733 */
2734 ctx->ctx_last_activation = PFM_INVALID_ACTIVATION;
2735 SET_LAST_CPU(ctx, -1);
2736
2737 /*
2738 * initialize notification message queue
2739 */
2740 ctx->ctx_msgq_head = ctx->ctx_msgq_tail = 0;
2741 init_waitqueue_head(&ctx->ctx_msgq_wait);
2742 init_waitqueue_head(&ctx->ctx_zombieq);
2743
2744 DPRINT(("ctx=%p flags=0x%x system=%d notify_block=%d excl_idle=%d no_msg=%d ctx_fd=%d \n", 2714 DPRINT(("ctx=%p flags=0x%x system=%d notify_block=%d excl_idle=%d no_msg=%d ctx_fd=%d \n",
2745 ctx, 2715 ctx,
2746 ctx_flags, 2716 ctx_flags,
@@ -2755,10 +2725,14 @@ pfm_context_create(pfm_context_t *ctx, void *arg, int count, struct pt_regs *reg
2755 */ 2725 */
2756 pfm_reset_pmu_state(ctx); 2726 pfm_reset_pmu_state(ctx);
2757 2727
2728 fd_install(fd, filp);
2729
2758 return 0; 2730 return 0;
2759 2731
2760buffer_error: 2732buffer_error:
2761 pfm_free_fd(ctx->ctx_fd, filp); 2733 path = filp->f_path;
2734 put_filp(filp);
2735 path_put(&path);
2762 2736
2763 if (ctx->ctx_buf_fmt) { 2737 if (ctx->ctx_buf_fmt) {
2764 pfm_buf_fmt_exit(ctx->ctx_buf_fmt, current, NULL, regs); 2738 pfm_buf_fmt_exit(ctx->ctx_buf_fmt, current, NULL, regs);
@@ -2767,6 +2741,7 @@ error_file:
2767 pfm_context_free(ctx); 2741 pfm_context_free(ctx);
2768 2742
2769error: 2743error:
2744 put_unused_fd(fd);
2770 return ret; 2745 return ret;
2771} 2746}
2772 2747
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
index 5740296c35af..19c5a78636fc 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -464,7 +464,7 @@ ia64_do_signal (struct sigscratch *scr, long in_syscall)
464 if (!user_mode(&scr->pt)) 464 if (!user_mode(&scr->pt))
465 return; 465 return;
466 466
467 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 467 if (current_thread_info()->status & TS_RESTORE_SIGMASK)
468 oldset = &current->saved_sigmask; 468 oldset = &current->saved_sigmask;
469 else 469 else
470 oldset = &current->blocked; 470 oldset = &current->blocked;
@@ -530,12 +530,13 @@ ia64_do_signal (struct sigscratch *scr, long in_syscall)
530 * continue to iterate in this loop so we can deliver the SIGSEGV... 530 * continue to iterate in this loop so we can deliver the SIGSEGV...
531 */ 531 */
532 if (handle_signal(signr, &ka, &info, oldset, scr)) { 532 if (handle_signal(signr, &ka, &info, oldset, scr)) {
533 /* a signal was successfully delivered; the saved 533 /*
534 * A signal was successfully delivered; the saved
534 * sigmask will have been stored in the signal frame, 535 * sigmask will have been stored in the signal frame,
535 * and will be restored by sigreturn, so we can simply 536 * and will be restored by sigreturn, so we can simply
536 * clear the TIF_RESTORE_SIGMASK flag */ 537 * clear the TS_RESTORE_SIGMASK flag.
537 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 538 */
538 clear_thread_flag(TIF_RESTORE_SIGMASK); 539 current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
539 return; 540 return;
540 } 541 }
541 } 542 }
@@ -566,8 +567,8 @@ ia64_do_signal (struct sigscratch *scr, long in_syscall)
566 567
567 /* if there's no signal to deliver, we just put the saved sigmask 568 /* if there's no signal to deliver, we just put the saved sigmask
568 * back */ 569 * back */
569 if (test_thread_flag(TIF_RESTORE_SIGMASK)) { 570 if (current_thread_info()->status & TS_RESTORE_SIGMASK) {
570 clear_thread_flag(TIF_RESTORE_SIGMASK); 571 current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
571 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL); 572 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
572 } 573 }
573} 574}
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 9a9d4c489330..983296f1c813 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -98,8 +98,33 @@ unlock_ipi_calllock(void)
98 spin_unlock_irq(&call_lock); 98 spin_unlock_irq(&call_lock);
99} 99}
100 100
101static inline void
102handle_call_data(void)
103{
104 struct call_data_struct *data;
105 void (*func)(void *info);
106 void *info;
107 int wait;
108
109 /* release the 'pointer lock' */
110 data = (struct call_data_struct *)call_data;
111 func = data->func;
112 info = data->info;
113 wait = data->wait;
114
115 mb();
116 atomic_inc(&data->started);
117 /* At this point the structure may be gone unless wait is true. */
118 (*func)(info);
119
120 /* Notify the sending CPU that the task is done. */
121 mb();
122 if (wait)
123 atomic_inc(&data->finished);
124}
125
101static void 126static void
102stop_this_cpu (void) 127stop_this_cpu(void)
103{ 128{
104 /* 129 /*
105 * Remove this CPU: 130 * Remove this CPU:
@@ -138,44 +163,21 @@ handle_IPI (int irq, void *dev_id)
138 ops &= ~(1 << which); 163 ops &= ~(1 << which);
139 164
140 switch (which) { 165 switch (which) {
141 case IPI_CALL_FUNC: 166 case IPI_CALL_FUNC:
142 { 167 handle_call_data();
143 struct call_data_struct *data; 168 break;
144 void (*func)(void *info); 169
145 void *info; 170 case IPI_CPU_STOP:
146 int wait;
147
148 /* release the 'pointer lock' */
149 data = (struct call_data_struct *) call_data;
150 func = data->func;
151 info = data->info;
152 wait = data->wait;
153
154 mb();
155 atomic_inc(&data->started);
156 /*
157 * At this point the structure may be gone unless
158 * wait is true.
159 */
160 (*func)(info);
161
162 /* Notify the sending CPU that the task is done. */
163 mb();
164 if (wait)
165 atomic_inc(&data->finished);
166 }
167 break;
168
169 case IPI_CPU_STOP:
170 stop_this_cpu(); 171 stop_this_cpu();
171 break; 172 break;
172#ifdef CONFIG_KEXEC 173#ifdef CONFIG_KEXEC
173 case IPI_KDUMP_CPU_STOP: 174 case IPI_KDUMP_CPU_STOP:
174 unw_init_running(kdump_cpu_freeze, NULL); 175 unw_init_running(kdump_cpu_freeze, NULL);
175 break; 176 break;
176#endif 177#endif
177 default: 178 default:
178 printk(KERN_CRIT "Unknown IPI on CPU %d: %lu\n", this_cpu, which); 179 printk(KERN_CRIT "Unknown IPI on CPU %d: %lu\n",
180 this_cpu, which);
179 break; 181 break;
180 } 182 }
181 } while (ops); 183 } while (ops);
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 48e15a51782f..8c73643f2d66 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -379,11 +379,6 @@ static struct irqaction timer_irqaction = {
379 .name = "timer" 379 .name = "timer"
380}; 380};
381 381
382void __devinit ia64_disable_timer(void)
383{
384 ia64_set_itv(1 << 16);
385}
386
387void __init 382void __init
388time_init (void) 383time_init (void)
389{ 384{
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index abb17a613b17..26228e2d01ae 100644
--- a/arch/ia64/kernel/topology.c
+++ b/arch/ia64/kernel/topology.c
@@ -36,9 +36,11 @@ void arch_fix_phys_package_id(int num, u32 slot)
36} 36}
37EXPORT_SYMBOL_GPL(arch_fix_phys_package_id); 37EXPORT_SYMBOL_GPL(arch_fix_phys_package_id);
38 38
39int arch_register_cpu(int num) 39
40#ifdef CONFIG_HOTPLUG_CPU
41int __ref arch_register_cpu(int num)
40{ 42{
41#if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU) 43#ifdef CONFIG_ACPI
42 /* 44 /*
43 * If CPEI can be re-targetted or if this is not 45 * If CPEI can be re-targetted or if this is not
44 * CPEI target, then it is hotpluggable 46 * CPEI target, then it is hotpluggable
@@ -47,19 +49,21 @@ int arch_register_cpu(int num)
47 sysfs_cpus[num].cpu.hotpluggable = 1; 49 sysfs_cpus[num].cpu.hotpluggable = 1;
48 map_cpu_to_node(num, node_cpuid[num].nid); 50 map_cpu_to_node(num, node_cpuid[num].nid);
49#endif 51#endif
50
51 return register_cpu(&sysfs_cpus[num].cpu, num); 52 return register_cpu(&sysfs_cpus[num].cpu, num);
52} 53}
53 54EXPORT_SYMBOL(arch_register_cpu);
54#ifdef CONFIG_HOTPLUG_CPU
55 55
56void arch_unregister_cpu(int num) 56void arch_unregister_cpu(int num)
57{ 57{
58 unregister_cpu(&sysfs_cpus[num].cpu); 58 unregister_cpu(&sysfs_cpus[num].cpu);
59 unmap_cpu_from_node(num, cpu_to_node(num)); 59 unmap_cpu_from_node(num, cpu_to_node(num));
60} 60}
61EXPORT_SYMBOL(arch_register_cpu);
62EXPORT_SYMBOL(arch_unregister_cpu); 61EXPORT_SYMBOL(arch_unregister_cpu);
62#else
63static int __init arch_register_cpu(int num)
64{
65 return register_cpu(&sysfs_cpus[num].cpu, num);
66}
63#endif /*CONFIG_HOTPLUG_CPU*/ 67#endif /*CONFIG_HOTPLUG_CPU*/
64 68
65 69
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 6df073240135..318b81100623 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -1,4 +1,3 @@
1
2/* 1/*
3 * kvm_ia64.c: Basic KVM suppport On Itanium series processors 2 * kvm_ia64.c: Basic KVM suppport On Itanium series processors
4 * 3 *
@@ -431,7 +430,7 @@ int kvm_emulate_halt(struct kvm_vcpu *vcpu)
431 if (itc_diff < 0) 430 if (itc_diff < 0)
432 itc_diff = -itc_diff; 431 itc_diff = -itc_diff;
433 432
434 expires = div64_64(itc_diff, cyc_per_usec); 433 expires = div64_u64(itc_diff, cyc_per_usec);
435 kt = ktime_set(0, 1000 * expires); 434 kt = ktime_set(0, 1000 * expires);
436 vcpu->arch.ht_active = 1; 435 vcpu->arch.ht_active = 1;
437 hrtimer_start(p_ht, kt, HRTIMER_MODE_ABS); 436 hrtimer_start(p_ht, kt, HRTIMER_MODE_ABS);
diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile
index 4072a07ebf8e..469766b24e22 100644
--- a/arch/m32r/Makefile
+++ b/arch/m32r/Makefile
@@ -5,6 +5,8 @@
5# architecture-specific flags and dependencies. 5# architecture-specific flags and dependencies.
6# 6#
7 7
8KBUILD_DEFCONFIG := m32700ut.smp_defconfig
9
8LDFLAGS := 10LDFLAGS :=
9OBJCOPYFLAGS := -O binary -R .note -R .comment -S 11OBJCOPYFLAGS := -O binary -R .note -R .comment -S
10LDFLAGS_vmlinux := 12LDFLAGS_vmlinux :=
diff --git a/arch/m32r/defconfig b/arch/m32r/defconfig
deleted file mode 100644
index af3b98179113..000000000000
--- a/arch/m32r/defconfig
+++ /dev/null
@@ -1,863 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23-rc1
4# Wed Aug 1 17:22:35 2007
5#
6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_ZONE_DMA=y
9CONFIG_GENERIC_HARDIRQS=y
10CONFIG_GENERIC_IRQ_PROBE=y
11CONFIG_NO_IOPORT=y
12CONFIG_NO_DMA=y
13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
14
15#
16# Code maturity level options
17#
18CONFIG_EXPERIMENTAL=y
19CONFIG_LOCK_KERNEL=y
20CONFIG_INIT_ENV_ARG_LIMIT=32
21
22#
23# General setup
24#
25CONFIG_LOCALVERSION=""
26CONFIG_LOCALVERSION_AUTO=y
27CONFIG_SWAP=y
28CONFIG_SYSVIPC=y
29CONFIG_SYSVIPC_SYSCTL=y
30# CONFIG_POSIX_MQUEUE is not set
31CONFIG_BSD_PROCESS_ACCT=y
32# CONFIG_BSD_PROCESS_ACCT_V3 is not set
33# CONFIG_TASKSTATS is not set
34# CONFIG_USER_NS is not set
35# CONFIG_AUDIT is not set
36CONFIG_IKCONFIG=y
37CONFIG_IKCONFIG_PROC=y
38CONFIG_LOG_BUF_SHIFT=15
39# CONFIG_CPUSETS is not set
40CONFIG_SYSFS_DEPRECATED=y
41# CONFIG_RELAY is not set
42# CONFIG_BLK_DEV_INITRD is not set
43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
44CONFIG_SYSCTL=y
45CONFIG_EMBEDDED=y
46CONFIG_SYSCTL_SYSCALL=y
47# CONFIG_KALLSYMS is not set
48CONFIG_HOTPLUG=y
49CONFIG_PRINTK=y
50CONFIG_BUG=y
51CONFIG_ELF_CORE=y
52CONFIG_BASE_FULL=y
53# CONFIG_FUTEX is not set
54CONFIG_ANON_INODES=y
55# CONFIG_EPOLL is not set
56CONFIG_SIGNALFD=y
57CONFIG_TIMERFD=y
58CONFIG_EVENTFD=y
59CONFIG_SHMEM=y
60CONFIG_VM_EVENT_COUNTERS=y
61CONFIG_SLAB=y
62# CONFIG_SLUB is not set
63# CONFIG_SLOB is not set
64# CONFIG_TINY_SHMEM is not set
65CONFIG_BASE_SMALL=0
66CONFIG_MODULES=y
67CONFIG_MODULE_UNLOAD=y
68# CONFIG_MODULE_FORCE_UNLOAD is not set
69# CONFIG_MODVERSIONS is not set
70# CONFIG_MODULE_SRCVERSION_ALL is not set
71CONFIG_KMOD=y
72CONFIG_STOP_MACHINE=y
73CONFIG_BLOCK=y
74# CONFIG_LBD is not set
75# CONFIG_BLK_DEV_IO_TRACE is not set
76# CONFIG_LSF is not set
77# CONFIG_BLK_DEV_BSG is not set
78
79#
80# IO Schedulers
81#
82CONFIG_IOSCHED_NOOP=y
83# CONFIG_IOSCHED_AS is not set
84CONFIG_IOSCHED_DEADLINE=y
85CONFIG_IOSCHED_CFQ=y
86# CONFIG_DEFAULT_AS is not set
87# CONFIG_DEFAULT_DEADLINE is not set
88CONFIG_DEFAULT_CFQ=y
89# CONFIG_DEFAULT_NOOP is not set
90CONFIG_DEFAULT_IOSCHED="cfq"
91
92#
93# Processor type and features
94#
95# CONFIG_PLAT_MAPPI is not set
96# CONFIG_PLAT_USRV is not set
97CONFIG_PLAT_M32700UT=y
98# CONFIG_PLAT_OPSPUT is not set
99# CONFIG_PLAT_OAKS32R is not set
100# CONFIG_PLAT_MAPPI2 is not set
101# CONFIG_PLAT_MAPPI3 is not set
102# CONFIG_PLAT_M32104UT is not set
103CONFIG_CHIP_M32700=y
104# CONFIG_CHIP_M32102 is not set
105# CONFIG_CHIP_M32104 is not set
106# CONFIG_CHIP_VDEC2 is not set
107# CONFIG_CHIP_OPSP is not set
108CONFIG_MMU=y
109CONFIG_TLB_ENTRIES=32
110CONFIG_ISA_M32R2=y
111CONFIG_ISA_DSP_LEVEL2=y
112CONFIG_ISA_DUAL_ISSUE=y
113CONFIG_BUS_CLOCK=50000000
114CONFIG_TIMER_DIVIDE=128
115# CONFIG_CPU_LITTLE_ENDIAN is not set
116CONFIG_MEMORY_START=0x08000000
117CONFIG_MEMORY_SIZE=0x01000000
118CONFIG_NOHIGHMEM=y
119CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
120CONFIG_SELECT_MEMORY_MODEL=y
121# CONFIG_FLATMEM_MANUAL is not set
122CONFIG_DISCONTIGMEM_MANUAL=y
123# CONFIG_SPARSEMEM_MANUAL is not set
124CONFIG_DISCONTIGMEM=y
125CONFIG_FLAT_NODE_MEM_MAP=y
126CONFIG_NEED_MULTIPLE_NODES=y
127# CONFIG_SPARSEMEM_STATIC is not set
128CONFIG_SPLIT_PTLOCK_CPUS=4
129# CONFIG_RESOURCES_64BIT is not set
130CONFIG_ZONE_DMA_FLAG=1
131CONFIG_BOUNCE=y
132CONFIG_VIRT_TO_BUS=y
133CONFIG_IRAM_START=0x00f00000
134CONFIG_IRAM_SIZE=0x00080000
135CONFIG_RWSEM_GENERIC_SPINLOCK=y
136# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
137# CONFIG_ARCH_HAS_ILOG2_U32 is not set
138# CONFIG_ARCH_HAS_ILOG2_U64 is not set
139CONFIG_GENERIC_FIND_NEXT_BIT=y
140CONFIG_GENERIC_HWEIGHT=y
141CONFIG_GENERIC_CALIBRATE_DELAY=y
142CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
143CONFIG_PREEMPT=y
144CONFIG_SMP=y
145# CONFIG_CHIP_M32700_TS1 is not set
146CONFIG_NR_CPUS=2
147CONFIG_NODES_SHIFT=1
148
149#
150# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
151#
152# CONFIG_ARCH_SUPPORTS_MSI is not set
153# CONFIG_ISA is not set
154
155#
156# PCCARD (PCMCIA/CardBus) support
157#
158# CONFIG_PCCARD is not set
159
160#
161# Executable file formats
162#
163CONFIG_BINFMT_ELF=y
164# CONFIG_BINFMT_MISC is not set
165
166#
167# Networking
168#
169CONFIG_NET=y
170
171#
172# Networking options
173#
174CONFIG_PACKET=y
175# CONFIG_PACKET_MMAP is not set
176CONFIG_UNIX=y
177CONFIG_XFRM=y
178# CONFIG_XFRM_USER is not set
179# CONFIG_XFRM_SUB_POLICY is not set
180# CONFIG_XFRM_MIGRATE is not set
181# CONFIG_NET_KEY is not set
182CONFIG_INET=y
183# CONFIG_IP_MULTICAST is not set
184# CONFIG_IP_ADVANCED_ROUTER is not set
185CONFIG_IP_FIB_HASH=y
186CONFIG_IP_PNP=y
187CONFIG_IP_PNP_DHCP=y
188# CONFIG_IP_PNP_BOOTP is not set
189# CONFIG_IP_PNP_RARP is not set
190# CONFIG_NET_IPIP is not set
191# CONFIG_NET_IPGRE is not set
192# CONFIG_ARPD is not set
193# CONFIG_SYN_COOKIES is not set
194# CONFIG_INET_AH is not set
195# CONFIG_INET_ESP is not set
196# CONFIG_INET_IPCOMP is not set
197# CONFIG_INET_XFRM_TUNNEL is not set
198# CONFIG_INET_TUNNEL is not set
199CONFIG_INET_XFRM_MODE_TRANSPORT=y
200CONFIG_INET_XFRM_MODE_TUNNEL=y
201CONFIG_INET_XFRM_MODE_BEET=y
202CONFIG_INET_DIAG=y
203CONFIG_INET_TCP_DIAG=y
204# CONFIG_TCP_CONG_ADVANCED is not set
205CONFIG_TCP_CONG_CUBIC=y
206CONFIG_DEFAULT_TCP_CONG="cubic"
207# CONFIG_TCP_MD5SIG is not set
208# CONFIG_IPV6 is not set
209# CONFIG_INET6_XFRM_TUNNEL is not set
210# CONFIG_INET6_TUNNEL is not set
211# CONFIG_NETWORK_SECMARK is not set
212# CONFIG_NETFILTER is not set
213# CONFIG_IP_DCCP is not set
214# CONFIG_IP_SCTP is not set
215# CONFIG_TIPC is not set
216# CONFIG_ATM is not set
217# CONFIG_BRIDGE is not set
218# CONFIG_VLAN_8021Q is not set
219# CONFIG_DECNET is not set
220# CONFIG_LLC2 is not set
221# CONFIG_IPX is not set
222# CONFIG_ATALK is not set
223# CONFIG_X25 is not set
224# CONFIG_LAPB is not set
225# CONFIG_ECONET is not set
226# CONFIG_WAN_ROUTER is not set
227
228#
229# QoS and/or fair queueing
230#
231# CONFIG_NET_SCHED is not set
232
233#
234# Network testing
235#
236# CONFIG_NET_PKTGEN is not set
237# CONFIG_HAMRADIO is not set
238# CONFIG_IRDA is not set
239# CONFIG_BT is not set
240# CONFIG_AF_RXRPC is not set
241
242#
243# Wireless
244#
245# CONFIG_CFG80211 is not set
246# CONFIG_WIRELESS_EXT is not set
247# CONFIG_MAC80211 is not set
248# CONFIG_IEEE80211 is not set
249# CONFIG_RFKILL is not set
250# CONFIG_NET_9P is not set
251
252#
253# Device Drivers
254#
255
256#
257# Generic Driver Options
258#
259CONFIG_STANDALONE=y
260CONFIG_PREVENT_FIRMWARE_BUILD=y
261CONFIG_FW_LOADER=y
262# CONFIG_SYS_HYPERVISOR is not set
263# CONFIG_CONNECTOR is not set
264CONFIG_MTD=y
265# CONFIG_MTD_DEBUG is not set
266# CONFIG_MTD_CONCAT is not set
267CONFIG_MTD_PARTITIONS=y
268CONFIG_MTD_REDBOOT_PARTS=y
269CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
270# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
271# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
272# CONFIG_MTD_CMDLINE_PARTS is not set
273
274#
275# User Modules And Translation Layers
276#
277# CONFIG_MTD_CHAR is not set
278CONFIG_MTD_BLKDEVS=y
279CONFIG_MTD_BLOCK=y
280# CONFIG_FTL is not set
281# CONFIG_NFTL is not set
282# CONFIG_INFTL is not set
283# CONFIG_RFD_FTL is not set
284# CONFIG_SSFDC is not set
285
286#
287# RAM/ROM/Flash chip drivers
288#
289CONFIG_MTD_CFI=m
290CONFIG_MTD_JEDECPROBE=m
291CONFIG_MTD_GEN_PROBE=m
292CONFIG_MTD_CFI_ADV_OPTIONS=y
293# CONFIG_MTD_CFI_NOSWAP is not set
294CONFIG_MTD_CFI_BE_BYTE_SWAP=y
295# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
296CONFIG_MTD_CFI_GEOMETRY=y
297CONFIG_MTD_MAP_BANK_WIDTH_1=y
298CONFIG_MTD_MAP_BANK_WIDTH_2=y
299CONFIG_MTD_MAP_BANK_WIDTH_4=y
300# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
301# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
302# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
303CONFIG_MTD_CFI_I1=y
304# CONFIG_MTD_CFI_I2 is not set
305# CONFIG_MTD_CFI_I4 is not set
306# CONFIG_MTD_CFI_I8 is not set
307# CONFIG_MTD_OTP is not set
308# CONFIG_MTD_CFI_INTELEXT is not set
309CONFIG_MTD_CFI_AMDSTD=m
310# CONFIG_MTD_CFI_STAA is not set
311CONFIG_MTD_CFI_UTIL=m
312# CONFIG_MTD_RAM is not set
313# CONFIG_MTD_ROM is not set
314# CONFIG_MTD_ABSENT is not set
315
316#
317# Mapping drivers for chip access
318#
319# CONFIG_MTD_COMPLEX_MAPPINGS is not set
320# CONFIG_MTD_PHYSMAP is not set
321# CONFIG_MTD_PLATRAM is not set
322
323#
324# Self-contained MTD device drivers
325#
326# CONFIG_MTD_SLRAM is not set
327# CONFIG_MTD_PHRAM is not set
328# CONFIG_MTD_MTDRAM is not set
329# CONFIG_MTD_BLOCK2MTD is not set
330
331#
332# Disk-On-Chip Device Drivers
333#
334# CONFIG_MTD_DOC2000 is not set
335# CONFIG_MTD_DOC2001 is not set
336# CONFIG_MTD_DOC2001PLUS is not set
337# CONFIG_MTD_NAND is not set
338# CONFIG_MTD_ONENAND is not set
339
340#
341# UBI - Unsorted block images
342#
343# CONFIG_MTD_UBI is not set
344# CONFIG_PARPORT is not set
345CONFIG_BLK_DEV=y
346# CONFIG_BLK_DEV_COW_COMMON is not set
347CONFIG_BLK_DEV_LOOP=y
348# CONFIG_BLK_DEV_CRYPTOLOOP is not set
349CONFIG_BLK_DEV_NBD=y
350CONFIG_BLK_DEV_RAM=y
351CONFIG_BLK_DEV_RAM_COUNT=16
352CONFIG_BLK_DEV_RAM_SIZE=4096
353CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
354# CONFIG_CDROM_PKTCDVD is not set
355CONFIG_ATA_OVER_ETH=m
356CONFIG_MISC_DEVICES=y
357# CONFIG_EEPROM_93CX6 is not set
358CONFIG_IDE=y
359CONFIG_IDE_MAX_HWIFS=4
360CONFIG_BLK_DEV_IDE=y
361
362#
363# Please see Documentation/ide.txt for help/info on IDE drives
364#
365# CONFIG_BLK_DEV_IDE_SATA is not set
366CONFIG_BLK_DEV_IDEDISK=y
367# CONFIG_IDEDISK_MULTI_MODE is not set
368CONFIG_BLK_DEV_IDECD=m
369# CONFIG_BLK_DEV_IDETAPE is not set
370# CONFIG_BLK_DEV_IDEFLOPPY is not set
371# CONFIG_BLK_DEV_IDESCSI is not set
372# CONFIG_IDE_TASK_IOCTL is not set
373CONFIG_IDE_PROC_FS=y
374
375#
376# IDE chipset support/bugfixes
377#
378CONFIG_IDE_GENERIC=y
379# CONFIG_IDEPCI_PCIBUS_ORDER is not set
380# CONFIG_IDE_ARM is not set
381# CONFIG_BLK_DEV_IDEDMA is not set
382# CONFIG_BLK_DEV_HD is not set
383
384#
385# SCSI device support
386#
387# CONFIG_RAID_ATTRS is not set
388CONFIG_SCSI=m
389# CONFIG_SCSI_DMA is not set
390# CONFIG_SCSI_TGT is not set
391# CONFIG_SCSI_NETLINK is not set
392CONFIG_SCSI_PROC_FS=y
393
394#
395# SCSI support type (disk, tape, CD-ROM)
396#
397CONFIG_BLK_DEV_SD=m
398# CONFIG_CHR_DEV_ST is not set
399# CONFIG_CHR_DEV_OSST is not set
400CONFIG_BLK_DEV_SR=m
401# CONFIG_BLK_DEV_SR_VENDOR is not set
402CONFIG_CHR_DEV_SG=m
403# CONFIG_CHR_DEV_SCH is not set
404
405#
406# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
407#
408CONFIG_SCSI_MULTI_LUN=y
409# CONFIG_SCSI_CONSTANTS is not set
410# CONFIG_SCSI_LOGGING is not set
411# CONFIG_SCSI_SCAN_ASYNC is not set
412CONFIG_SCSI_WAIT_SCAN=m
413
414#
415# SCSI Transports
416#
417# CONFIG_SCSI_SPI_ATTRS is not set
418# CONFIG_SCSI_FC_ATTRS is not set
419# CONFIG_SCSI_ISCSI_ATTRS is not set
420# CONFIG_SCSI_SAS_LIBSAS is not set
421CONFIG_SCSI_LOWLEVEL=y
422# CONFIG_ISCSI_TCP is not set
423# CONFIG_SCSI_DEBUG is not set
424# CONFIG_MD is not set
425CONFIG_NETDEVICES=y
426# CONFIG_NETDEVICES_MULTIQUEUE is not set
427# CONFIG_DUMMY is not set
428# CONFIG_BONDING is not set
429# CONFIG_MACVLAN is not set
430# CONFIG_EQUALIZER is not set
431# CONFIG_TUN is not set
432# CONFIG_PHYLIB is not set
433CONFIG_NET_ETHERNET=y
434CONFIG_MII=y
435CONFIG_SMC91X=y
436# CONFIG_NE2000 is not set
437CONFIG_NETDEV_1000=y
438CONFIG_NETDEV_10000=y
439
440#
441# Wireless LAN
442#
443# CONFIG_WLAN_PRE80211 is not set
444# CONFIG_WLAN_80211 is not set
445# CONFIG_WAN is not set
446# CONFIG_PPP is not set
447# CONFIG_SLIP is not set
448# CONFIG_SHAPER is not set
449# CONFIG_NETCONSOLE is not set
450# CONFIG_NETPOLL is not set
451# CONFIG_NET_POLL_CONTROLLER is not set
452# CONFIG_ISDN is not set
453# CONFIG_PHONE is not set
454
455#
456# Input device support
457#
458CONFIG_INPUT=y
459# CONFIG_INPUT_FF_MEMLESS is not set
460# CONFIG_INPUT_POLLDEV is not set
461
462#
463# Userland interfaces
464#
465# CONFIG_INPUT_MOUSEDEV is not set
466# CONFIG_INPUT_JOYDEV is not set
467# CONFIG_INPUT_TSDEV is not set
468# CONFIG_INPUT_EVDEV is not set
469# CONFIG_INPUT_EVBUG is not set
470
471#
472# Input Device Drivers
473#
474# CONFIG_INPUT_KEYBOARD is not set
475# CONFIG_INPUT_MOUSE is not set
476# CONFIG_INPUT_JOYSTICK is not set
477# CONFIG_INPUT_TABLET is not set
478# CONFIG_INPUT_TOUCHSCREEN is not set
479# CONFIG_INPUT_MISC is not set
480
481#
482# Hardware I/O ports
483#
484CONFIG_SERIO=y
485# CONFIG_SERIO_I8042 is not set
486CONFIG_SERIO_SERPORT=y
487# CONFIG_SERIO_LIBPS2 is not set
488# CONFIG_SERIO_RAW is not set
489# CONFIG_GAMEPORT is not set
490
491#
492# Character devices
493#
494CONFIG_VT=y
495CONFIG_VT_CONSOLE=y
496CONFIG_HW_CONSOLE=y
497# CONFIG_VT_HW_CONSOLE_BINDING is not set
498# CONFIG_SERIAL_NONSTANDARD is not set
499
500#
501# Serial drivers
502#
503# CONFIG_SERIAL_8250 is not set
504
505#
506# Non-8250 serial port support
507#
508CONFIG_SERIAL_CORE=y
509CONFIG_SERIAL_CORE_CONSOLE=y
510CONFIG_SERIAL_M32R_SIO=y
511CONFIG_SERIAL_M32R_SIO_CONSOLE=y
512CONFIG_SERIAL_M32R_PLDSIO=y
513CONFIG_UNIX98_PTYS=y
514CONFIG_LEGACY_PTYS=y
515CONFIG_LEGACY_PTY_COUNT=256
516# CONFIG_IPMI_HANDLER is not set
517# CONFIG_WATCHDOG is not set
518CONFIG_HW_RANDOM=y
519# CONFIG_RTC is not set
520CONFIG_DS1302=y
521# CONFIG_R3964 is not set
522# CONFIG_RAW_DRIVER is not set
523# CONFIG_TCG_TPM is not set
524# CONFIG_I2C is not set
525
526#
527# SPI support
528#
529# CONFIG_SPI is not set
530# CONFIG_SPI_MASTER is not set
531# CONFIG_W1 is not set
532# CONFIG_POWER_SUPPLY is not set
533CONFIG_HWMON=y
534# CONFIG_HWMON_VID is not set
535# CONFIG_SENSORS_ABITUGURU is not set
536# CONFIG_SENSORS_ABITUGURU3 is not set
537# CONFIG_SENSORS_F71805F is not set
538# CONFIG_SENSORS_IT87 is not set
539# CONFIG_SENSORS_PC87360 is not set
540# CONFIG_SENSORS_PC87427 is not set
541# CONFIG_SENSORS_SMSC47M1 is not set
542# CONFIG_SENSORS_SMSC47B397 is not set
543# CONFIG_SENSORS_VT1211 is not set
544# CONFIG_SENSORS_W83627HF is not set
545# CONFIG_SENSORS_W83627EHF is not set
546# CONFIG_HWMON_DEBUG_CHIP is not set
547
548#
549# Multifunction device drivers
550#
551# CONFIG_MFD_SM501 is not set
552
553#
554# Multimedia devices
555#
556CONFIG_VIDEO_DEV=m
557CONFIG_VIDEO_V4L1=y
558CONFIG_VIDEO_V4L1_COMPAT=y
559CONFIG_VIDEO_V4L2=y
560CONFIG_VIDEO_CAPTURE_DRIVERS=y
561# CONFIG_VIDEO_ADV_DEBUG is not set
562CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
563# CONFIG_VIDEO_CPIA is not set
564CONFIG_VIDEO_M32R_AR=m
565CONFIG_VIDEO_M32R_AR_M64278=m
566CONFIG_RADIO_ADAPTERS=y
567# CONFIG_DVB_CORE is not set
568CONFIG_DAB=y
569
570#
571# Graphics support
572#
573# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
574
575#
576# Display device support
577#
578# CONFIG_DISPLAY_SUPPORT is not set
579# CONFIG_VGASTATE is not set
580CONFIG_VIDEO_OUTPUT_CONTROL=m
581CONFIG_FB=y
582CONFIG_FIRMWARE_EDID=y
583# CONFIG_FB_DDC is not set
584CONFIG_FB_CFB_FILLRECT=y
585CONFIG_FB_CFB_COPYAREA=y
586CONFIG_FB_CFB_IMAGEBLIT=y
587# CONFIG_FB_SYS_FILLRECT is not set
588# CONFIG_FB_SYS_COPYAREA is not set
589# CONFIG_FB_SYS_IMAGEBLIT is not set
590# CONFIG_FB_SYS_FOPS is not set
591CONFIG_FB_DEFERRED_IO=y
592# CONFIG_FB_SVGALIB is not set
593# CONFIG_FB_MACMODES is not set
594# CONFIG_FB_BACKLIGHT is not set
595# CONFIG_FB_MODE_HELPERS is not set
596# CONFIG_FB_TILEBLITTING is not set
597
598#
599# Frame buffer hardware drivers
600#
601CONFIG_FB_S1D13XXX=y
602# CONFIG_FB_VIRTUAL is not set
603
604#
605# Console display driver support
606#
607# CONFIG_VGA_CONSOLE is not set
608CONFIG_DUMMY_CONSOLE=y
609CONFIG_FRAMEBUFFER_CONSOLE=y
610# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
611# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
612# CONFIG_FONTS is not set
613CONFIG_FONT_8x8=y
614CONFIG_FONT_8x16=y
615CONFIG_LOGO=y
616CONFIG_LOGO_LINUX_MONO=y
617CONFIG_LOGO_LINUX_VGA16=y
618CONFIG_LOGO_LINUX_CLUT224=y
619CONFIG_LOGO_M32R_CLUT224=y
620
621#
622# Sound
623#
624# CONFIG_SOUND is not set
625CONFIG_HID_SUPPORT=y
626CONFIG_HID=y
627# CONFIG_HID_DEBUG is not set
628CONFIG_USB_SUPPORT=y
629# CONFIG_USB_ARCH_HAS_HCD is not set
630# CONFIG_USB_ARCH_HAS_OHCI is not set
631# CONFIG_USB_ARCH_HAS_EHCI is not set
632
633#
634# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
635#
636
637#
638# USB Gadget Support
639#
640# CONFIG_USB_GADGET is not set
641CONFIG_MMC=y
642CONFIG_MMC_DEBUG=y
643# CONFIG_MMC_UNSAFE_RESUME is not set
644
645#
646# MMC/SD Card Drivers
647#
648CONFIG_MMC_BLOCK=y
649CONFIG_MMC_BLOCK_BOUNCE=y
650
651#
652# MMC/SD Host Controller Drivers
653#
654# CONFIG_NEW_LEDS is not set
655
656#
657# Real Time Clock
658#
659# CONFIG_RTC_CLASS is not set
660
661#
662# Userspace I/O
663#
664# CONFIG_UIO is not set
665
666#
667# File systems
668#
669CONFIG_EXT2_FS=y
670# CONFIG_EXT2_FS_XATTR is not set
671# CONFIG_EXT2_FS_XIP is not set
672CONFIG_EXT3_FS=y
673CONFIG_EXT3_FS_XATTR=y
674# CONFIG_EXT3_FS_POSIX_ACL is not set
675# CONFIG_EXT3_FS_SECURITY is not set
676# CONFIG_EXT4DEV_FS is not set
677CONFIG_JBD=y
678CONFIG_JBD_DEBUG=y
679CONFIG_FS_MBCACHE=y
680CONFIG_REISERFS_FS=m
681# CONFIG_REISERFS_CHECK is not set
682# CONFIG_REISERFS_PROC_INFO is not set
683# CONFIG_REISERFS_FS_XATTR is not set
684# CONFIG_JFS_FS is not set
685# CONFIG_FS_POSIX_ACL is not set
686# CONFIG_XFS_FS is not set
687# CONFIG_GFS2_FS is not set
688# CONFIG_OCFS2_FS is not set
689# CONFIG_MINIX_FS is not set
690# CONFIG_ROMFS_FS is not set
691CONFIG_INOTIFY=y
692CONFIG_INOTIFY_USER=y
693# CONFIG_QUOTA is not set
694CONFIG_DNOTIFY=y
695# CONFIG_AUTOFS_FS is not set
696# CONFIG_AUTOFS4_FS is not set
697# CONFIG_FUSE_FS is not set
698
699#
700# CD-ROM/DVD Filesystems
701#
702CONFIG_ISO9660_FS=m
703CONFIG_JOLIET=y
704# CONFIG_ZISOFS is not set
705CONFIG_UDF_FS=m
706CONFIG_UDF_NLS=y
707
708#
709# DOS/FAT/NT Filesystems
710#
711CONFIG_FAT_FS=m
712CONFIG_MSDOS_FS=m
713CONFIG_VFAT_FS=m
714CONFIG_FAT_DEFAULT_CODEPAGE=437
715CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
716# CONFIG_NTFS_FS is not set
717
718#
719# Pseudo filesystems
720#
721CONFIG_PROC_FS=y
722CONFIG_PROC_KCORE=y
723CONFIG_PROC_SYSCTL=y
724CONFIG_SYSFS=y
725CONFIG_TMPFS=y
726# CONFIG_TMPFS_POSIX_ACL is not set
727# CONFIG_HUGETLB_PAGE is not set
728CONFIG_RAMFS=y
729# CONFIG_CONFIGFS_FS is not set
730
731#
732# Miscellaneous filesystems
733#
734# CONFIG_ADFS_FS is not set
735# CONFIG_AFFS_FS is not set
736# CONFIG_HFS_FS is not set
737# CONFIG_HFSPLUS_FS is not set
738# CONFIG_BEFS_FS is not set
739# CONFIG_BFS_FS is not set
740# CONFIG_EFS_FS is not set
741# CONFIG_JFFS2_FS is not set
742# CONFIG_CRAMFS is not set
743# CONFIG_VXFS_FS is not set
744# CONFIG_HPFS_FS is not set
745# CONFIG_QNX4FS_FS is not set
746# CONFIG_SYSV_FS is not set
747# CONFIG_UFS_FS is not set
748
749#
750# Network File Systems
751#
752CONFIG_NFS_FS=y
753CONFIG_NFS_V3=y
754# CONFIG_NFS_V3_ACL is not set
755# CONFIG_NFS_V4 is not set
756# CONFIG_NFS_DIRECTIO is not set
757# CONFIG_NFSD is not set
758CONFIG_ROOT_NFS=y
759CONFIG_LOCKD=y
760CONFIG_LOCKD_V4=y
761CONFIG_NFS_COMMON=y
762CONFIG_SUNRPC=y
763# CONFIG_SUNRPC_BIND34 is not set
764# CONFIG_RPCSEC_GSS_KRB5 is not set
765# CONFIG_RPCSEC_GSS_SPKM3 is not set
766# CONFIG_SMB_FS is not set
767# CONFIG_CIFS is not set
768# CONFIG_NCP_FS is not set
769# CONFIG_CODA_FS is not set
770# CONFIG_AFS_FS is not set
771
772#
773# Partition Types
774#
775# CONFIG_PARTITION_ADVANCED is not set
776CONFIG_MSDOS_PARTITION=y
777
778#
779# Native Language Support
780#
781CONFIG_NLS=y
782CONFIG_NLS_DEFAULT="iso8859-1"
783# CONFIG_NLS_CODEPAGE_437 is not set
784# CONFIG_NLS_CODEPAGE_737 is not set
785# CONFIG_NLS_CODEPAGE_775 is not set
786# CONFIG_NLS_CODEPAGE_850 is not set
787# CONFIG_NLS_CODEPAGE_852 is not set
788# CONFIG_NLS_CODEPAGE_855 is not set
789# CONFIG_NLS_CODEPAGE_857 is not set
790# CONFIG_NLS_CODEPAGE_860 is not set
791# CONFIG_NLS_CODEPAGE_861 is not set
792# CONFIG_NLS_CODEPAGE_862 is not set
793# CONFIG_NLS_CODEPAGE_863 is not set
794# CONFIG_NLS_CODEPAGE_864 is not set
795# CONFIG_NLS_CODEPAGE_865 is not set
796# CONFIG_NLS_CODEPAGE_866 is not set
797# CONFIG_NLS_CODEPAGE_869 is not set
798# CONFIG_NLS_CODEPAGE_936 is not set
799# CONFIG_NLS_CODEPAGE_950 is not set
800# CONFIG_NLS_CODEPAGE_932 is not set
801# CONFIG_NLS_CODEPAGE_949 is not set
802# CONFIG_NLS_CODEPAGE_874 is not set
803# CONFIG_NLS_ISO8859_8 is not set
804# CONFIG_NLS_CODEPAGE_1250 is not set
805# CONFIG_NLS_CODEPAGE_1251 is not set
806# CONFIG_NLS_ASCII is not set
807# CONFIG_NLS_ISO8859_1 is not set
808# CONFIG_NLS_ISO8859_2 is not set
809# CONFIG_NLS_ISO8859_3 is not set
810# CONFIG_NLS_ISO8859_4 is not set
811# CONFIG_NLS_ISO8859_5 is not set
812# CONFIG_NLS_ISO8859_6 is not set
813# CONFIG_NLS_ISO8859_7 is not set
814# CONFIG_NLS_ISO8859_9 is not set
815# CONFIG_NLS_ISO8859_13 is not set
816# CONFIG_NLS_ISO8859_14 is not set
817# CONFIG_NLS_ISO8859_15 is not set
818# CONFIG_NLS_KOI8_R is not set
819# CONFIG_NLS_KOI8_U is not set
820# CONFIG_NLS_UTF8 is not set
821
822#
823# Distributed Lock Manager
824#
825# CONFIG_DLM is not set
826
827#
828# Profiling support
829#
830CONFIG_PROFILING=y
831CONFIG_OPROFILE=y
832
833#
834# Kernel hacking
835#
836# CONFIG_PRINTK_TIME is not set
837CONFIG_ENABLE_MUST_CHECK=y
838# CONFIG_MAGIC_SYSRQ is not set
839# CONFIG_UNUSED_SYMBOLS is not set
840# CONFIG_DEBUG_FS is not set
841# CONFIG_HEADERS_CHECK is not set
842# CONFIG_DEBUG_KERNEL is not set
843# CONFIG_DEBUG_BUGVERBOSE is not set
844# CONFIG_FRAME_POINTER is not set
845
846#
847# Security options
848#
849# CONFIG_KEYS is not set
850# CONFIG_SECURITY is not set
851# CONFIG_CRYPTO is not set
852
853#
854# Library routines
855#
856CONFIG_BITREVERSE=y
857# CONFIG_CRC_CCITT is not set
858# CONFIG_CRC16 is not set
859# CONFIG_CRC_ITU_T is not set
860CONFIG_CRC32=y
861# CONFIG_CRC7 is not set
862# CONFIG_LIBCRC32C is not set
863CONFIG_HAS_IOMEM=y
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S
index 41b07854fcc6..15a6f36c06db 100644
--- a/arch/m32r/kernel/vmlinux.lds.S
+++ b/arch/m32r/kernel/vmlinux.lds.S
@@ -60,9 +60,6 @@ SECTIONS
60 . = ALIGN(4096); 60 . = ALIGN(4096);
61 __nosave_end = .; 61 __nosave_end = .;
62 62
63 . = ALIGN(4096);
64 .data.page_aligned : { *(.data.idt) }
65
66 . = ALIGN(32); 63 . = ALIGN(32);
67 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 64 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
68 65
diff --git a/arch/m68knommu/kernel/asm-offsets.c b/arch/m68knommu/kernel/asm-offsets.c
index fd0c685a7f11..c785d07c02cc 100644
--- a/arch/m68knommu/kernel/asm-offsets.c
+++ b/arch/m68knommu/kernel/asm-offsets.c
@@ -87,6 +87,7 @@ int main(void)
87 DEFINE(TI_TASK, offsetof(struct thread_info, task)); 87 DEFINE(TI_TASK, offsetof(struct thread_info, task));
88 DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain)); 88 DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain));
89 DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); 89 DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
90 DEFINE(TI_PREEMPTCOUNT, offsetof(struct thread_info, preempt_count));
90 DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); 91 DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
91 92
92 return 0; 93 return 0;
diff --git a/arch/m68knommu/kernel/entry.S b/arch/m68knommu/kernel/entry.S
index 1e7ea6a3e1a1..f4782d2dce8f 100644
--- a/arch/m68knommu/kernel/entry.S
+++ b/arch/m68knommu/kernel/entry.S
@@ -32,6 +32,7 @@
32#include <asm/segment.h> 32#include <asm/segment.h>
33#include <asm/asm-offsets.h> 33#include <asm/asm-offsets.h>
34#include <asm/entry.h> 34#include <asm/entry.h>
35#include <asm/unistd.h>
35 36
36.text 37.text
37 38
@@ -140,3 +141,11 @@ ENTRY(sys_rt_sigreturn)
140 RESTORE_SWITCH_STACK 141 RESTORE_SWITCH_STACK
141 rts 142 rts
142 143
144ENTRY(ret_from_user_signal)
145 moveq #__NR_sigreturn,%d0
146 trap #0
147
148ENTRY(ret_from_user_rt_signal)
149 move #__NR_rt_sigreturn,%d0
150 trap #0
151
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index d6f0200316fe..03f4fe6a2fc0 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -162,7 +162,7 @@ void __init setup_arch(char **cmdline_p)
162 printk(KERN_INFO "DragonEngine II board support by Georges Menie\n"); 162 printk(KERN_INFO "DragonEngine II board support by Georges Menie\n");
163#endif 163#endif
164#ifdef CONFIG_M5235EVB 164#ifdef CONFIG_M5235EVB
165 printk(KERN_INFO "Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)"); 165 printk(KERN_INFO "Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)\n");
166#endif 166#endif
167 167
168#ifdef DEBUG 168#ifdef DEBUG
diff --git a/arch/m68knommu/kernel/signal.c b/arch/m68knommu/kernel/signal.c
index 70371378db86..bbfcae9e52b4 100644
--- a/arch/m68knommu/kernel/signal.c
+++ b/arch/m68knommu/kernel/signal.c
@@ -51,6 +51,8 @@
51 51
52#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 52#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
53 53
54void ret_from_user_signal(void);
55void ret_from_user_rt_signal(void);
54asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs); 56asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs);
55 57
56/* 58/*
@@ -539,10 +541,6 @@ static inline int rt_setup_ucontext(struct ucontext *uc, struct pt_regs *regs)
539 return err; 541 return err;
540} 542}
541 543
542static inline void push_cache (unsigned long vaddr)
543{
544}
545
546static inline void * 544static inline void *
547get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) 545get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size)
548{ 546{
@@ -586,16 +584,11 @@ static void setup_frame (int sig, struct k_sigaction *ka,
586 err |= copy_to_user (&frame->sc, &context, sizeof(context)); 584 err |= copy_to_user (&frame->sc, &context, sizeof(context));
587 585
588 /* Set up to return from userspace. */ 586 /* Set up to return from userspace. */
589 err |= __put_user(frame->retcode, &frame->pretcode); 587 err |= __put_user((void *) ret_from_user_signal, &frame->pretcode);
590 /* moveq #,d0; trap #0 */
591 err |= __put_user(0x70004e40 + (__NR_sigreturn << 16),
592 (long *)(frame->retcode));
593 588
594 if (err) 589 if (err)
595 goto give_sigsegv; 590 goto give_sigsegv;
596 591
597 push_cache ((unsigned long) &frame->retcode);
598
599 /* Set up registers for signal handler */ 592 /* Set up registers for signal handler */
600 wrusp ((unsigned long) frame); 593 wrusp ((unsigned long) frame);
601 regs->pc = (unsigned long) ka->sa.sa_handler; 594 regs->pc = (unsigned long) ka->sa.sa_handler;
@@ -655,17 +648,11 @@ static void setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,
655 err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set)); 648 err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set));
656 649
657 /* Set up to return from userspace. */ 650 /* Set up to return from userspace. */
658 err |= __put_user(frame->retcode, &frame->pretcode); 651 err |= __put_user((void *) ret_from_user_rt_signal, &frame->pretcode);
659 /* moveq #,d0; notb d0; trap #0 */
660 err |= __put_user(0x70004600 + ((__NR_rt_sigreturn ^ 0xff) << 16),
661 (long *)(frame->retcode + 0));
662 err |= __put_user(0x4e40, (short *)(frame->retcode + 4));
663 652
664 if (err) 653 if (err)
665 goto give_sigsegv; 654 goto give_sigsegv;
666 655
667 push_cache ((unsigned long) &frame->retcode);
668
669 /* Set up registers for signal handler */ 656 /* Set up registers for signal handler */
670 wrusp ((unsigned long) frame); 657 wrusp ((unsigned long) frame);
671 regs->pc = (unsigned long) ka->sa.sa_handler; 658 regs->pc = (unsigned long) ka->sa.sa_handler;
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
index 437a061d8b94..ec9aea652e79 100644
--- a/arch/m68knommu/kernel/traps.c
+++ b/arch/m68knommu/kernel/traps.c
@@ -28,6 +28,7 @@
28#include <linux/linkage.h> 28#include <linux/linkage.h>
29#include <linux/init.h> 29#include <linux/init.h>
30#include <linux/ptrace.h> 30#include <linux/ptrace.h>
31#include <linux/kallsyms.h>
31 32
32#include <asm/setup.h> 33#include <asm/setup.h>
33#include <asm/fpu.h> 34#include <asm/fpu.h>
@@ -102,56 +103,47 @@ asmlinkage void buserr_c(struct frame *fp)
102 force_sig(SIGSEGV, current); 103 force_sig(SIGSEGV, current);
103} 104}
104 105
105
106int kstack_depth_to_print = 48; 106int kstack_depth_to_print = 48;
107 107
108void show_stack(struct task_struct *task, unsigned long *stack) 108static void __show_stack(struct task_struct *task, unsigned long *stack)
109{ 109{
110 unsigned long *endstack, addr; 110 unsigned long *endstack, addr;
111 extern char _start, _etext; 111 unsigned long *last_stack;
112 int i; 112 int i;
113 113
114 if (!stack) { 114 if (!stack)
115 if (task) 115 stack = (unsigned long *)task->thread.ksp;
116 stack = (unsigned long *)task->thread.ksp;
117 else
118 stack = (unsigned long *)&stack;
119 }
120 116
121 addr = (unsigned long) stack; 117 addr = (unsigned long) stack;
122 endstack = (unsigned long *) PAGE_ALIGN(addr); 118 endstack = (unsigned long *) PAGE_ALIGN(addr);
123 119
124 printk(KERN_EMERG "Stack from %08lx:", (unsigned long)stack); 120 printk(KERN_EMERG "Stack from %08lx:", (unsigned long)stack);
125 for (i = 0; i < kstack_depth_to_print; i++) { 121 for (i = 0; i < kstack_depth_to_print; i++) {
126 if (stack + 1 > endstack) 122 if (stack + 1 + i > endstack)
127 break; 123 break;
128 if (i % 8 == 0) 124 if (i % 8 == 0)
129 printk("\n" KERN_EMERG " "); 125 printk("\n" KERN_EMERG " ");
130 printk(" %08lx", *stack++); 126 printk(" %08lx", *(stack + i));
131 } 127 }
132 printk("\n"); 128 printk("\n");
133 129
134 printk(KERN_EMERG "Call Trace:"); 130#ifdef CONFIG_FRAME_POINTER
135 i = 0; 131 printk(KERN_EMERG "Call Trace:\n");
136 while (stack + 1 <= endstack) { 132
137 addr = *stack++; 133 last_stack = stack - 1;
138 /* 134 while (stack <= endstack && stack > last_stack) {
139 * If the address is either in the text segment of the 135
140 * kernel, or in the region which contains vmalloc'ed 136 addr = *(stack + 1);
141 * memory, it *may* be the address of a calling 137 printk(KERN_EMERG " [%08lx] ", addr);
142 * routine; if so, print it so that someone tracing 138 print_symbol(KERN_CONT "%s\n", addr);
143 * down the cause of the crash will be able to figure 139
144 * out the call path that was taken. 140 last_stack = stack;
145 */ 141 stack = (unsigned long *)*stack;
146 if (((addr >= (unsigned long) &_start) &&
147 (addr <= (unsigned long) &_etext))) {
148 if (i % 4 == 0)
149 printk("\n" KERN_EMERG " ");
150 printk(" [<%08lx>]", addr);
151 i++;
152 }
153 } 142 }
154 printk("\n"); 143 printk("\n");
144#else
145 printk(KERN_EMERG "CONFIG_FRAME_POINTER disabled, no symbolic call trace\n");
146#endif
155} 147}
156 148
157void bad_super_trap(struct frame *fp) 149void bad_super_trap(struct frame *fp)
@@ -298,19 +290,47 @@ asmlinkage void set_esp0(unsigned long ssp)
298 current->thread.esp0 = ssp; 290 current->thread.esp0 = ssp;
299} 291}
300 292
301
302/* 293/*
303 * The architecture-independent backtrace generator 294 * The architecture-independent backtrace generator
304 */ 295 */
305void dump_stack(void) 296void dump_stack(void)
306{ 297{
307 unsigned long stack; 298 /*
299 * We need frame pointers for this little trick, which works as follows:
300 *
301 * +------------+ 0x00
302 * | Next SP | -> 0x0c
303 * +------------+ 0x04
304 * | Caller |
305 * +------------+ 0x08
306 * | Local vars | -> our stack var
307 * +------------+ 0x0c
308 * | Next SP | -> 0x18, that is what we pass to show_stack()
309 * +------------+ 0x10
310 * | Caller |
311 * +------------+ 0x14
312 * | Local vars |
313 * +------------+ 0x18
314 * | ... |
315 * +------------+
316 */
308 317
309 show_stack(current, &stack); 318 unsigned long *stack;
310}
311 319
320 stack = (unsigned long *)&stack;
321 stack++;
322 __show_stack(current, stack);
323}
312EXPORT_SYMBOL(dump_stack); 324EXPORT_SYMBOL(dump_stack);
313 325
326void show_stack(struct task_struct *task, unsigned long *stack)
327{
328 if (!stack && !task)
329 dump_stack();
330 else
331 __show_stack(task, stack);
332}
333
314#ifdef CONFIG_M68KFPU_EMU 334#ifdef CONFIG_M68KFPU_EMU
315asmlinkage void fpemu_signal(int signal, int code, void *addr) 335asmlinkage void fpemu_signal(int signal, int code, void *addr)
316{ 336{
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
index b44edb08e212..5592e0bf951f 100644
--- a/arch/m68knommu/kernel/vmlinux.lds.S
+++ b/arch/m68knommu/kernel/vmlinux.lds.S
@@ -64,6 +64,7 @@ SECTIONS {
64 _stext = . ; 64 _stext = . ;
65 TEXT_TEXT 65 TEXT_TEXT
66 SCHED_TEXT 66 SCHED_TEXT
67 LOCK_TEXT
67 *(.text.lock) 68 *(.text.lock)
68 69
69 . = ALIGN(16); /* Exception table */ 70 . = ALIGN(16); /* Exception table */
@@ -73,6 +74,7 @@ SECTIONS {
73 74
74 *(.rodata) *(.rodata.*) 75 *(.rodata) *(.rodata.*)
75 *(__vermagic) /* Kernel version magic */ 76 *(__vermagic) /* Kernel version magic */
77 *(__markers_strings)
76 *(.rodata1) 78 *(.rodata1)
77 *(.rodata.str1.1) 79 *(.rodata.str1.1)
78 80
@@ -182,6 +184,7 @@ SECTIONS {
182 *(COMMON) 184 *(COMMON)
183 . = ALIGN(4) ; 185 . = ALIGN(4) ;
184 _ebss = . ; 186 _ebss = . ;
187 _end = . ;
185 } > BSS 188 } > BSS
186 189
187} 190}
diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c
index a6692e958f6b..d01a5d2b7557 100644
--- a/arch/m68knommu/platform/5206e/config.c
+++ b/arch/m68knommu/platform/5206e/config.c
@@ -48,7 +48,7 @@ static struct platform_device *m5206e_devices[] __initdata = {
48 48
49/***************************************************************************/ 49/***************************************************************************/
50 50
51static void __init m5206_uart_init_line(int line, int irq) 51static void __init m5206e_uart_init_line(int line, int irq)
52{ 52{
53 if (line == 0) { 53 if (line == 0) {
54 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); 54 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR);
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c
index 2aca599a1ca7..230bae691a7f 100644
--- a/arch/m68knommu/platform/5272/config.c
+++ b/arch/m68knommu/platform/5272/config.c
@@ -139,10 +139,6 @@ void __init config_BSP(char *commandp, int size)
139 /* Copy command line from FLASH to local buffer... */ 139 /* Copy command line from FLASH to local buffer... */
140 memcpy(commandp, (char *) 0xf0004000, size); 140 memcpy(commandp, (char *) 0xf0004000, size);
141 commandp[size-1] = 0; 141 commandp[size-1] = 0;
142#elif defined(CONFIG_MTD_KeyTechnology)
143 /* Copy command line from FLASH to local buffer... */
144 memcpy(commandp, (char *) 0xffe06000, size);
145 commandp[size-1] = 0;
146#elif defined(CONFIG_CANCam) 142#elif defined(CONFIG_CANCam)
147 /* Copy command line from FLASH to local buffer... */ 143 /* Copy command line from FLASH to local buffer... */
148 memcpy(commandp, (char *) 0xf0010000, size); 144 memcpy(commandp, (char *) 0xf0010000, size);
diff --git a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c
index 036e1b73d944..dfdb5c2ed8e6 100644
--- a/arch/m68knommu/platform/528x/config.c
+++ b/arch/m68knommu/platform/528x/config.c
@@ -26,9 +26,240 @@
26#include <asm/mcfuart.h> 26#include <asm/mcfuart.h>
27#include <asm/mcfqspi.h> 27#include <asm/mcfqspi.h>
28 28
29#ifdef CONFIG_MTD_PARTITIONS
30#include <linux/mtd/partitions.h>
31#endif
32
29/***************************************************************************/ 33/***************************************************************************/
30 34
31void coldfire_reset(void); 35void coldfire_reset(void);
36static void coldfire_qspi_cs_control(u8 cs, u8 command);
37
38/***************************************************************************/
39
40#if defined(CONFIG_SPI)
41
42#if defined(CONFIG_WILDFIRE)
43#define SPI_NUM_CHIPSELECTS 0x02
44#define SPI_PAR_VAL 0x07 /* Enable DIN, DOUT, CLK */
45#define SPI_CS_MASK 0x18
46
47#define FLASH_BLOCKSIZE (1024*64)
48#define FLASH_NUMBLOCKS 16
49#define FLASH_TYPE "m25p80"
50
51#define M25P80_CS 0
52#define MMC_CS 1
53
54#ifdef CONFIG_MTD_PARTITIONS
55static struct mtd_partition stm25p_partitions[] = {
56 /* sflash */
57 [0] = {
58 .name = "stm25p80",
59 .offset = 0x00000000,
60 .size = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS,
61 .mask_flags = 0
62 }
63};
64
65#endif
66
67#elif defined(CONFIG_WILDFIREMOD)
68
69#define SPI_NUM_CHIPSELECTS 0x08
70#define SPI_PAR_VAL 0x07 /* Enable DIN, DOUT, CLK */
71#define SPI_CS_MASK 0x78
72
73#define FLASH_BLOCKSIZE (1024*64)
74#define FLASH_NUMBLOCKS 64
75#define FLASH_TYPE "m25p32"
76/* Reserve 1M for the kernel parition */
77#define FLASH_KERNEL_SIZE (1024 * 1024)
78
79#define M25P80_CS 5
80#define MMC_CS 6
81
82#ifdef CONFIG_MTD_PARTITIONS
83static struct mtd_partition stm25p_partitions[] = {
84 /* sflash */
85 [0] = {
86 .name = "kernel",
87 .offset = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS - FLASH_KERNEL_SIZE,
88 .size = FLASH_KERNEL_SIZE,
89 .mask_flags = 0
90 },
91 [1] = {
92 .name = "image",
93 .offset = 0x00000000,
94 .size = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS - FLASH_KERNEL_SIZE,
95 .mask_flags = 0
96 },
97 [2] = {
98 .name = "all",
99 .offset = 0x00000000,
100 .size = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS,
101 .mask_flags = 0
102 }
103};
104#endif
105
106#else
107#define SPI_NUM_CHIPSELECTS 0x04
108#define SPI_PAR_VAL 0x7F /* Enable DIN, DOUT, CLK, CS0 - CS4 */
109#endif
110
111#ifdef MMC_CS
112static struct coldfire_spi_chip flash_chip_info = {
113 .mode = SPI_MODE_0,
114 .bits_per_word = 16,
115 .del_cs_to_clk = 17,
116 .del_after_trans = 1,
117 .void_write_data = 0
118};
119
120static struct coldfire_spi_chip mmc_chip_info = {
121 .mode = SPI_MODE_0,
122 .bits_per_word = 16,
123 .del_cs_to_clk = 17,
124 .del_after_trans = 1,
125 .void_write_data = 0xFFFF
126};
127#endif
128
129#ifdef M25P80_CS
130static struct flash_platform_data stm25p80_platform_data = {
131 .name = "ST M25P80 SPI Flash chip",
132#ifdef CONFIG_MTD_PARTITIONS
133 .parts = stm25p_partitions,
134 .nr_parts = sizeof(stm25p_partitions) / sizeof(*stm25p_partitions),
135#endif
136 .type = FLASH_TYPE
137};
138#endif
139
140static struct spi_board_info spi_board_info[] __initdata = {
141#ifdef M25P80_CS
142 {
143 .modalias = "m25p80",
144 .max_speed_hz = 16000000,
145 .bus_num = 1,
146 .chip_select = M25P80_CS,
147 .platform_data = &stm25p80_platform_data,
148 .controller_data = &flash_chip_info
149 },
150#endif
151#ifdef MMC_CS
152 {
153 .modalias = "mmc_spi",
154 .max_speed_hz = 16000000,
155 .bus_num = 1,
156 .chip_select = MMC_CS,
157 .controller_data = &mmc_chip_info
158 }
159#endif
160};
161
162static struct coldfire_spi_master coldfire_master_info = {
163 .bus_num = 1,
164 .num_chipselect = SPI_NUM_CHIPSELECTS,
165 .irq_source = MCF5282_QSPI_IRQ_SOURCE,
166 .irq_vector = MCF5282_QSPI_IRQ_VECTOR,
167 .irq_mask = ((0x01 << MCF5282_QSPI_IRQ_SOURCE) | 0x01),
168 .irq_lp = 0x2B, /* Level 5 and Priority 3 */
169 .par_val = SPI_PAR_VAL,
170 .cs_control = coldfire_qspi_cs_control,
171};
172
173static struct resource coldfire_spi_resources[] = {
174 [0] = {
175 .name = "qspi-par",
176 .start = MCF5282_QSPI_PAR,
177 .end = MCF5282_QSPI_PAR,
178 .flags = IORESOURCE_MEM
179 },
180
181 [1] = {
182 .name = "qspi-module",
183 .start = MCF5282_QSPI_QMR,
184 .end = MCF5282_QSPI_QMR + 0x18,
185 .flags = IORESOURCE_MEM
186 },
187
188 [2] = {
189 .name = "qspi-int-level",
190 .start = MCF5282_INTC0 + MCFINTC_ICR0 + MCF5282_QSPI_IRQ_SOURCE,
191 .end = MCF5282_INTC0 + MCFINTC_ICR0 + MCF5282_QSPI_IRQ_SOURCE,
192 .flags = IORESOURCE_MEM
193 },
194
195 [3] = {
196 .name = "qspi-int-mask",
197 .start = MCF5282_INTC0 + MCFINTC_IMRL,
198 .end = MCF5282_INTC0 + MCFINTC_IMRL,
199 .flags = IORESOURCE_MEM
200 }
201};
202
203static struct platform_device coldfire_spi = {
204 .name = "spi_coldfire",
205 .id = -1,
206 .resource = coldfire_spi_resources,
207 .num_resources = ARRAY_SIZE(coldfire_spi_resources),
208 .dev = {
209 .platform_data = &coldfire_master_info,
210 }
211};
212
213static void coldfire_qspi_cs_control(u8 cs, u8 command)
214{
215 u8 cs_bit = ((0x01 << cs) << 3) & SPI_CS_MASK;
216
217#if defined(CONFIG_WILDFIRE)
218 u8 cs_mask = ~(((0x01 << cs) << 3) & SPI_CS_MASK);
219#endif
220#if defined(CONFIG_WILDFIREMOD)
221 u8 cs_mask = (cs << 3) & SPI_CS_MASK;
222#endif
223
224 /*
225 * Don't do anything if the chip select is not
226 * one of the port qs pins.
227 */
228 if (command & QSPI_CS_INIT) {
229#if defined(CONFIG_WILDFIRE)
230 MCF5282_GPIO_DDRQS |= cs_bit;
231 MCF5282_GPIO_PQSPAR &= ~cs_bit;
232#endif
233
234#if defined(CONFIG_WILDFIREMOD)
235 MCF5282_GPIO_DDRQS |= SPI_CS_MASK;
236 MCF5282_GPIO_PQSPAR &= ~SPI_CS_MASK;
237#endif
238 }
239
240 if (command & QSPI_CS_ASSERT) {
241 MCF5282_GPIO_PORTQS &= ~SPI_CS_MASK;
242 MCF5282_GPIO_PORTQS |= cs_mask;
243 } else if (command & QSPI_CS_DROP) {
244 MCF5282_GPIO_PORTQS |= SPI_CS_MASK;
245 }
246}
247
248static int __init spi_dev_init(void)
249{
250 int retval;
251
252 retval = platform_device_register(&coldfire_spi);
253 if (retval < 0)
254 return retval;
255
256 if (ARRAY_SIZE(spi_board_info))
257 retval = spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
258
259 return retval;
260}
261
262#endif /* CONFIG_SPI */
32 263
33/***************************************************************************/ 264/***************************************************************************/
34 265
@@ -111,10 +342,43 @@ void mcf_autovector(unsigned int vec)
111 342
112/***************************************************************************/ 343/***************************************************************************/
113 344
345#ifdef CONFIG_WILDFIRE
346void wildfire_halt(void)
347{
348 writeb(0, 0x30000007);
349 writeb(0x2, 0x30000007);
350}
351#endif
352
353#ifdef CONFIG_WILDFIREMOD
354void wildfiremod_halt(void)
355{
356 printk(KERN_INFO "WildFireMod hibernating...\n");
357
358 /* Set portE.5 to Digital IO */
359 MCF5282_GPIO_PEPAR &= ~(1 << (5 * 2));
360
361 /* Make portE.5 an output */
362 MCF5282_GPIO_DDRE |= (1 << 5);
363
364 /* Now toggle portE.5 from low to high */
365 MCF5282_GPIO_PORTE &= ~(1 << 5);
366 MCF5282_GPIO_PORTE |= (1 << 5);
367
368 printk(KERN_EMERG "Failed to hibernate. Halting!\n");
369}
370#endif
371
114void __init config_BSP(char *commandp, int size) 372void __init config_BSP(char *commandp, int size)
115{ 373{
116 mcf_disableall(); 374 mcf_disableall();
117 mach_reset = coldfire_reset; 375
376#ifdef CONFIG_WILDFIRE
377 mach_halt = wildfire_halt;
378#endif
379#ifdef CONFIG_WILDFIREMOD
380 mach_halt = wildfiremod_halt;
381#endif
118} 382}
119 383
120/***************************************************************************/ 384/***************************************************************************/
diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c
index 92dc862fa826..11cff6625dcc 100644
--- a/arch/m68knommu/platform/5307/config.c
+++ b/arch/m68knommu/platform/5307/config.c
@@ -124,8 +124,7 @@ void __init config_BSP(char *commandp, int size)
124 mcf_setimr(MCFSIM_IMR_MASKALL); 124 mcf_setimr(MCFSIM_IMR_MASKALL);
125 125
126#if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \ 126#if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
127 defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \ 127 defined(CONFIG_SECUREEDGEMP3) || defined(CONFIG_CLEOPATRA)
128 defined(CONFIG_CLEOPATRA)
129 /* Copy command line from FLASH to local buffer... */ 128 /* Copy command line from FLASH to local buffer... */
130 memcpy(commandp, (char *) 0xf0004000, size); 129 memcpy(commandp, (char *) 0xf0004000, size);
131 commandp[size-1] = 0; 130 commandp[size-1] = 0;
diff --git a/arch/m68knommu/platform/coldfire/entry.S b/arch/m68knommu/platform/coldfire/entry.S
index 111b66dc737b..1e3c0dcbd7ac 100644
--- a/arch/m68knommu/platform/coldfire/entry.S
+++ b/arch/m68knommu/platform/coldfire/entry.S
@@ -103,9 +103,26 @@ ret_from_signal:
103 addql #4,%sp 103 addql #4,%sp
104 104
105ret_from_exception: 105ret_from_exception:
106 move #0x2700,%sr /* disable intrs */
106 btst #5,%sp@(PT_SR) /* check if returning to kernel */ 107 btst #5,%sp@(PT_SR) /* check if returning to kernel */
107 jeq Luser_return /* if so, skip resched, signals */ 108 jeq Luser_return /* if so, skip resched, signals */
108 109
110#ifdef CONFIG_PREEMPT
111 movel %sp,%d1 /* get thread_info pointer */
112 andl #-THREAD_SIZE,%d1 /* at base of kernel stack */
113 movel %d1,%a0
114 movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */
115 andl #_TIF_NEED_RESCHED,%d1
116 jeq Lkernel_return
117
118 movel %a0@(TI_PREEMPTCOUNT),%d1
119 cmpl #0,%d1
120 jne Lkernel_return
121
122 pea Lkernel_return
123 jmp preempt_schedule_irq /* preempt the kernel */
124#endif
125
109Lkernel_return: 126Lkernel_return:
110 moveml %sp@,%d1-%d5/%a0-%a2 127 moveml %sp@,%d1-%d5/%a0-%a2
111 lea %sp@(32),%sp /* space for 8 regs */ 128 lea %sp@(32),%sp /* space for 8 regs */
@@ -140,6 +157,7 @@ Lreturn:
140 157
141Lwork_to_do: 158Lwork_to_do:
142 movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ 159 movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */
160 move #0x2000,%sr /* enable intrs again */
143 btst #TIF_NEED_RESCHED,%d1 161 btst #TIF_NEED_RESCHED,%d1
144 jne reschedule 162 jne reschedule
145 163
diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c
index 77db3473deab..9fdd8bcdd21e 100644
--- a/arch/mips/kernel/binfmt_elfn32.c
+++ b/arch/mips/kernel/binfmt_elfn32.c
@@ -54,6 +54,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
54#include <linux/module.h> 54#include <linux/module.h>
55#include <linux/elfcore.h> 55#include <linux/elfcore.h>
56#include <linux/compat.h> 56#include <linux/compat.h>
57#include <linux/math64.h>
57 58
58#define elf_prstatus elf_prstatus32 59#define elf_prstatus elf_prstatus32
59struct elf_prstatus32 60struct elf_prstatus32
@@ -102,8 +103,8 @@ jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value)
102 * one divide. 103 * one divide.
103 */ 104 */
104 u64 nsec = (u64)jiffies * TICK_NSEC; 105 u64 nsec = (u64)jiffies * TICK_NSEC;
105 long rem; 106 u32 rem;
106 value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &rem); 107 value->tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem);
107 value->tv_usec = rem / NSEC_PER_USEC; 108 value->tv_usec = rem / NSEC_PER_USEC;
108} 109}
109 110
diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c
index 08f4cd781ee3..e1333d7319e2 100644
--- a/arch/mips/kernel/binfmt_elfo32.c
+++ b/arch/mips/kernel/binfmt_elfo32.c
@@ -56,6 +56,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
56#include <linux/module.h> 56#include <linux/module.h>
57#include <linux/elfcore.h> 57#include <linux/elfcore.h>
58#include <linux/compat.h> 58#include <linux/compat.h>
59#include <linux/math64.h>
59 60
60#define elf_prstatus elf_prstatus32 61#define elf_prstatus elf_prstatus32
61struct elf_prstatus32 62struct elf_prstatus32
@@ -104,8 +105,8 @@ jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value)
104 * one divide. 105 * one divide.
105 */ 106 */
106 u64 nsec = (u64)jiffies * TICK_NSEC; 107 u64 nsec = (u64)jiffies * TICK_NSEC;
107 long rem; 108 u32 rem;
108 value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &rem); 109 value->tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem);
109 value->tv_usec = rem / NSEC_PER_USEC; 110 value->tv_usec = rem / NSEC_PER_USEC;
110} 111}
111 112
diff --git a/arch/mips/kernel/irixioctl.c b/arch/mips/kernel/irixioctl.c
index 2bde200d5ad0..b39bdba82e02 100644
--- a/arch/mips/kernel/irixioctl.c
+++ b/arch/mips/kernel/irixioctl.c
@@ -27,33 +27,6 @@ struct irix_termios {
27 cc_t c_cc[NCCS]; 27 cc_t c_cc[NCCS];
28}; 28};
29 29
30extern void start_tty(struct tty_struct *tty);
31static struct tty_struct *get_tty(int fd)
32{
33 struct file *filp;
34 struct tty_struct *ttyp = NULL;
35
36 rcu_read_lock();
37 filp = fcheck(fd);
38 if(filp && filp->private_data) {
39 ttyp = (struct tty_struct *) filp->private_data;
40
41 if(ttyp->magic != TTY_MAGIC)
42 ttyp =NULL;
43 }
44 rcu_read_unlock();
45 return ttyp;
46}
47
48static struct tty_struct *get_real_tty(struct tty_struct *tp)
49{
50 if (tp->driver->type == TTY_DRIVER_TYPE_PTY &&
51 tp->driver->subtype == PTY_TYPE_MASTER)
52 return tp->link;
53 else
54 return tp;
55}
56
57asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg) 30asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg)
58{ 31{
59 struct tty_struct *tp, *rtp; 32 struct tty_struct *tp, *rtp;
@@ -146,34 +119,24 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg)
146 error = sys_ioctl(fd, TIOCNOTTY, arg); 119 error = sys_ioctl(fd, TIOCNOTTY, arg);
147 break; 120 break;
148 121
149 case 0x00007416: 122 case 0x00007416: {
123 pid_t pid;
150#ifdef DEBUG_IOCTLS 124#ifdef DEBUG_IOCTLS
151 printk("TIOCGSID, %08lx) ", arg); 125 printk("TIOCGSID, %08lx) ", arg);
152#endif 126#endif
153 tp = get_tty(fd); 127 old_fs = get_fs(); set_fs(get_ds());
154 if(!tp) { 128 error = sys_ioctl(fd, TIOCGSID, (unsigned long)&pid);
155 error = -EINVAL; 129 set_fs(old_fs);
156 break; 130 if (!error)
157 } 131 error = put_user(pid, (unsigned long __user *) arg);
158 rtp = get_real_tty(tp);
159#ifdef DEBUG_IOCTLS
160 printk("rtp->session=%d ", rtp->session);
161#endif
162 error = put_user(rtp->session, (unsigned long __user *) arg);
163 break; 132 break;
164 133 }
165 case 0x746e: 134 case 0x746e:
166 /* TIOCSTART, same effect as hitting ^Q */ 135 /* TIOCSTART, same effect as hitting ^Q */
167#ifdef DEBUG_IOCTLS 136#ifdef DEBUG_IOCTLS
168 printk("TIOCSTART, %08lx) ", arg); 137 printk("TIOCSTART, %08lx) ", arg);
169#endif 138#endif
170 tp = get_tty(fd); 139 error = sys_ioctl(fd, TCXONC, TCOON);
171 if(!tp) {
172 error = -EINVAL;
173 break;
174 }
175 rtp = get_real_tty(tp);
176 start_tty(rtp);
177 break; 140 break;
178 141
179 case 0x20006968: 142 case 0x20006968:
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c
index 998c4efcce88..ceb62dce1c9c 100644
--- a/arch/mips/kernel/kspd.c
+++ b/arch/mips/kernel/kspd.c
@@ -20,6 +20,7 @@
20#include <linux/sched.h> 20#include <linux/sched.h>
21#include <linux/unistd.h> 21#include <linux/unistd.h>
22#include <linux/file.h> 22#include <linux/file.h>
23#include <linux/fdtable.h>
23#include <linux/fs.h> 24#include <linux/fs.h>
24#include <linux/syscalls.h> 25#include <linux/syscalls.h>
25#include <linux/workqueue.h> 26#include <linux/workqueue.h>
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 3b26fbd6bec9..73401e83739a 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -149,7 +149,7 @@ EXPORT_SYMBOL(tb_ticks_per_sec); /* for cputime_t conversions */
149u64 tb_to_xs; 149u64 tb_to_xs;
150unsigned tb_to_us; 150unsigned tb_to_us;
151 151
152#define TICKLEN_SCALE TICK_LENGTH_SHIFT 152#define TICKLEN_SCALE NTP_SCALE_SHIFT
153u64 last_tick_len; /* units are ns / 2^TICKLEN_SCALE */ 153u64 last_tick_len; /* units are ns / 2^TICKLEN_SCALE */
154u64 ticklen_to_xs; /* 0.64 fraction */ 154u64 ticklen_to_xs; /* 0.64 fraction */
155 155
@@ -1007,8 +1007,6 @@ void __init time_init(void)
1007 vdso_data->stamp_xsec = (u64) xtime.tv_sec * XSEC_PER_SEC; 1007 vdso_data->stamp_xsec = (u64) xtime.tv_sec * XSEC_PER_SEC;
1008 vdso_data->tb_to_xs = tb_to_xs; 1008 vdso_data->tb_to_xs = tb_to_xs;
1009 1009
1010 time_freq = 0;
1011
1012 write_sequnlock_irqrestore(&xtime_lock, flags); 1010 write_sequnlock_irqrestore(&xtime_lock, flags);
1013 1011
1014 /* Register the clocksource, if we're not running on iSeries */ 1012 /* Register the clocksource, if we're not running on iSeries */
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c
index b962c3ab470c..af116aadba10 100644
--- a/arch/powerpc/platforms/cell/spufs/coredump.c
+++ b/arch/powerpc/platforms/cell/spufs/coredump.c
@@ -22,6 +22,7 @@
22 22
23#include <linux/elf.h> 23#include <linux/elf.h>
24#include <linux/file.h> 24#include <linux/file.h>
25#include <linux/fdtable.h>
25#include <linux/fs.h> 26#include <linux/fs.h>
26#include <linux/list.h> 27#include <linux/list.h>
27#include <linux/module.h> 28#include <linux/module.h>
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f70e3e3a9fa7..c3f880902d66 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -25,6 +25,18 @@ config X86
25 select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) 25 select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)
26 select HAVE_ARCH_KGDB if !X86_VOYAGER 26 select HAVE_ARCH_KGDB if !X86_VOYAGER
27 27
28config DEFCONFIG_LIST
29 string
30 depends on X86_32
31 option defconfig_list
32 default "arch/x86/configs/i386_defconfig"
33
34config DEFCONFIG_LIST
35 string
36 depends on X86_64
37 option defconfig_list
38 default "arch/x86/configs/x86_64_defconfig"
39
28 40
29config GENERIC_LOCKBREAK 41config GENERIC_LOCKBREAK
30 def_bool n 42 def_bool n
@@ -180,7 +192,7 @@ config X86_HT
180 192
181config X86_BIOS_REBOOT 193config X86_BIOS_REBOOT
182 bool 194 bool
183 depends on X86_32 && !(X86_VISWS || X86_VOYAGER) 195 depends on !X86_VISWS && !X86_VOYAGER
184 default y 196 default y
185 197
186config X86_TRAMPOLINE 198config X86_TRAMPOLINE
@@ -1161,7 +1173,7 @@ source kernel/Kconfig.hz
1161 1173
1162config KEXEC 1174config KEXEC
1163 bool "kexec system call" 1175 bool "kexec system call"
1164 depends on X86_64 || X86_BIOS_REBOOT 1176 depends on X86_BIOS_REBOOT
1165 help 1177 help
1166 kexec is a system call that implements the ability to shutdown your 1178 kexec is a system call that implements the ability to shutdown your
1167 current kernel, and to start another kernel. It is like a reboot 1179 current kernel, and to start another kernel. It is like a reboot
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 7ef18b01f0bc..2ad6301849a1 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -278,11 +278,6 @@ config GENERIC_CPU
278 278
279endchoice 279endchoice
280 280
281config X86_CPU
282 def_bool y
283 select GENERIC_FIND_FIRST_BIT
284 select GENERIC_FIND_NEXT_BIT
285
286config X86_GENERIC 281config X86_GENERIC
287 bool "Generic x86 support" 282 bool "Generic x86 support"
288 depends on X86_32 283 depends on X86_32
@@ -297,6 +292,11 @@ config X86_GENERIC
297 292
298endif 293endif
299 294
295config X86_CPU
296 def_bool y
297 select GENERIC_FIND_FIRST_BIT
298 select GENERIC_FIND_NEXT_BIT
299
300# 300#
301# Define implied options from the CPU selection here 301# Define implied options from the CPU selection here
302config X86_L1_CACHE_BYTES 302config X86_L1_CACHE_BYTES
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 5b1979a45a1e..ac1e31ba4795 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -118,7 +118,6 @@ config DEBUG_NX_TEST
118config 4KSTACKS 118config 4KSTACKS
119 bool "Use 4Kb for kernel stacks instead of 8Kb" 119 bool "Use 4Kb for kernel stacks instead of 8Kb"
120 depends on X86_32 120 depends on X86_32
121 default y
122 help 121 help
123 If you say Y here the kernel will use a 4Kb stacksize for the 122 If you say Y here the kernel will use a 4Kb stacksize for the
124 kernel stack attached to each process/thread. This facilitates 123 kernel stack attached to each process/thread. This facilitates
@@ -256,11 +255,9 @@ config CPA_DEBUG
256 help 255 help
257 Do change_page_attr() self-tests every 30 seconds. 256 Do change_page_attr() self-tests every 30 seconds.
258 257
259endmenu
260
261config OPTIMIZE_INLINING 258config OPTIMIZE_INLINING
262 bool "Allow gcc to uninline functions marked 'inline'" 259 bool "Allow gcc to uninline functions marked 'inline'"
263 default y 260 depends on BROKEN
264 help 261 help
265 This option determines if the kernel forces gcc to inline the functions 262 This option determines if the kernel forces gcc to inline the functions
266 developers have marked 'inline'. Doing so takes away freedom from gcc to 263 developers have marked 'inline'. Doing so takes away freedom from gcc to
@@ -270,3 +267,6 @@ config OPTIMIZE_INLINING
270 this algorithm is so good that allowing gcc4 to make the decision can 267 this algorithm is so good that allowing gcc4 to make the decision can
271 become the default in the future, until then this option is there to 268 become the default in the future, until then this option is there to
272 test gcc for this. 269 test gcc for this.
270
271endmenu
272
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 30d54ed27e55..bbdacb398d48 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -40,7 +40,6 @@ obj-$(CONFIG_STACKTRACE) += stacktrace.o
40obj-y += cpu/ 40obj-y += cpu/
41obj-y += acpi/ 41obj-y += acpi/
42obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o 42obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o
43obj-$(CONFIG_X86_64) += reboot.o
44obj-$(CONFIG_MCA) += mca_32.o 43obj-$(CONFIG_MCA) += mca_32.o
45obj-$(CONFIG_X86_MSR) += msr.o 44obj-$(CONFIG_X86_MSR) += msr.o
46obj-$(CONFIG_X86_CPUID) += cpuid.o 45obj-$(CONFIG_X86_CPUID) += cpuid.o
diff --git a/arch/x86/kernel/genapic_64.c b/arch/x86/kernel/genapic_64.c
index 021624c83583..cbaaf69bedb2 100644
--- a/arch/x86/kernel/genapic_64.c
+++ b/arch/x86/kernel/genapic_64.c
@@ -83,7 +83,7 @@ unsigned int read_apic_id(void)
83{ 83{
84 unsigned int id; 84 unsigned int id;
85 85
86 WARN_ON(preemptible()); 86 WARN_ON(preemptible() && num_online_cpus() > 1);
87 id = apic_read(APIC_ID); 87 id = apic_read(APIC_ID);
88 if (uv_system_type >= UV_X2APIC) 88 if (uv_system_type >= UV_X2APIC)
89 id |= __get_cpu_var(x2apic_extra_bits); 89 id |= __get_cpu_var(x2apic_extra_bits);
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index 90f038af3adc..b2cc73768a9d 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -656,15 +656,16 @@ int_msg:
656 .asciz "Unknown interrupt or fault at EIP %p %p %p\n" 656 .asciz "Unknown interrupt or fault at EIP %p %p %p\n"
657 657
658fault_msg: 658fault_msg:
659 .asciz \ 659/* fault info: */
660/* fault info: */ "BUG: Int %d: CR2 %p\n" \ 660 .ascii "BUG: Int %d: CR2 %p\n"
661/* pusha regs: */ " EDI %p ESI %p EBP %p ESP %p\n" \ 661/* pusha regs: */
662 " EBX %p EDX %p ECX %p EAX %p\n" \ 662 .ascii " EDI %p ESI %p EBP %p ESP %p\n"
663/* fault frame: */ " err %p EIP %p CS %p flg %p\n" \ 663 .ascii " EBX %p EDX %p ECX %p EAX %p\n"
664 \ 664/* fault frame: */
665 "Stack: %p %p %p %p %p %p %p %p\n" \ 665 .ascii " err %p EIP %p CS %p flg %p\n"
666 " %p %p %p %p %p %p %p %p\n" \ 666 .ascii "Stack: %p %p %p %p %p %p %p %p\n"
667 " %p %p %p %p %p %p %p %p\n" 667 .ascii " %p %p %p %p %p %p %p %p\n"
668 .asciz " %p %p %p %p %p %p %p %p\n"
668 669
669#include "../../x86/xen/xen-head.S" 670#include "../../x86/xen/xen-head.S"
670 671
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 9007f9ea64ee..9b5cfcdfc426 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -137,9 +137,10 @@ static void hpet_reserve_platform_timers(unsigned long id)
137 hd.hd_irq[0] = HPET_LEGACY_8254; 137 hd.hd_irq[0] = HPET_LEGACY_8254;
138 hd.hd_irq[1] = HPET_LEGACY_RTC; 138 hd.hd_irq[1] = HPET_LEGACY_RTC;
139 139
140 for (i = 2; i < nrtimers; timer++, i++) 140 for (i = 2; i < nrtimers; timer++, i++) {
141 hd.hd_irq[i] = (timer->hpet_config & Tn_INT_ROUTE_CNF_MASK) >> 141 hd.hd_irq[i] = (readl(&timer->hpet_config) & Tn_INT_ROUTE_CNF_MASK) >>
142 Tn_INT_ROUTE_CNF_SHIFT; 142 Tn_INT_ROUTE_CNF_SHIFT;
143 }
143 144
144 hpet_alloc(&hd); 145 hpet_alloc(&hd);
145 146
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 388b113a7d88..0c37f16b6950 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -14,7 +14,7 @@ EXPORT_SYMBOL(forbid_dac);
14const struct dma_mapping_ops *dma_ops; 14const struct dma_mapping_ops *dma_ops;
15EXPORT_SYMBOL(dma_ops); 15EXPORT_SYMBOL(dma_ops);
16 16
17int iommu_sac_force __read_mostly = 0; 17static int iommu_sac_force __read_mostly;
18 18
19#ifdef CONFIG_IOMMU_DEBUG 19#ifdef CONFIG_IOMMU_DEBUG
20int panic_on_overflow __read_mostly = 1; 20int panic_on_overflow __read_mostly = 1;
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index a4a838306b2c..07c6d42ab5ff 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -9,6 +9,7 @@
9#include <asm/desc.h> 9#include <asm/desc.h>
10#include <asm/hpet.h> 10#include <asm/hpet.h>
11#include <asm/pgtable.h> 11#include <asm/pgtable.h>
12#include <asm/proto.h>
12#include <asm/reboot_fixups.h> 13#include <asm/reboot_fixups.h>
13#include <asm/reboot.h> 14#include <asm/reboot.h>
14 15
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 361e31611276..4c943eabacc3 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -35,7 +35,7 @@
35#include "i8254.h" 35#include "i8254.h"
36 36
37#ifndef CONFIG_X86_64 37#ifndef CONFIG_X86_64
38#define mod_64(x, y) ((x) - (y) * div64_64(x, y)) 38#define mod_64(x, y) ((x) - (y) * div64_u64(x, y))
39#else 39#else
40#define mod_64(x, y) ((x) % (y)) 40#define mod_64(x, y) ((x) % (y))
41#endif 41#endif
@@ -60,8 +60,8 @@ static u64 muldiv64(u64 a, u32 b, u32 c)
60 rl = (u64)u.l.low * (u64)b; 60 rl = (u64)u.l.low * (u64)b;
61 rh = (u64)u.l.high * (u64)b; 61 rh = (u64)u.l.high * (u64)b;
62 rh += (rl >> 32); 62 rh += (rl >> 32);
63 res.l.high = div64_64(rh, c); 63 res.l.high = div64_u64(rh, c);
64 res.l.low = div64_64(((mod_64(rh, c) << 32) + (rl & 0xffffffff)), c); 64 res.l.low = div64_u64(((mod_64(rh, c) << 32) + (rl & 0xffffffff)), c);
65 return res.ll; 65 return res.ll;
66} 66}
67 67
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 57ac4e4c556a..36809d79788b 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -25,13 +25,13 @@
25#include <linux/hrtimer.h> 25#include <linux/hrtimer.h>
26#include <linux/io.h> 26#include <linux/io.h>
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/math64.h>
28#include <asm/processor.h> 29#include <asm/processor.h>
29#include <asm/msr.h> 30#include <asm/msr.h>
30#include <asm/page.h> 31#include <asm/page.h>
31#include <asm/current.h> 32#include <asm/current.h>
32#include <asm/apicdef.h> 33#include <asm/apicdef.h>
33#include <asm/atomic.h> 34#include <asm/atomic.h>
34#include <asm/div64.h>
35#include "irq.h" 35#include "irq.h"
36 36
37#define PRId64 "d" 37#define PRId64 "d"
@@ -526,8 +526,8 @@ static u32 apic_get_tmcct(struct kvm_lapic *apic)
526 } else 526 } else
527 passed = ktime_sub(now, apic->timer.last_update); 527 passed = ktime_sub(now, apic->timer.last_update);
528 528
529 counter_passed = div64_64(ktime_to_ns(passed), 529 counter_passed = div64_u64(ktime_to_ns(passed),
530 (APIC_BUS_CYCLE_NS * apic->timer.divide_count)); 530 (APIC_BUS_CYCLE_NS * apic->timer.divide_count));
531 531
532 if (counter_passed > tmcct) { 532 if (counter_passed > tmcct) {
533 if (unlikely(!apic_lvtt_period(apic))) { 533 if (unlikely(!apic_lvtt_period(apic))) {
diff --git a/arch/x86/mach-voyager/voyager_cat.c b/arch/x86/mach-voyager/voyager_cat.c
index ecab9fff0fd1..2ad598c104af 100644
--- a/arch/x86/mach-voyager/voyager_cat.c
+++ b/arch/x86/mach-voyager/voyager_cat.c
@@ -877,7 +877,7 @@ void __init voyager_cat_init(void)
877 request_resource(&iomem_resource, res); 877 request_resource(&iomem_resource, res);
878 } 878 }
879 879
880 qic_addr = (unsigned long)ioremap(qic_addr, 0x400); 880 qic_addr = (unsigned long)ioremap_cache(qic_addr, 0x400);
881 881
882 for (j = 0; j < 4; j++) { 882 for (j = 0; j < 4; j++) {
883 __u8 cpu; 883 __u8 cpu;
diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
index 9cf33d3ee5bc..165c871ba9af 100644
--- a/arch/x86/mm/highmem_32.c
+++ b/arch/x86/mm/highmem_32.c
@@ -155,4 +155,3 @@ EXPORT_SYMBOL(kmap);
155EXPORT_SYMBOL(kunmap); 155EXPORT_SYMBOL(kunmap);
156EXPORT_SYMBOL(kmap_atomic); 156EXPORT_SYMBOL(kmap_atomic);
157EXPORT_SYMBOL(kunmap_atomic); 157EXPORT_SYMBOL(kunmap_atomic);
158EXPORT_SYMBOL(kmap_atomic_to_page);
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 804de18abcc2..71bb3159031a 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -149,7 +149,8 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
149 * Don't allow anybody to remap normal RAM that we're using.. 149 * Don't allow anybody to remap normal RAM that we're using..
150 */ 150 */
151 for (pfn = phys_addr >> PAGE_SHIFT; 151 for (pfn = phys_addr >> PAGE_SHIFT;
152 (pfn << PAGE_SHIFT) < last_addr; pfn++) { 152 (pfn << PAGE_SHIFT) < (last_addr & PAGE_MASK);
153 pfn++) {
153 154
154 int is_ram = page_is_ram(pfn); 155 int is_ram = page_is_ram(pfn);
155 156
@@ -176,11 +177,11 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
176 /* 177 /*
177 * Do not fallback to certain memory types with certain 178 * Do not fallback to certain memory types with certain
178 * requested type: 179 * requested type:
179 * - request is uncached, return cannot be write-back 180 * - request is uc-, return cannot be write-back
180 * - request is uncached, return cannot be write-combine 181 * - request is uc-, return cannot be write-combine
181 * - request is write-combine, return cannot be write-back 182 * - request is write-combine, return cannot be write-back
182 */ 183 */
183 if ((prot_val == _PAGE_CACHE_UC && 184 if ((prot_val == _PAGE_CACHE_UC_MINUS &&
184 (new_prot_val == _PAGE_CACHE_WB || 185 (new_prot_val == _PAGE_CACHE_WB ||
185 new_prot_val == _PAGE_CACHE_WC)) || 186 new_prot_val == _PAGE_CACHE_WC)) ||
186 (prot_val == _PAGE_CACHE_WC && 187 (prot_val == _PAGE_CACHE_WC &&
@@ -201,6 +202,9 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
201 default: 202 default:
202 prot = PAGE_KERNEL_NOCACHE; 203 prot = PAGE_KERNEL_NOCACHE;
203 break; 204 break;
205 case _PAGE_CACHE_UC_MINUS:
206 prot = PAGE_KERNEL_UC_MINUS;
207 break;
204 case _PAGE_CACHE_WC: 208 case _PAGE_CACHE_WC:
205 prot = PAGE_KERNEL_WC; 209 prot = PAGE_KERNEL_WC;
206 break; 210 break;
@@ -255,7 +259,16 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
255 */ 259 */
256void __iomem *ioremap_nocache(resource_size_t phys_addr, unsigned long size) 260void __iomem *ioremap_nocache(resource_size_t phys_addr, unsigned long size)
257{ 261{
258 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_UC, 262 /*
263 * Ideally, this should be:
264 * pat_wc_enabled ? _PAGE_CACHE_UC : _PAGE_CACHE_UC_MINUS;
265 *
266 * Till we fix all X drivers to use ioremap_wc(), we will use
267 * UC MINUS.
268 */
269 unsigned long val = _PAGE_CACHE_UC_MINUS;
270
271 return __ioremap_caller(phys_addr, size, val,
259 __builtin_return_address(0)); 272 __builtin_return_address(0));
260} 273}
261EXPORT_SYMBOL(ioremap_nocache); 274EXPORT_SYMBOL(ioremap_nocache);
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index bd5e05c654dc..60bcb5b6a37e 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -777,14 +777,20 @@ static inline int change_page_attr_clear(unsigned long addr, int numpages,
777 777
778int _set_memory_uc(unsigned long addr, int numpages) 778int _set_memory_uc(unsigned long addr, int numpages)
779{ 779{
780 /*
781 * for now UC MINUS. see comments in ioremap_nocache()
782 */
780 return change_page_attr_set(addr, numpages, 783 return change_page_attr_set(addr, numpages,
781 __pgprot(_PAGE_CACHE_UC)); 784 __pgprot(_PAGE_CACHE_UC_MINUS));
782} 785}
783 786
784int set_memory_uc(unsigned long addr, int numpages) 787int set_memory_uc(unsigned long addr, int numpages)
785{ 788{
789 /*
790 * for now UC MINUS. see comments in ioremap_nocache()
791 */
786 if (reserve_memtype(addr, addr + numpages * PAGE_SIZE, 792 if (reserve_memtype(addr, addr + numpages * PAGE_SIZE,
787 _PAGE_CACHE_UC, NULL)) 793 _PAGE_CACHE_UC_MINUS, NULL))
788 return -EINVAL; 794 return -EINVAL;
789 795
790 return _set_memory_uc(addr, numpages); 796 return _set_memory_uc(addr, numpages);
diff --git a/arch/x86/pci/Makefile_32 b/arch/x86/pci/Makefile_32
index 2a1516efb542..7fa519868d70 100644
--- a/arch/x86/pci/Makefile_32
+++ b/arch/x86/pci/Makefile_32
@@ -9,8 +9,8 @@ pci-y := fixup.o
9pci-$(CONFIG_ACPI) += acpi.o 9pci-$(CONFIG_ACPI) += acpi.o
10pci-y += legacy.o irq.o 10pci-y += legacy.o irq.o
11 11
12pci-$(CONFIG_X86_VISWS) := visws.o fixup.o 12pci-$(CONFIG_X86_VISWS) += visws.o fixup.o
13pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o 13pci-$(CONFIG_X86_NUMAQ) += numa.o irq.o
14pci-$(CONFIG_NUMA) += mp_bus_to_node.o 14pci-$(CONFIG_NUMA) += mp_bus_to_node.o
15 15
16obj-y += $(pci-y) common.o early.o 16obj-y += $(pci-y) common.o early.o
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 94f6c73a53d0..8af0f0bae2af 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -301,6 +301,13 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
301 prot = pgprot_val(vma->vm_page_prot); 301 prot = pgprot_val(vma->vm_page_prot);
302 if (pat_wc_enabled && write_combine) 302 if (pat_wc_enabled && write_combine)
303 prot |= _PAGE_CACHE_WC; 303 prot |= _PAGE_CACHE_WC;
304 else if (pat_wc_enabled)
305 /*
306 * ioremap() and ioremap_nocache() defaults to UC MINUS for now.
307 * To avoid attribute conflicts, request UC MINUS here
308 * aswell.
309 */
310 prot |= _PAGE_CACHE_UC_MINUS;
304 else if (boot_cpu_data.x86 > 3) 311 else if (boot_cpu_data.x86 > 3)
305 prot |= _PAGE_CACHE_UC; 312 prot |= _PAGE_CACHE_UC;
306 313
@@ -319,9 +326,8 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
319 * - request is uncached, return cannot be write-combine 326 * - request is uncached, return cannot be write-combine
320 * - request is write-combine, return cannot be write-back 327 * - request is write-combine, return cannot be write-back
321 */ 328 */
322 if ((flags == _PAGE_CACHE_UC && 329 if ((flags == _PAGE_CACHE_UC_MINUS &&
323 (new_flags == _PAGE_CACHE_WB || 330 (new_flags == _PAGE_CACHE_WB)) ||
324 new_flags == _PAGE_CACHE_WC)) ||
325 (flags == _PAGE_CACHE_WC && 331 (flags == _PAGE_CACHE_WC &&
326 new_flags == _PAGE_CACHE_WB)) { 332 new_flags == _PAGE_CACHE_WB)) {
327 free_memtype(addr, addr+len); 333 free_memtype(addr, addr+len);
diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
index e2af8eee80e3..4dceeb1fc5e0 100644
--- a/arch/x86/vdso/vdso32-setup.c
+++ b/arch/x86/vdso/vdso32-setup.c
@@ -303,8 +303,6 @@ int __init sysenter_setup(void)
303 303
304#ifdef CONFIG_X86_32 304#ifdef CONFIG_X86_32
305 gate_vma_init(); 305 gate_vma_init();
306
307 printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO));
308#endif 306#endif
309 307
310 if (!vdso32_sysenter()) { 308 if (!vdso32_sysenter()) {