diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-18 20:50:22 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-18 20:50:22 -0700 |
| commit | 098fc560ef2bbd1bde80845c898fa95db616eb6c (patch) | |
| tree | ca722c6fdbdffe9b7cfd31d61e8f4aae906a319c /arch | |
| parent | bffe01870598b7a0a77073e25ee94e026bc98e6b (diff) | |
| parent | 2a136606fe21b603a0ce484fc578f862f8e8384d (diff) | |
Trivial Makefile merge
Diffstat (limited to 'arch')
62 files changed, 206 insertions, 154 deletions
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index 5ff439b04bae..e74677115e2b 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c @@ -138,6 +138,9 @@ irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs) while (nticks > 0) { do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif nticks--; } diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 3043e6de75d9..2e16689ec4c6 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -343,6 +343,9 @@ void timer_tick(struct pt_regs *regs) do_leds(); do_set_rtc(); do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif } void (*init_arch_time)(void); diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index e5e97fef86ea..a35ade06e0c9 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -17,8 +17,10 @@ #include <asm/arch/pxa-regs.h> #include <linux/init.h> #include <linux/pm.h> +#include <linux/device.h> #include <asm/hardware.h> +#include <asm/irq.h> #include "generic.h" @@ -117,3 +119,45 @@ unsigned int get_lcdclk_frequency_10khz(void) EXPORT_SYMBOL(get_clk_frequency_khz); EXPORT_SYMBOL(get_memclk_frequency_10khz); EXPORT_SYMBOL(get_lcdclk_frequency_10khz); + + +/* + * device registration specific to PXA27x. + */ + +static u64 pxa27x_dmamask = 0xffffffffUL; + +static struct resource pxa27x_ohci_resources[] = { + [0] = { + .start = 0x4C000000, + .end = 0x4C00ff6f, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_USBH1, + .end = IRQ_USBH1, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device ohci_device = { + .name = "pxa27x-ohci", + .id = -1, + .dev = { + .dma_mask = &pxa27x_dmamask, + .coherent_dma_mask = 0xffffffff, + }, + .num_resources = ARRAY_SIZE(pxa27x_ohci_resources), + .resource = pxa27x_ohci_resources, +}; + +static struct platform_device *devices[] __initdata = { + &ohci_device, +}; + +static int __init pxa27x_init(void) +{ + return platform_add_devices(devices, ARRAY_SIZE(devices)); +} + +subsys_initcall(pxa27x_init); diff --git a/arch/arm26/kernel/time.c b/arch/arm26/kernel/time.c index dbbc21404727..a7a18c4b21ac 100644 --- a/arch/arm26/kernel/time.c +++ b/arch/arm26/kernel/time.c @@ -166,6 +166,9 @@ EXPORT_SYMBOL(do_settimeofday); static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif do_set_rtc(); //FIME - EVERY timer IRQ? profile_tick(CPU_PROFILING, regs); return IRQ_HANDLED; //FIXME - is this right? diff --git a/arch/arm26/machine/dma.c b/arch/arm26/machine/dma.c index 44090c40cab6..0d8ea1992baa 100644 --- a/arch/arm26/machine/dma.c +++ b/arch/arm26/machine/dma.c @@ -47,7 +47,7 @@ static void arc_floppy_data_enable_dma(dmach_t channel, dma_t *dma) &fdc1772_dma_read_end - &fdc1772_dma_read); fdc1772_setupdma(dma->buf.length, dma->buf.__address); /* Sets data pointer up */ enable_fiq(FIQ_FLOPPYDATA); - loacl_irq_restore(flags); + local_irq_restore(flags); } break; diff --git a/arch/cris/arch-v10/kernel/fasttimer.c b/arch/cris/arch-v10/kernel/fasttimer.c index 53b94eb3e1af..7dac98958805 100644 --- a/arch/cris/arch-v10/kernel/fasttimer.c +++ b/arch/cris/arch-v10/kernel/fasttimer.c @@ -102,7 +102,6 @@ #include <asm/rtc.h> #include <linux/config.h> -#include <linux/version.h> #include <asm/arch/svinto.h> #include <asm/fasttimer.h> @@ -599,23 +598,8 @@ void schedule_usleep(unsigned long us) #ifdef CONFIG_PROC_FS static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) - ,int *eof, void *data_unused -#else - ,int unused -#endif - ); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) + ,int *eof, void *data_unused); static struct proc_dir_entry *fasttimer_proc_entry; -#else -static struct proc_dir_entry fasttimer_proc_entry = -{ - 0, 9, "fasttimer", - S_IFREG | S_IRUGO, 1, 0, 0, - 0, NULL /* ops -- default to array */, - &proc_fasttimer_read /* get_info */, -}; -#endif #endif /* CONFIG_PROC_FS */ #ifdef CONFIG_PROC_FS @@ -624,12 +608,7 @@ static struct proc_dir_entry fasttimer_proc_entry = #define BIG_BUF_SIZE (500 + NUM_TIMER_STATS * 300) static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) - ,int *eof, void *data_unused -#else - ,int unused -#endif - ) + ,int *eof, void *data_unused) { unsigned long flags; int i = 0; @@ -805,9 +784,7 @@ static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len memcpy(buf, bigbuf + offset, len); *start = buf; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) *eof = 1; -#endif return len; } @@ -982,12 +959,8 @@ void fast_timer_init(void) } #endif #ifdef CONFIG_PROC_FS -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) if ((fasttimer_proc_entry = create_proc_entry( "fasttimer", 0, 0 ))) fasttimer_proc_entry->read_proc = proc_fasttimer_read; -#else - proc_register_dynamic(&proc_root, &fasttimer_proc_entry); -#endif #endif /* PROC_FS */ if(request_irq(TIMER1_IRQ_NBR, timer1_handler, SA_SHIRQ, "fast timer int", NULL)) diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c index 298e86a01c01..89e4efb9984a 100644 --- a/arch/cris/arch-v10/kernel/time.c +++ b/arch/cris/arch-v10/kernel/time.c @@ -227,6 +227,9 @@ timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) /* call the real timer interrupt handler */ do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif /* * If we have an externally synchronized Linux clock, then update diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c index 0b293d652bf4..8a600218334d 100644 --- a/arch/h8300/kernel/time.c +++ b/arch/h8300/kernel/time.c @@ -46,6 +46,9 @@ static void timer_interrupt(int irq, void *dummy, struct pt_regs * regs) platform_timer_eoi(); do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif profile_tick(CPU_PROFILING, regs); } diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S index a6e043c46e66..925d3f5a3824 100644 --- a/arch/i386/boot/video.S +++ b/arch/i386/boot/video.S @@ -1936,7 +1936,7 @@ store_edid: movl $0x13131313, %eax # memset block with 0x13 movw $32, %cx - movw $0x440, %di + movw $0x140, %di cld rep stosl @@ -1945,7 +1945,7 @@ store_edid: movw $0x01, %bx movw $0x00, %cx movw $0x01, %dx - movw $0x440, %di + movw $0x140, %di int $0x10 popw %di # restore all registers diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 8a0536250dd3..4d60d9b9c3ac 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c @@ -450,6 +450,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) { unsigned int irq; + unsigned int plat_gsi = gsi; #ifdef CONFIG_PCI /* @@ -471,10 +472,10 @@ unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) #ifdef CONFIG_X86_IO_APIC if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) { - mp_register_gsi(gsi, edge_level, active_high_low); + plat_gsi = mp_register_gsi(gsi, edge_level, active_high_low); } #endif - acpi_gsi_to_irq(gsi, &irq); + acpi_gsi_to_irq(plat_gsi, &irq); return irq; } EXPORT_SYMBOL(acpi_register_gsi); diff --git a/arch/i386/kernel/cpu/mcheck/k7.c b/arch/i386/kernel/cpu/mcheck/k7.c index 304bf420f0f1..dcf9f068a5ed 100644 --- a/arch/i386/kernel/cpu/mcheck/k7.c +++ b/arch/i386/kernel/cpu/mcheck/k7.c @@ -54,6 +54,7 @@ static asmlinkage void k7_machine_check(struct pt_regs * regs, long error_code) wrmsr (MSR_IA32_MC0_STATUS+i*4, 0UL, 0UL); /* Serialize */ wmb(); + add_taint(TAINT_MACHINE_CHECK); } } diff --git a/arch/i386/kernel/cpu/mcheck/non-fatal.c b/arch/i386/kernel/cpu/mcheck/non-fatal.c index a1664bb1577e..7864ddfccf07 100644 --- a/arch/i386/kernel/cpu/mcheck/non-fatal.c +++ b/arch/i386/kernel/cpu/mcheck/non-fatal.c @@ -48,6 +48,7 @@ static void mce_checkregs (void *info) /* Serialize */ wmb(); + add_taint(TAINT_MACHINE_CHECK); } } } diff --git a/arch/i386/kernel/cpu/mcheck/p4.c b/arch/i386/kernel/cpu/mcheck/p4.c index b31fc006f1bf..51175846dd29 100644 --- a/arch/i386/kernel/cpu/mcheck/p4.c +++ b/arch/i386/kernel/cpu/mcheck/p4.c @@ -40,6 +40,7 @@ static void unexpected_thermal_interrupt(struct pt_regs *regs) { printk(KERN_ERR "CPU%d: Unexpected LVT TMR interrupt!\n", smp_processor_id()); + add_taint(TAINT_MACHINE_CHECK); } /* P4/Xeon Thermal transition interrupt handler */ @@ -60,6 +61,7 @@ static void intel_thermal_interrupt(struct pt_regs *regs) printk(KERN_EMERG "CPU%d: Temperature above threshold\n", cpu); printk(KERN_EMERG "CPU%d: Running in modulated clock mode\n", cpu); + add_taint(TAINT_MACHINE_CHECK); } else { printk(KERN_INFO "CPU%d: Temperature/speed normal\n", cpu); } @@ -222,6 +224,7 @@ static asmlinkage void intel_machine_check(struct pt_regs * regs, long error_cod wrmsr(msr, 0UL, 0UL); /* Serialize */ wmb(); + add_taint(TAINT_MACHINE_CHECK); } } mcgstl &= ~(1<<2); diff --git a/arch/i386/kernel/cpu/mcheck/p5.c b/arch/i386/kernel/cpu/mcheck/p5.c index c92cd661c5ef..e62b1f888a4e 100644 --- a/arch/i386/kernel/cpu/mcheck/p5.c +++ b/arch/i386/kernel/cpu/mcheck/p5.c @@ -25,6 +25,7 @@ static asmlinkage void pentium_machine_check(struct pt_regs * regs, long error_c printk(KERN_EMERG "CPU#%d: Machine Check Exception: 0x%8X (type 0x%8X).\n", smp_processor_id(), loaddr, lotype); if(lotype&(1<<5)) printk(KERN_EMERG "CPU#%d: Possible thermal failure (CPU on fire ?).\n", smp_processor_id()); + add_taint(TAINT_MACHINE_CHECK); } /* Set up machine check reporting for processors with Intel style MCE */ diff --git a/arch/i386/kernel/cpu/mcheck/p6.c b/arch/i386/kernel/cpu/mcheck/p6.c index d63e9578c96c..c8778643b666 100644 --- a/arch/i386/kernel/cpu/mcheck/p6.c +++ b/arch/i386/kernel/cpu/mcheck/p6.c @@ -72,6 +72,7 @@ static asmlinkage void intel_machine_check(struct pt_regs * regs, long error_cod wrmsr (msr, 0UL, 0UL); /* Serialize */ wmb(); + add_taint(TAINT_MACHINE_CHECK); } } mcgstl &= ~(1<<2); diff --git a/arch/i386/kernel/cpu/mcheck/winchip.c b/arch/i386/kernel/cpu/mcheck/winchip.c index ddb579da43dd..64090175f4f5 100644 --- a/arch/i386/kernel/cpu/mcheck/winchip.c +++ b/arch/i386/kernel/cpu/mcheck/winchip.c @@ -19,6 +19,7 @@ static asmlinkage void winchip_machine_check(struct pt_regs * regs, long error_code) { printk(KERN_EMERG "CPU0: Machine Check Exception.\n"); + add_taint(TAINT_MACHINE_CHECK); } /* Set up machine check reporting on the Winchip C6 series */ diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index b158ceb8b126..c6a2e244a073 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -867,6 +867,9 @@ ENTRY(sys_call_table) .long sys_mq_getsetattr .long sys_ni_syscall /* reserved for kexec */ .long sys_waitid - .long sys_setaltroot + .long sys_setaltroot /* 285 */ + .long sys_add_key + .long sys_request_key + .long sys_keyctl syscall_table_size=(.-sys_call_table) diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c index aca20edc5ea1..4de7538043f5 100644 --- a/arch/i386/kernel/microcode.c +++ b/arch/i386/kernel/microcode.c @@ -69,7 +69,8 @@ * Thanks to Stuart Swales for pointing out this bug. */ - +//#define DEBUG /* pr_debug */ +#include <linux/kernel.h> #include <linux/init.h> #include <linux/sched.h> #include <linux/module.h> @@ -88,12 +89,6 @@ MODULE_AUTHOR("Tigran Aivazian <tigran@veritas.com>"); MODULE_LICENSE("GPL"); #define MICROCODE_VERSION "1.14" -#define MICRO_DEBUG 0 -#if MICRO_DEBUG -#define dprintk(x...) printk(KERN_INFO x) -#else -#define dprintk(x...) -#endif #define DEFAULT_UCODE_DATASIZE (2000) /* 2000 bytes */ #define MC_HEADER_SIZE (sizeof (microcode_header_t)) /* 48 bytes */ @@ -172,7 +167,7 @@ static void collect_cpu_info (void *unused) __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx"); /* get the current revision from MSR 0x8B */ rdmsr(MSR_IA32_UCODE_REV, val[0], uci->rev); - dprintk("microcode: collect_cpu_info : sig=0x%x, pf=0x%x, rev=0x%x\n", + pr_debug("microcode: collect_cpu_info : sig=0x%x, pf=0x%x, rev=0x%x\n", uci->sig, uci->pf, uci->rev); } @@ -180,22 +175,22 @@ static inline void mark_microcode_update (int cpu_num, microcode_header_t *mc_he { struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; - dprintk("Microcode Found.\n"); - dprintk(" Header Revision 0x%x\n", mc_header->hdrver); - dprintk(" Loader Revision 0x%x\n", mc_header->ldrver); - dprintk(" Revision 0x%x \n", mc_header->rev); - dprintk(" Date %x/%x/%x\n", + pr_debug("Microcode Found.\n"); + pr_debug(" Header Revision 0x%x\n", mc_header->hdrver); + pr_debug(" Loader Revision 0x%x\n", mc_header->ldrver); + pr_debug(" Revision 0x%x \n", mc_header->rev); + pr_debug(" Date %x/%x/%x\n", ((mc_header->date >> 24 ) & 0xff), ((mc_header->date >> 16 ) & 0xff), (mc_header->date & 0xFFFF)); - dprintk(" Signature 0x%x\n", sig); - dprintk(" Type 0x%x Family 0x%x Model 0x%x Stepping 0x%x\n", + pr_debug(" Signature 0x%x\n", sig); + pr_debug(" Type 0x%x Family 0x%x Model 0x%x Stepping 0x%x\n", ((sig >> 12) & 0x3), ((sig >> 8) & 0xf), ((sig >> 4) & 0xf), ((sig & 0xf))); - dprintk(" Processor Flags 0x%x\n", pf); - dprintk(" Checksum 0x%x\n", cksum); + pr_debug(" Processor Flags 0x%x\n", pf); + pr_debug(" Checksum 0x%x\n", cksum); if (mc_header->rev < uci->rev) { printk(KERN_ERR "microcode: CPU%d not 'upgrading' to earlier revision" @@ -209,7 +204,7 @@ static inline void mark_microcode_update (int cpu_num, microcode_header_t *mc_he goto out; } - dprintk("microcode: CPU%d found a matching microcode update with " + pr_debug("microcode: CPU%d found a matching microcode update with " " revision 0x%x (current=0x%x)\n", cpu_num, mc_header->rev, uci->rev); uci->cksum = cksum; uci->pf = pf; /* keep the original mc pf for cksum calculation */ diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 41cb82604f7f..8b6c7e8187af 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c @@ -1051,7 +1051,7 @@ void __init mp_config_acpi_legacy_irqs (void) int (*platform_rename_gsi)(int ioapic, int gsi); -void mp_register_gsi (u32 gsi, int edge_level, int active_high_low) +int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) { int ioapic = -1; int ioapic_pin = 0; @@ -1060,13 +1060,13 @@ void mp_register_gsi (u32 gsi, int edge_level, int active_high_low) #ifdef CONFIG_ACPI_BUS /* Don't set up the ACPI SCI because it's already set up */ if (acpi_fadt.sci_int == gsi) - return; + return gsi; #endif ioapic = mp_find_ioapic(gsi); if (ioapic < 0) { printk(KERN_WARNING "No IOAPIC for GSI %u\n", gsi); - return; + return gsi; } ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_base; @@ -1085,12 +1085,12 @@ void mp_register_gsi (u32 gsi, int edge_level, int active_high_low) printk(KERN_ERR "Invalid reference to IOAPIC pin " "%d-%d\n", mp_ioapic_routing[ioapic].apic_id, ioapic_pin); - return; + return gsi; } if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) { Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n", mp_ioapic_routing[ioapic].apic_id, ioapic_pin); - return; + return gsi; } mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit); @@ -1098,6 +1098,7 @@ void mp_register_gsi (u32 gsi, int edge_level, int active_high_low) io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, edge_level == ACPI_EDGE_SENSITIVE ? 0 : 1, active_high_low == ACPI_ACTIVE_HIGH ? 0 : 1); + return gsi; } #endif /*CONFIG_X86_IO_APIC && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)*/ diff --git a/arch/i386/kernel/numaq.c b/arch/i386/kernel/numaq.c index ed41eebf09e8..38c762daba5a 100644 --- a/arch/i386/kernel/numaq.c +++ b/arch/i386/kernel/numaq.c @@ -28,6 +28,7 @@ #include <linux/bootmem.h> #include <linux/mmzone.h> #include <linux/module.h> +#include <linux/nodemask.h> #include <asm/numaq.h> /* These are needed before the pgdat's are created */ diff --git a/arch/i386/kernel/srat.c b/arch/i386/kernel/srat.c index e80cd8e417e0..bb55e0d5187e 100644 --- a/arch/i386/kernel/srat.c +++ b/arch/i386/kernel/srat.c @@ -28,6 +28,7 @@ #include <linux/bootmem.h> #include <linux/mmzone.h> #include <linux/acpi.h> +#include <linux/nodemask.h> #include <asm/srat.h> /* diff --git a/arch/i386/kernel/timers/common.c b/arch/i386/kernel/timers/common.c index 7271b061556a..f7f90005e22e 100644 --- a/arch/i386/kernel/timers/common.c +++ b/arch/i386/kernel/timers/common.c @@ -5,6 +5,7 @@ #include <linux/init.h> #include <linux/timex.h> #include <linux/errno.h> +#include <linux/jiffies.h> #include <asm/io.h> #include <asm/timer.h> diff --git a/arch/i386/mach-default/topology.c b/arch/i386/mach-default/topology.c index c70547a7e81e..37bfa9144c8b 100644 --- a/arch/i386/mach-default/topology.c +++ b/arch/i386/mach-default/topology.c @@ -27,6 +27,7 @@ */ #include <linux/init.h> #include <linux/smp.h> +#include <linux/nodemask.h> #include <asm/cpu.h> struct i386_cpu cpu_devices[NR_CPUS]; diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c index efdcb0da9ffd..7dace975bae6 100644 --- a/arch/i386/mm/discontig.c +++ b/arch/i386/mm/discontig.c @@ -28,6 +28,7 @@ #include <linux/mmzone.h> #include <linux/highmem.h> #include <linux/initrd.h> +#include <linux/nodemask.h> #include <asm/e820.h> #include <asm/setup.h> #include <asm/mmzone.h> diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c index 7e4b12121df2..5f6e3e4b66c9 100644 --- a/arch/i386/mm/hugetlbpage.c +++ b/arch/i386/mm/hugetlbpage.c @@ -247,6 +247,7 @@ int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma) page = pmd_page(*pmd); pmd_clear(pmd); + mm->nr_ptes--; dec_page_state(nr_page_table_pages); page_cache_release(page); } diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 6e012ba55879..fb010358ab28 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c @@ -43,6 +43,7 @@ #include <linux/acpi.h> #include <linux/efi.h> #include <linux/mmzone.h> +#include <linux/nodemask.h> #include <asm/io.h> #include <asm/iosapic.h> #include <asm/machvec.h> diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 853d8dae7c3d..992854fa4b4c 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c @@ -67,14 +67,8 @@ timer_interrupt (int irq, void *dev_id, struct pt_regs *regs) profile_tick(CPU_PROFILING, regs); while (1) { -#ifdef CONFIG_SMP - /* - * For UP, this is done in do_timer(). Weird, but - * fixing that would require updates to all - * platforms. - */ update_process_times(user_mode(regs)); -#endif + new_itm += local_cpu_data->itm_delta; if (smp_processor_id() == TIME_KEEPER_ID) { diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index eb464cbb9319..72e9c16f34ed 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c @@ -16,6 +16,7 @@ #include <linux/bootmem.h> #include <linux/acpi.h> #include <linux/efi.h> +#include <linux/nodemask.h> #include <asm/pgalloc.h> #include <asm/tlb.h> #include <asm/meminit.h> diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 11d122980d3b..e47e19588525 100644 --- a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c @@ -45,6 +45,9 @@ static inline int set_rtc_mmss(unsigned long nowtime) static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs) { do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif profile_tick(CPU_PROFILING, regs); #ifdef CONFIG_HEARTBEAT diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c index bca65bd06b61..3cf200dc7e7d 100644 --- a/arch/m68k/sun3/sun3ints.c +++ b/arch/m68k/sun3/sun3ints.c @@ -85,6 +85,9 @@ static irqreturn_t sun3_int5(int irq, void *dev_id, struct pt_regs *fp) intersil_clear(); #endif do_timer(fp); +#ifndef CONFIG_SMP + update_process_times(user_mode(fp)); +#endif if(!(kstat_cpu(0).irqs[SYS_IRQS + irq] % 20)) sun3_leds(led_pattern[(kstat_cpu(0).irqs[SYS_IRQS+irq]%160) /20]); diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c index e328f2810b17..5c3ca671627c 100644 --- a/arch/m68knommu/kernel/time.c +++ b/arch/m68knommu/kernel/time.c @@ -57,6 +57,9 @@ static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs) write_seqlock(&xtime_lock); do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif if (current->pid) profile_tick(CPU_PROFILING, regs); diff --git a/arch/mips/au1000/common/time.c b/arch/mips/au1000/common/time.c index a72de97275f0..d9f4c1bb6ecb 100644 --- a/arch/mips/au1000/common/time.c +++ b/arch/mips/au1000/common/time.c @@ -99,6 +99,9 @@ void mips_timer_interrupt(struct pt_regs *regs) kstat_this_cpu.irqs[irq]++; do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif r4k_cur += r4k_offset; ack_r4ktimer(r4k_cur); @@ -137,6 +140,9 @@ void counter0_irq(int irq, void *dev_id, struct pt_regs *regs) while (time_elapsed > 0) { do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif time_elapsed -= MATCH20_INC; last_match20 += MATCH20_INC; jiffie_drift++; @@ -153,6 +159,9 @@ void counter0_irq(int irq, void *dev_id, struct pt_regs *regs) if (jiffie_drift >= 999) { jiffie_drift -= 999; do_timer(regs); /* increment jiffies by one */ +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif } } diff --git a/arch/mips/au1000/db1x00/mirage_ts.c b/arch/mips/au1000/db1x00/mirage_ts.c index 585861e80b64..58d41c29395e 100644 --- a/arch/mips/au1000/db1x00/mirage_ts.c +++ b/arch/mips/au1000/db1x00/mirage_ts.c @@ -68,7 +68,7 @@ int wm97xx_comodule_present = 1; #define err(format, arg...) printk(KERN_ERR TS_NAME ": " format "\n" , ## arg) #define info(format, arg...) printk(KERN_INFO TS_NAME ": " format "\n" , ## arg) #define warn(format, arg...) printk(KERN_WARNING TS_NAME ": " format "\n" , ## arg) -#define DPRINTK(format, arg...) printk(__FUNCTION__ ": " format "\n" , ## arg) +#define DPRINTK(format, arg...) printk("%s: " format "\n", __FUNCTION__ , ## arg) #define PEN_DOWN_IRQ AU1000_GPIO_7 diff --git a/arch/mips/baget/time.c b/arch/mips/baget/time.c index ed82c62df3d6..e715cb6bc0fb 100644 --- a/arch/mips/baget/time.c +++ b/arch/mips/baget/time.c @@ -52,6 +52,9 @@ void static timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) if (timer_intr_valid()) { sti(); do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif } } diff --git a/arch/mips/galileo-boards/ev96100/time.c b/arch/mips/galileo-boards/ev96100/time.c index 10189b95d56b..8cbe8426491a 100644 --- a/arch/mips/galileo-boards/ev96100/time.c +++ b/arch/mips/galileo-boards/ev96100/time.c @@ -73,6 +73,9 @@ void mips_timer_interrupt(struct pt_regs *regs) do { kstat_this_cpu.irqs[irq]++; do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif r4k_cur += r4k_offset; ack_r4ktimer(r4k_cur); diff --git a/arch/mips/gt64120/common/time.c b/arch/mips/gt64120/common/time.c index 44f33caf298e..edcea9fbeda5 100644 --- a/arch/mips/gt64120/common/time.c +++ b/arch/mips/gt64120/common/time.c @@ -36,6 +36,9 @@ static void gt64120_irq(int irq, void *dev_id, struct pt_regs *regs) handled = 1; irq_src &= ~0x00000800; do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif } GT_WRITE(GT_INTRCAUSE_OFS, 0); diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 915e5539e7f2..0a4bf6b3256d 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c @@ -418,10 +418,7 @@ void local_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { if (current->pid) profile_tick(CPU_PROFILING, regs); -#ifdef CONFIG_SMP - /* in UP mode, update_process_times() is invoked by do_timer() */ update_process_times(user_mode(regs)); -#endif } /* diff --git a/arch/mips/momentum/ocelot_g/gt-irq.c b/arch/mips/momentum/ocelot_g/gt-irq.c index 93708965be11..cede65a40632 100644 --- a/arch/mips/momentum/ocelot_g/gt-irq.c +++ b/arch/mips/momentum/ocelot_g/gt-irq.c @@ -134,6 +134,9 @@ static irqreturn_t gt64240_p0int_irq(int irq, void *dev, struct pt_regs *regs) /* handle the timer call */ do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif } if (irq_src) { diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c index cc0419ad7407..9d384d13132d 100644 --- a/arch/mips/sgi-ip27/ip27-timer.c +++ b/arch/mips/sgi-ip27/ip27-timer.c @@ -112,9 +112,7 @@ again: if (cpu == 0) do_timer(regs); -#ifdef CONFIG_SMP update_process_times(user_mode(regs)); -#endif /* CONFIG_SMP */ /* * If we have an externally synchronized Linux clock, then update diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index 8f4ad0cf228d..6cf7407344ba 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c @@ -79,6 +79,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) while (nticks--) { #ifdef CONFIG_SMP smp_do_timer(regs); +#else + update_process_times(user_mode(regs)); #endif if (cpu == 0) { write_seqlock(&xtime_lock); diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c index 60e7ef5ad9ab..8839f6f07dab 100644 --- a/arch/ppc/kernel/time.c +++ b/arch/ppc/kernel/time.c @@ -150,6 +150,9 @@ void timer_interrupt(struct pt_regs * regs) write_seqlock(&xtime_lock); tb_last_stamp = jiffy_stamp; do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif /* * update the rtc when needed, this should be performed on the diff --git a/arch/ppc64/kernel/sysfs.c b/arch/ppc64/kernel/sysfs.c index cfc3c0b7b1c2..e7b94ada0e2d 100644 --- a/arch/ppc64/kernel/sysfs.c +++ b/arch/ppc64/kernel/sysfs.c @@ -6,6 +6,8 @@ #include <linux/init.h> #include <linux/sched.h> #include <linux/module.h> +#include <linux/nodemask.h> + #include <asm/current.h> #include <asm/processor.h> #include <asm/cputable.h> diff --git a/arch/ppc64/kernel/time.c b/arch/ppc64/kernel/time.c index ef44a3ec40dc..66fe6f6711b5 100644 --- a/arch/ppc64/kernel/time.c +++ b/arch/ppc64/kernel/time.c @@ -277,6 +277,9 @@ int timer_interrupt(struct pt_regs * regs) write_seqlock(&xtime_lock); tb_last_stamp = lpaca->next_jiffy_update_tb; do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif timer_sync_xtime( cur_tb ); timer_check_rtc(); write_sequnlock(&xtime_lock); diff --git a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c index f9d47ac8f6d5..bf7022c94852 100644 --- a/arch/ppc64/mm/hugetlbpage.c +++ b/arch/ppc64/mm/hugetlbpage.c @@ -213,6 +213,7 @@ static int prepare_low_seg_for_htlb(struct mm_struct *mm, unsigned long seg) } page = pmd_page(*pmd); pmd_clear(pmd); + mm->nr_ptes--; dec_page_state(nr_page_table_pages); pte_free_tlb(tlb, page); } diff --git a/arch/ppc64/mm/numa.c b/arch/ppc64/mm/numa.c index 977140f78a37..43e8bc084996 100644 --- a/arch/ppc64/mm/numa.c +++ b/arch/ppc64/mm/numa.c @@ -14,6 +14,7 @@ #include <linux/mm.h> #include <linux/mmzone.h> #include <linux/module.h> +#include <linux/nodemask.h> #include <asm/lmb.h> #include <asm/machdep.h> #include <asm/abs_addr.h> diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 8f279421646f..543e0d8817c6 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -233,8 +233,10 @@ void account_ticks(struct pt_regs *regs) while (ticks--) update_process_times(user_mode(regs)); #else - while (ticks--) + while (ticks--) { do_timer(regs); + update_process_times(user_mode(regs)); + } #endif s390_do_profile(regs); } diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index 7bb5da460707..149803d26436 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c @@ -266,6 +266,9 @@ static long last_rtc_update; static inline void do_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif profile_tick(CPU_PROFILING, regs); #ifdef CONFIG_HEARTBEAT diff --git a/arch/sh64/kernel/time.c b/arch/sh64/kernel/time.c index b3738ed371d8..9d73104f6817 100644 --- a/arch/sh64/kernel/time.c +++ b/arch/sh64/kernel/time.c @@ -309,6 +309,9 @@ static inline void do_timer_interrupt(int irq, void *dev_id, struct pt_regs *reg ctc_last_interrupt = (unsigned long) current_ctc; do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif profile_tick(CPU_PROFILING, regs); #ifdef CONFIG_HEARTBEAT diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index c982473d1be0..918d3f23bdc8 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c @@ -716,6 +716,9 @@ static irqreturn_t pcic_timer_handler (int irq, void *h, struct pt_regs *regs) write_seqlock(&xtime_lock); /* Dummy, to show that we remember */ pcic_clear_clock_irq(); do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif write_sequnlock(&xtime_lock); return IRQ_HANDLED; } diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c index 60507d394868..6af5019658ba 100644 --- a/arch/sparc/kernel/time.c +++ b/arch/sparc/kernel/time.c @@ -134,6 +134,10 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) clear_clock_irq(); do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif + /* Determine when to update the Mostek clock. */ if ((time_status & STA_UNSYNC) == 0 && diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index b50e16d49227..96d7cba29679 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c @@ -64,7 +64,16 @@ static unsigned long mstk48t59_regs = 0UL; static int set_rtc_mmss(unsigned long); -struct sparc64_tick_ops *tick_ops; +static __init unsigned long dummy_get_tick(void) +{ + return 0; +} + +static __initdata struct sparc64_tick_ops dummy_tick_ops = { + .get_tick = dummy_get_tick, +}; + +struct sparc64_tick_ops *tick_ops = &dummy_tick_ops; #define TICK_PRIV_BIT (1UL << 63) @@ -462,6 +471,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) do { #ifndef CONFIG_SMP profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(regs)); #endif do_timer(regs); diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c index 5ce5668825fc..aee0f7f1aecc 100644 --- a/arch/um/kernel/time_kern.c +++ b/arch/um/kernel/time_kern.c @@ -169,11 +169,9 @@ void __const_udelay(um_udelay_t usecs) void timer_handler(int sig, union uml_pt_regs *regs) { -#ifdef CONFIG_SMP local_irq_disable(); update_process_times(user_context(UPT_SP(regs))); local_irq_enable(); -#endif if(current_thread->cpu == 0) timer_irq(regs); } diff --git a/arch/v850/kernel/time.c b/arch/v850/kernel/time.c index d0266de065dc..f722a268238a 100644 --- a/arch/v850/kernel/time.c +++ b/arch/v850/kernel/time.c @@ -56,6 +56,9 @@ static irqreturn_t timer_interrupt (int irq, void *dummy, struct pt_regs *regs) mach_tick (); do_timer (regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif profile_tick(CPU_PROFILING, regs); #if 0 /* diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index b802b5f08aaa..b2ef6299812a 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c @@ -182,6 +182,7 @@ struct elf_prpsinfo #define user user32 #define __ASM_X86_64_ELF_H 1 +#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack)) //#include <asm/ia32.h> #include <linux/elf.h> @@ -360,11 +361,11 @@ int setup_arg_pages(struct linux_binprm *bprm, int executable_stack) mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p; mpnt->vm_end = IA32_STACK_TOP; if (executable_stack == EXSTACK_ENABLE_X) - mpnt->vm_flags = vm_stack_flags32 | VM_EXEC; + mpnt->vm_flags = VM_STACK_FLAGS | VM_EXEC; else if (executable_stack == EXSTACK_DISABLE_X) - mpnt->vm_flags = vm_stack_flags32 & ~VM_EXEC; + mpnt->vm_flags = VM_STACK_FLAGS & ~VM_EXEC; else - mpnt->vm_flags = vm_stack_flags32; + mpnt->vm_flags = VM_STACK_FLAGS; mpnt->vm_page_prot = (mpnt->vm_flags & VM_EXEC) ? PAGE_COPY_EXEC : PAGE_COPY; insert_vm_struct(mm, mpnt); @@ -390,9 +391,6 @@ elf32_map (struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int p unsigned long map_addr; struct task_struct *me = current; - if (prot & PROT_READ) - prot |= vm_force_exec32; - down_write(&me->mm->mmap_sem); map_addr = do_mmap(filep, ELF_PAGESTART(addr), eppnt->p_filesz + ELF_PAGEOFFSET(eppnt->p_vaddr), prot, diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c index a854fb32963a..892555082bf9 100644 --- a/arch/x86_64/ia32/sys_ia32.c +++ b/arch/x86_64/ia32/sys_ia32.c @@ -218,9 +218,6 @@ sys32_mmap(struct mmap_arg_struct __user *arg) return -EBADF; } - if (a.prot & PROT_READ) - a.prot |= vm_force_exec32; - mm = current->mm; down_write(&mm->mmap_sem); retval = do_mmap_pgoff(file, a.addr, a.len, a.prot, a.flags, a.offset>>PAGE_SHIFT); @@ -235,8 +232,6 @@ sys32_mmap(struct mmap_arg_struct __user *arg) asmlinkage long sys32_mprotect(unsigned long start, size_t len, unsigned long prot) { - if (prot & PROT_READ) - prot |= vm_force_exec32; return sys_mprotect(start,len,prot); } @@ -1044,9 +1039,6 @@ asmlinkage long sys32_mmap2(unsigned long addr, unsigned long len, return -EBADF; } - if (prot & PROT_READ) - prot |= vm_force_exec32; - down_write(&mm->mmap_sem); error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); up_write(&mm->mmap_sem); diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c index cf1fe8b7fa5b..c771dc8e3f60 100644 --- a/arch/x86_64/kernel/mce.c +++ b/arch/x86_64/kernel/mce.c @@ -191,6 +191,8 @@ void do_machine_check(struct pt_regs * regs, long error_code) panicm = m; panicm_found = 1; } + + tainted |= TAINT_MACHINE_CHECK; } /* Never do anything final in the polling timer */ diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index 646b3c0a9171..55e11e6b1f03 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c @@ -895,25 +895,25 @@ void __init mp_config_acpi_legacy_irqs (void) return; } -void mp_register_gsi (u32 gsi, int edge_level, int active_high_low) +int mp_register_gsi(u32 gsi, int edge_level, int active_high_low) { int ioapic = -1; int ioapic_pin = 0; int idx, bit = 0; if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC) - return; + return gsi; #ifdef CONFIG_ACPI_BUS /* Don't set up the ACPI SCI because it's already set up */ if (acpi_fadt.sci_int == gsi) - return; + return gsi; #endif ioapic = mp_find_ioapic(gsi); if (ioapic < 0) { printk(KERN_WARNING "No IOAPIC for GSI %u\n", gsi); - return; + return gsi; } ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_start; @@ -929,12 +929,12 @@ void mp_register_gsi (u32 gsi, int edge_level, int active_high_low) printk(KERN_ERR "Invalid reference to IOAPIC pin " "%d-%d\n", mp_ioapic_routing[ioapic].apic_id, ioapic_pin); - return; + return gsi; } if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) { Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n", mp_ioapic_routing[ioapic].apic_id, ioapic_pin); - return; + return gsi; } mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit); @@ -942,6 +942,7 @@ void mp_register_gsi (u32 gsi, int edge_level, int active_high_low) io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, edge_level == ACPI_EDGE_SENSITIVE ? 0 : 1, active_high_low == ACPI_ACTIVE_HIGH ? 0 : 1); + return gsi; } #endif /*CONFIG_X86_IO_APIC*/ diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c index b83680afe01a..b7f2bfa57c55 100644 --- a/arch/x86_64/kernel/setup64.c +++ b/arch/x86_64/kernel/setup64.c @@ -43,80 +43,27 @@ char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned"))); unsigned long __supported_pte_mask = ~0UL; static int do_not_nx __initdata = 0; -unsigned long vm_stack_flags = __VM_STACK_FLAGS; -unsigned long vm_stack_flags32 = __VM_STACK_FLAGS; -unsigned long vm_data_default_flags = __VM_DATA_DEFAULT_FLAGS; -unsigned long vm_data_default_flags32 = __VM_DATA_DEFAULT_FLAGS; -unsigned long vm_force_exec32 = PROT_EXEC; /* noexec=on|off Control non executable mappings for 64bit processes. -on Enable +on Enable(default) off Disable -noforce (default) Don't enable by default for heap/stack/data, - but allow PROT_EXEC to be effective - */ static int __init nonx_setup(char *str) { if (!strcmp(str, "on")) { __supported_pte_mask |= _PAGE_NX; do_not_nx = 0; - vm_data_default_flags &= ~VM_EXEC; - vm_stack_flags &= ~VM_EXEC; - } else if (!strcmp(str, "noforce") || !strcmp(str, "off")) { - do_not_nx = (str[0] == 'o'); - if (do_not_nx) - __supported_pte_mask &= ~_PAGE_NX; - vm_data_default_flags |= VM_EXEC; - vm_stack_flags |= VM_EXEC; + } else if (!strcmp(str, "off")) { + do_not_nx = 1; + __supported_pte_mask &= ~_PAGE_NX; } return 1; } __setup("noexec=", nonx_setup); -/* noexec32=opt{,opt} - -Control the no exec default for 32bit processes. Can be also overwritten -per executable using ELF header flags (e.g. needed for the X server) -Requires noexec=on or noexec=noforce to be effective. - -Valid options: - all,on Heap,stack,data is non executable. - off (default) Heap,stack,data is executable - stack Stack is non executable, heap/data is. - force Don't imply PROT_EXEC for PROT_READ - compat (default) Imply PROT_EXEC for PROT_READ - -*/ - static int __init nonx32_setup(char *s) - { - while (*s) { - if (!strncmp(s, "all", 3) || !strncmp(s,"on",2)) { - vm_data_default_flags32 &= ~VM_EXEC; - vm_stack_flags32 &= ~VM_EXEC; - } else if (!strncmp(s, "off",3)) { - vm_data_default_flags32 |= VM_EXEC; - vm_stack_flags32 |= VM_EXEC; - } else if (!strncmp(s, "stack", 5)) { - vm_data_default_flags32 |= VM_EXEC; - vm_stack_flags32 &= ~VM_EXEC; - } else if (!strncmp(s, "force",5)) { - vm_force_exec32 = 0; - } else if (!strncmp(s, "compat",5)) { - vm_force_exec32 = PROT_EXEC; - } - s += strcspn(s, ","); - if (*s == ',') - ++s; - } - return 1; -} - -__setup("noexec32=", nonx32_setup); - /* * Great future plan: * Declare PDA itself and support (irqstack,tss,pml4) as per cpu data. diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index ee941842d710..289b81dae486 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c @@ -427,6 +427,9 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) */ do_timer(regs); +#ifndef CONFIG_SMP + update_process_times(user_mode(regs)); +#endif /* * In the SMP case we use the local APIC timer interrupt to do the profiling, diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index 13ec453e2756..330b0cd6438c 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c @@ -40,6 +40,7 @@ #include <linux/kernel.h> #include <linux/timer.h> #include <linux/seqlock.h> +#include <linux/jiffies.h> #include <asm/vsyscall.h> #include <asm/pgtable.h> diff --git a/arch/x86_64/mm/k8topology.c b/arch/x86_64/mm/k8topology.c index 0825e37fd9d8..96cf21236cf2 100644 --- a/arch/x86_64/mm/k8topology.c +++ b/arch/x86_64/mm/k8topology.c @@ -12,6 +12,7 @@ #include <linux/init.h> #include <linux/string.h> #include <linux/module.h> +#include <linux/nodemask.h> #include <asm/io.h> #include <linux/pci_ids.h> #include <asm/types.h> diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c index df85a94d3ba6..f136fc23f9cf 100644 --- a/arch/x86_64/mm/numa.c +++ b/arch/x86_64/mm/numa.c @@ -10,6 +10,8 @@ #include <linux/mmzone.h> #include <linux/ctype.h> #include <linux/module.h> +#include <linux/nodemask.h> + #include <asm/e820.h> #include <asm/proto.h> #include <asm/dma.h> @@ -151,9 +153,9 @@ void __init numa_init_array(void) for (i = 0; i < MAXNODE; i++) { if (node_online(i)) continue; - rr = find_next_bit(node_online_map, MAX_NUMNODES, rr); + rr = next_node(rr, node_online_map); if (rr == MAX_NUMNODES) - rr = find_first_bit(node_online_map, MAX_NUMNODES); + rr = first_node(node_online_map); node_data[i] = node_data[rr]; cpu_to_node[i] = rr; rr++; |
