aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/um/Kconfig.i3862
-rw-r--r--arch/um/Makefile-i3865
-rw-r--r--arch/um/Makefile-x86_645
-rw-r--r--arch/um/kernel/mem.c2
-rw-r--r--arch/um/sys-i386/ptrace.c8
-rw-r--r--arch/um/sys-x86_64/ptrace.c4
-rw-r--r--arch/x86/kernel/pci-gart_64.c2
-rw-r--r--arch/x86/mm/init_64.c6
8 files changed, 12 insertions, 22 deletions
diff --git a/arch/um/Kconfig.i386 b/arch/um/Kconfig.i386
index 9876d80d85dd..e0ac74e5d4c4 100644
--- a/arch/um/Kconfig.i386
+++ b/arch/um/Kconfig.i386
@@ -1,6 +1,6 @@
1menu "Host processor type and features" 1menu "Host processor type and features"
2 2
3source "arch/i386/Kconfig.cpu" 3source "arch/x86/Kconfig.cpu"
4 4
5endmenu 5endmenu
6 6
diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386
index 0178df306939..b01dfb00e5f8 100644
--- a/arch/um/Makefile-i386
+++ b/arch/um/Makefile-i386
@@ -9,6 +9,7 @@ ELF_ARCH := $(SUBARCH)
9ELF_FORMAT := elf32-$(SUBARCH) 9ELF_FORMAT := elf32-$(SUBARCH)
10OBJCOPYFLAGS := -O binary -R .note -R .comment -S 10OBJCOPYFLAGS := -O binary -R .note -R .comment -S
11HEADER_ARCH := x86 11HEADER_ARCH := x86
12CHECKFLAGS += -D__i386__
12 13
13ifeq ("$(origin SUBARCH)", "command line") 14ifeq ("$(origin SUBARCH)", "command line")
14ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") 15ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)")
@@ -26,10 +27,8 @@ AFLAGS += -DCONFIG_X86_32
26CONFIG_X86_32 := y 27CONFIG_X86_32 := y
27export CONFIG_X86_32 28export CONFIG_X86_32
28 29
29ARCH_KERNEL_DEFINES += -U__$(SUBARCH)__ -U$(SUBARCH)
30
31# First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y. 30# First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y.
32include $(srctree)/arch/i386/Makefile.cpu 31include $(srctree)/arch/x86/Makefile_32.cpu
33 32
34# prevent gcc from keeping the stack 16 byte aligned. Taken from i386. 33# prevent gcc from keeping the stack 16 byte aligned. Taken from i386.
35cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) 34cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64
index fe5316f0c6a5..8ed362f93582 100644
--- a/arch/um/Makefile-x86_64
+++ b/arch/um/Makefile-x86_64
@@ -6,12 +6,9 @@ START := 0x60000000
6 6
7_extra_flags_ = -fno-builtin -m64 7_extra_flags_ = -fno-builtin -m64
8 8
9#We #undef __x86_64__ for kernelspace, not for userspace where
10#it's needed for headers to work!
11ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__
12KBUILD_CFLAGS += $(_extra_flags_) 9KBUILD_CFLAGS += $(_extra_flags_)
13 10
14CHECKFLAGS += -m64 11CHECKFLAGS += -m64 -D__x86_64__
15KBUILD_AFLAGS += -m64 12KBUILD_AFLAGS += -m64
16LDFLAGS += -m elf_x86_64 13LDFLAGS += -m elf_x86_64
17KBUILD_CPPFLAGS += -m64 14KBUILD_CPPFLAGS += -m64
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 8456397f5f4d..59822dee438a 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -165,7 +165,7 @@ static void __init kmap_init(void)
165 kmap_prot = PAGE_KERNEL; 165 kmap_prot = PAGE_KERNEL;
166} 166}
167 167
168static void init_highmem(void) 168static void __init init_highmem(void)
169{ 169{
170 pgd_t *pgd; 170 pgd_t *pgd;
171 pud_t *pud; 171 pud_t *pud;
diff --git a/arch/um/sys-i386/ptrace.c b/arch/um/sys-i386/ptrace.c
index 9657c89fdf31..bd3da8a61f64 100644
--- a/arch/um/sys-i386/ptrace.c
+++ b/arch/um/sys-i386/ptrace.c
@@ -155,7 +155,7 @@ int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
155 if (err) 155 if (err)
156 return err; 156 return err;
157 157
158 n = copy_to_user((void *) buf, fpregs, sizeof(fpregs)); 158 n = copy_to_user(buf, fpregs, sizeof(fpregs));
159 if(n > 0) 159 if(n > 0)
160 return -EFAULT; 160 return -EFAULT;
161 161
@@ -168,7 +168,7 @@ int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
168 long fpregs[HOST_FP_SIZE]; 168 long fpregs[HOST_FP_SIZE];
169 169
170 BUG_ON(sizeof(*buf) != sizeof(fpregs)); 170 BUG_ON(sizeof(*buf) != sizeof(fpregs));
171 n = copy_from_user(fpregs, (void *) buf, sizeof(fpregs)); 171 n = copy_from_user(fpregs, buf, sizeof(fpregs));
172 if (n > 0) 172 if (n > 0)
173 return -EFAULT; 173 return -EFAULT;
174 174
@@ -185,7 +185,7 @@ int get_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child)
185 if (err) 185 if (err)
186 return err; 186 return err;
187 187
188 n = copy_to_user((void *) buf, fpregs, sizeof(fpregs)); 188 n = copy_to_user(buf, fpregs, sizeof(fpregs));
189 if(n > 0) 189 if(n > 0)
190 return -EFAULT; 190 return -EFAULT;
191 191
@@ -198,7 +198,7 @@ int set_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child)
198 long fpregs[HOST_XFP_SIZE]; 198 long fpregs[HOST_XFP_SIZE];
199 199
200 BUG_ON(sizeof(*buf) != sizeof(fpregs)); 200 BUG_ON(sizeof(*buf) != sizeof(fpregs));
201 n = copy_from_user(fpregs, (void *) buf, sizeof(fpregs)); 201 n = copy_from_user(fpregs, buf, sizeof(fpregs));
202 if (n > 0) 202 if (n > 0)
203 return -EFAULT; 203 return -EFAULT;
204 204
diff --git a/arch/um/sys-x86_64/ptrace.c b/arch/um/sys-x86_64/ptrace.c
index a3cfeed17af4..b7631b0e9ddc 100644
--- a/arch/um/sys-x86_64/ptrace.c
+++ b/arch/um/sys-x86_64/ptrace.c
@@ -154,7 +154,7 @@ int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
154 if (err) 154 if (err)
155 return err; 155 return err;
156 156
157 n = copy_to_user((void *) buf, fpregs, sizeof(fpregs)); 157 n = copy_to_user(buf, fpregs, sizeof(fpregs));
158 if(n > 0) 158 if(n > 0)
159 return -EFAULT; 159 return -EFAULT;
160 160
@@ -167,7 +167,7 @@ int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
167 long fpregs[HOST_FP_SIZE]; 167 long fpregs[HOST_FP_SIZE];
168 168
169 BUG_ON(sizeof(*buf) != sizeof(fpregs)); 169 BUG_ON(sizeof(*buf) != sizeof(fpregs));
170 n = copy_from_user(fpregs, (void *) buf, sizeof(fpregs)); 170 n = copy_from_user(fpregs, buf, sizeof(fpregs));
171 if (n > 0) 171 if (n > 0)
172 return -EFAULT; 172 return -EFAULT;
173 173
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index ae7e0161ce46..79b514b381b1 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -435,7 +435,7 @@ static int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents,
435 435
436error: 436error:
437 flush_gart(); 437 flush_gart();
438 gart_unmap_sg(dev, sg, nents, dir); 438 gart_unmap_sg(dev, sg, out, dir);
439 /* When it was forced or merged try again in a dumb way */ 439 /* When it was forced or merged try again in a dumb way */
440 if (force_iommu || iommu_merge) { 440 if (force_iommu || iommu_merge) {
441 out = dma_map_sg_nonforce(dev, sg, nents, dir); 441 out = dma_map_sg_nonforce(dev, sg, nents, dir);
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 1e3862e41065..a7308b2cd058 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -728,12 +728,6 @@ int in_gate_area_no_task(unsigned long addr)
728 return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END); 728 return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END);
729} 729}
730 730
731void * __init alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size)
732{
733 return __alloc_bootmem_core(pgdat->bdata, size,
734 SMP_CACHE_BYTES, (4UL*1024*1024*1024), 0);
735}
736
737const char *arch_vma_name(struct vm_area_struct *vma) 731const char *arch_vma_name(struct vm_area_struct *vma)
738{ 732{
739 if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso) 733 if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso)