diff options
Diffstat (limited to 'arch/x86_64')
| -rw-r--r-- | arch/x86_64/Makefile | 10 | ||||
| -rw-r--r-- | arch/x86_64/ia32/ia32_ioctl.c | 17 | ||||
| -rw-r--r-- | arch/x86_64/ia32/ia32entry.S | 2 | ||||
| -rw-r--r-- | arch/x86_64/ia32/vsyscall-syscall.S | 2 | ||||
| -rw-r--r-- | arch/x86_64/ia32/vsyscall-sysenter.S | 2 | ||||
| -rw-r--r-- | arch/x86_64/kernel/e820.c | 16 | ||||
| -rw-r--r-- | arch/x86_64/kernel/entry.S | 2 | ||||
| -rw-r--r-- | arch/x86_64/kernel/genapic_flat.c | 10 | ||||
| -rw-r--r-- | arch/x86_64/kernel/io_apic.c | 4 | ||||
| -rw-r--r-- | arch/x86_64/kernel/setup.c | 2 | ||||
| -rw-r--r-- | arch/x86_64/kernel/smpboot.c | 19 | ||||
| -rw-r--r-- | arch/x86_64/kernel/suspend_asm.S | 2 | ||||
| -rw-r--r-- | arch/x86_64/lib/copy_user.S | 2 | ||||
| -rw-r--r-- | arch/x86_64/lib/getuser.S | 2 | ||||
| -rw-r--r-- | arch/x86_64/lib/putuser.S | 2 |
15 files changed, 42 insertions, 52 deletions
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index 4c6ed96d5f7c..a9cd42e61828 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile | |||
| @@ -86,16 +86,6 @@ install fdimage fdimage144 fdimage288: vmlinux | |||
| 86 | archclean: | 86 | archclean: |
| 87 | $(Q)$(MAKE) $(clean)=$(boot) | 87 | $(Q)$(MAKE) $(clean)=$(boot) |
| 88 | 88 | ||
| 89 | prepare: include/asm-$(ARCH)/offset.h | ||
| 90 | |||
| 91 | arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
| 92 | include/config/MARKER | ||
| 93 | |||
| 94 | include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.s | ||
| 95 | $(call filechk,gen-asm-offsets) | ||
| 96 | |||
| 97 | CLEAN_FILES += include/asm-$(ARCH)/offset.h | ||
| 98 | |||
| 99 | define archhelp | 89 | define archhelp |
| 100 | echo '* bzImage - Compressed kernel image (arch/$(ARCH)/boot/bzImage)' | 90 | echo '* bzImage - Compressed kernel image (arch/$(ARCH)/boot/bzImage)' |
| 101 | echo ' install - Install kernel using' | 91 | echo ' install - Install kernel using' |
diff --git a/arch/x86_64/ia32/ia32_ioctl.c b/arch/x86_64/ia32/ia32_ioctl.c index d259f8a6f811..419758f19ca4 100644 --- a/arch/x86_64/ia32/ia32_ioctl.c +++ b/arch/x86_64/ia32/ia32_ioctl.c | |||
| @@ -24,17 +24,26 @@ | |||
| 24 | static int tiocgdev(unsigned fd, unsigned cmd, unsigned int __user *ptr) | 24 | static int tiocgdev(unsigned fd, unsigned cmd, unsigned int __user *ptr) |
| 25 | { | 25 | { |
| 26 | 26 | ||
| 27 | struct file *file = fget(fd); | 27 | struct file *file; |
| 28 | struct tty_struct *real_tty; | 28 | struct tty_struct *real_tty; |
| 29 | int fput_needed, ret; | ||
| 29 | 30 | ||
| 31 | file = fget_light(fd, &fput_needed); | ||
| 30 | if (!file) | 32 | if (!file) |
| 31 | return -EBADF; | 33 | return -EBADF; |
| 34 | |||
| 35 | ret = -EINVAL; | ||
| 32 | if (file->f_op->ioctl != tty_ioctl) | 36 | if (file->f_op->ioctl != tty_ioctl) |
| 33 | return -EINVAL; | 37 | goto out; |
| 34 | real_tty = (struct tty_struct *)file->private_data; | 38 | real_tty = (struct tty_struct *)file->private_data; |
| 35 | if (!real_tty) | 39 | if (!real_tty) |
| 36 | return -EINVAL; | 40 | goto out; |
| 37 | return put_user(new_encode_dev(tty_devnum(real_tty)), ptr); | 41 | |
| 42 | ret = put_user(new_encode_dev(tty_devnum(real_tty)), ptr); | ||
| 43 | |||
| 44 | out: | ||
| 45 | fput_light(file, fput_needed); | ||
| 46 | return ret; | ||
| 38 | } | 47 | } |
| 39 | 48 | ||
| 40 | #define RTC_IRQP_READ32 _IOR('p', 0x0b, unsigned int) /* Read IRQ rate */ | 49 | #define RTC_IRQP_READ32 _IOR('p', 0x0b, unsigned int) /* Read IRQ rate */ |
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S index f174083d5567..5244f803203d 100644 --- a/arch/x86_64/ia32/ia32entry.S +++ b/arch/x86_64/ia32/ia32entry.S | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <asm/dwarf2.h> | 7 | #include <asm/dwarf2.h> |
| 8 | #include <asm/calling.h> | 8 | #include <asm/calling.h> |
| 9 | #include <asm/offset.h> | 9 | #include <asm/asm-offsets.h> |
| 10 | #include <asm/current.h> | 10 | #include <asm/current.h> |
| 11 | #include <asm/errno.h> | 11 | #include <asm/errno.h> |
| 12 | #include <asm/ia32_unistd.h> | 12 | #include <asm/ia32_unistd.h> |
diff --git a/arch/x86_64/ia32/vsyscall-syscall.S b/arch/x86_64/ia32/vsyscall-syscall.S index e2aaf3de8a42..b024965bb689 100644 --- a/arch/x86_64/ia32/vsyscall-syscall.S +++ b/arch/x86_64/ia32/vsyscall-syscall.S | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | */ | 3 | */ |
| 4 | 4 | ||
| 5 | #include <asm/ia32_unistd.h> | 5 | #include <asm/ia32_unistd.h> |
| 6 | #include <asm/offset.h> | 6 | #include <asm/asm-offsets.h> |
| 7 | #include <asm/segment.h> | 7 | #include <asm/segment.h> |
| 8 | 8 | ||
| 9 | .text | 9 | .text |
diff --git a/arch/x86_64/ia32/vsyscall-sysenter.S b/arch/x86_64/ia32/vsyscall-sysenter.S index 8fb8e0ff3afa..71f3de586b56 100644 --- a/arch/x86_64/ia32/vsyscall-sysenter.S +++ b/arch/x86_64/ia32/vsyscall-sysenter.S | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | */ | 3 | */ |
| 4 | 4 | ||
| 5 | #include <asm/ia32_unistd.h> | 5 | #include <asm/ia32_unistd.h> |
| 6 | #include <asm/offset.h> | 6 | #include <asm/asm-offsets.h> |
| 7 | 7 | ||
| 8 | .text | 8 | .text |
| 9 | .section .text.vsyscall,"ax" | 9 | .section .text.vsyscall,"ax" |
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c index 116ac5f53dce..bb0ae18ec02b 100644 --- a/arch/x86_64/kernel/e820.c +++ b/arch/x86_64/kernel/e820.c | |||
| @@ -567,7 +567,7 @@ unsigned long pci_mem_start = 0xaeedbabe; | |||
| 567 | */ | 567 | */ |
| 568 | __init void e820_setup_gap(void) | 568 | __init void e820_setup_gap(void) |
| 569 | { | 569 | { |
| 570 | unsigned long gapstart, gapsize; | 570 | unsigned long gapstart, gapsize, round; |
| 571 | unsigned long last; | 571 | unsigned long last; |
| 572 | int i; | 572 | int i; |
| 573 | int found = 0; | 573 | int found = 0; |
| @@ -604,14 +604,14 @@ __init void e820_setup_gap(void) | |||
| 604 | } | 604 | } |
| 605 | 605 | ||
| 606 | /* | 606 | /* |
| 607 | * Start allocating dynamic PCI memory a bit into the gap, | 607 | * See how much we want to round up: start off with |
| 608 | * aligned up to the nearest megabyte. | 608 | * rounding to the next 1MB area. |
| 609 | * | ||
| 610 | * Question: should we try to pad it up a bit (do something | ||
| 611 | * like " + (gapsize >> 3)" in there too?). We now have the | ||
| 612 | * technology. | ||
| 613 | */ | 609 | */ |
| 614 | pci_mem_start = (gapstart + 0xfffff) & ~0xfffff; | 610 | round = 0x100000; |
| 611 | while ((gapsize >> 4) > round) | ||
| 612 | round += round; | ||
| 613 | /* Fun with two's complement */ | ||
| 614 | pci_mem_start = (gapstart + round) & -round; | ||
| 615 | 615 | ||
| 616 | printk(KERN_INFO "Allocating PCI resources starting at %lx (gap: %lx:%lx)\n", | 616 | printk(KERN_INFO "Allocating PCI resources starting at %lx (gap: %lx:%lx)\n", |
| 617 | pci_mem_start, gapstart, gapsize); | 617 | pci_mem_start, gapstart, gapsize); |
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index be51dbe1f75e..3620508c8bd9 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #include <asm/errno.h> | 36 | #include <asm/errno.h> |
| 37 | #include <asm/dwarf2.h> | 37 | #include <asm/dwarf2.h> |
| 38 | #include <asm/calling.h> | 38 | #include <asm/calling.h> |
| 39 | #include <asm/offset.h> | 39 | #include <asm/asm-offsets.h> |
| 40 | #include <asm/msr.h> | 40 | #include <asm/msr.h> |
| 41 | #include <asm/unistd.h> | 41 | #include <asm/unistd.h> |
| 42 | #include <asm/thread_info.h> | 42 | #include <asm/thread_info.h> |
diff --git a/arch/x86_64/kernel/genapic_flat.c b/arch/x86_64/kernel/genapic_flat.c index adc96282a9e2..6d57da96bf8c 100644 --- a/arch/x86_64/kernel/genapic_flat.c +++ b/arch/x86_64/kernel/genapic_flat.c | |||
| @@ -78,8 +78,18 @@ static void flat_send_IPI_mask(cpumask_t cpumask, int vector) | |||
| 78 | 78 | ||
| 79 | static void flat_send_IPI_allbutself(int vector) | 79 | static void flat_send_IPI_allbutself(int vector) |
| 80 | { | 80 | { |
| 81 | #ifndef CONFIG_HOTPLUG_CPU | ||
| 81 | if (((num_online_cpus()) - 1) >= 1) | 82 | if (((num_online_cpus()) - 1) >= 1) |
| 82 | __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL); | 83 | __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL); |
| 84 | #else | ||
| 85 | cpumask_t allbutme = cpu_online_map; | ||
| 86 | int me = get_cpu(); /* Ensure we are not preempted when we clear */ | ||
| 87 | cpu_clear(me, allbutme); | ||
| 88 | |||
| 89 | if (!cpus_empty(allbutme)) | ||
| 90 | flat_send_IPI_mask(allbutme, vector); | ||
| 91 | put_cpu(); | ||
| 92 | #endif | ||
| 83 | } | 93 | } |
| 84 | 94 | ||
| 85 | static void flat_send_IPI_all(int vector) | 95 | static void flat_send_IPI_all(int vector) |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 40e0aca088fb..5f1529be1237 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
| @@ -1167,9 +1167,9 @@ void disable_IO_APIC(void) | |||
| 1167 | clear_IO_APIC(); | 1167 | clear_IO_APIC(); |
| 1168 | 1168 | ||
| 1169 | /* | 1169 | /* |
| 1170 | * If the i82559 is routed through an IOAPIC | 1170 | * If the i8259 is routed through an IOAPIC |
| 1171 | * Put that IOAPIC in virtual wire mode | 1171 | * Put that IOAPIC in virtual wire mode |
| 1172 | * so legacy interrups can be delivered. | 1172 | * so legacy interrupts can be delivered. |
| 1173 | */ | 1173 | */ |
| 1174 | pin = find_isa_irq_pin(0, mp_ExtINT); | 1174 | pin = find_isa_irq_pin(0, mp_ExtINT); |
| 1175 | if (pin != -1) { | 1175 | if (pin != -1) { |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 0511d8087910..9aec524be3eb 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
| @@ -929,7 +929,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
| 929 | c->x86_num_cores = intel_num_cpu_cores(c); | 929 | c->x86_num_cores = intel_num_cpu_cores(c); |
| 930 | } | 930 | } |
| 931 | 931 | ||
| 932 | void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c) | 932 | static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c) |
| 933 | { | 933 | { |
| 934 | char *v = c->x86_vendor_id; | 934 | char *v = c->x86_vendor_id; |
| 935 | 935 | ||
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index 90aeccd15190..4fb34b5cb1f9 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c | |||
| @@ -894,23 +894,6 @@ static __init void disable_smp(void) | |||
| 894 | cpu_set(0, cpu_core_map[0]); | 894 | cpu_set(0, cpu_core_map[0]); |
| 895 | } | 895 | } |
| 896 | 896 | ||
| 897 | /* | ||
| 898 | * Handle user cpus=... parameter. | ||
| 899 | */ | ||
| 900 | static __init void enforce_max_cpus(unsigned max_cpus) | ||
| 901 | { | ||
| 902 | int i, k; | ||
| 903 | k = 0; | ||
| 904 | for (i = 0; i < NR_CPUS; i++) { | ||
| 905 | if (!cpu_possible(i)) | ||
| 906 | continue; | ||
| 907 | if (++k > max_cpus) { | ||
| 908 | cpu_clear(i, cpu_possible_map); | ||
| 909 | cpu_clear(i, cpu_present_map); | ||
| 910 | } | ||
| 911 | } | ||
| 912 | } | ||
| 913 | |||
| 914 | #ifdef CONFIG_HOTPLUG_CPU | 897 | #ifdef CONFIG_HOTPLUG_CPU |
| 915 | /* | 898 | /* |
| 916 | * cpu_possible_map should be static, it cannot change as cpu's | 899 | * cpu_possible_map should be static, it cannot change as cpu's |
| @@ -999,8 +982,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
| 999 | current_cpu_data = boot_cpu_data; | 982 | current_cpu_data = boot_cpu_data; |
| 1000 | current_thread_info()->cpu = 0; /* needed? */ | 983 | current_thread_info()->cpu = 0; /* needed? */ |
| 1001 | 984 | ||
| 1002 | enforce_max_cpus(max_cpus); | ||
| 1003 | |||
| 1004 | #ifdef CONFIG_HOTPLUG_CPU | 985 | #ifdef CONFIG_HOTPLUG_CPU |
| 1005 | prefill_possible_map(); | 986 | prefill_possible_map(); |
| 1006 | #endif | 987 | #endif |
diff --git a/arch/x86_64/kernel/suspend_asm.S b/arch/x86_64/kernel/suspend_asm.S index 53f8e1659511..4d659e97df10 100644 --- a/arch/x86_64/kernel/suspend_asm.S +++ b/arch/x86_64/kernel/suspend_asm.S | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
| 15 | #include <asm/segment.h> | 15 | #include <asm/segment.h> |
| 16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
| 17 | #include <asm/offset.h> | 17 | #include <asm/asm-offsets.h> |
| 18 | 18 | ||
| 19 | ENTRY(swsusp_arch_suspend) | 19 | ENTRY(swsusp_arch_suspend) |
| 20 | 20 | ||
diff --git a/arch/x86_64/lib/copy_user.S b/arch/x86_64/lib/copy_user.S index bd556c804248..dfa358b05c89 100644 --- a/arch/x86_64/lib/copy_user.S +++ b/arch/x86_64/lib/copy_user.S | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #define FIX_ALIGNMENT 1 | 7 | #define FIX_ALIGNMENT 1 |
| 8 | 8 | ||
| 9 | #include <asm/current.h> | 9 | #include <asm/current.h> |
| 10 | #include <asm/offset.h> | 10 | #include <asm/asm-offsets.h> |
| 11 | #include <asm/thread_info.h> | 11 | #include <asm/thread_info.h> |
| 12 | #include <asm/cpufeature.h> | 12 | #include <asm/cpufeature.h> |
| 13 | 13 | ||
diff --git a/arch/x86_64/lib/getuser.S b/arch/x86_64/lib/getuser.S index f80bafee8669..3844d5e885a4 100644 --- a/arch/x86_64/lib/getuser.S +++ b/arch/x86_64/lib/getuser.S | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #include <linux/linkage.h> | 29 | #include <linux/linkage.h> |
| 30 | #include <asm/page.h> | 30 | #include <asm/page.h> |
| 31 | #include <asm/errno.h> | 31 | #include <asm/errno.h> |
| 32 | #include <asm/offset.h> | 32 | #include <asm/asm-offsets.h> |
| 33 | #include <asm/thread_info.h> | 33 | #include <asm/thread_info.h> |
| 34 | 34 | ||
| 35 | .text | 35 | .text |
diff --git a/arch/x86_64/lib/putuser.S b/arch/x86_64/lib/putuser.S index 5828b8191667..7f5593974e2d 100644 --- a/arch/x86_64/lib/putuser.S +++ b/arch/x86_64/lib/putuser.S | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | #include <linux/linkage.h> | 27 | #include <linux/linkage.h> |
| 28 | #include <asm/page.h> | 28 | #include <asm/page.h> |
| 29 | #include <asm/errno.h> | 29 | #include <asm/errno.h> |
| 30 | #include <asm/offset.h> | 30 | #include <asm/asm-offsets.h> |
| 31 | #include <asm/thread_info.h> | 31 | #include <asm/thread_info.h> |
| 32 | 32 | ||
| 33 | .text | 33 | .text |
