From 03c3cc612802be8c303944c816fd159ffff991b9 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Thu, 11 Jan 2007 01:52:44 +0100 Subject: [PATCH] x86-64: Update defconfig Signed-off-by: Andi Kleen --- arch/x86_64/defconfig | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index 9cc7c21547a2..69584c295305 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.19-git14 -# Sat Dec 9 21:23:09 2006 +# Linux kernel version: 2.6.20-rc3 +# Fri Jan 5 11:54:41 2007 # CONFIG_X86_64=y CONFIG_64BIT=y @@ -1056,6 +1056,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_LM92 is not set # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set # CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_SMSC47M192 is not set @@ -1066,6 +1067,7 @@ CONFIG_SENSORS_SMSC47B397=m # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83791D is not set # CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set # CONFIG_SENSORS_W83L785TS is not set # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set @@ -1310,6 +1312,11 @@ CONFIG_USB_MON=y # DMA Devices # +# +# Virtualization +# +# CONFIG_KVM is not set + # # Firmware Drivers # @@ -1502,6 +1509,8 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_MAGIC_SYSRQ=y CONFIG_UNUSED_SYMBOLS=y +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=18 CONFIG_DETECT_SOFTLOCKUP=y @@ -1519,12 +1528,10 @@ CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set -CONFIG_DEBUG_FS=y # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set # CONFIG_FRAME_POINTER is not set # CONFIG_FORCED_INLINING is not set -# CONFIG_HEADERS_CHECK is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_LKDTM is not set # CONFIG_DEBUG_RODATA is not set @@ -1553,3 +1560,4 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_PLIST=y +CONFIG_IOMAP_COPY=y -- cgit v1.2.3-59-g8ed1b From 7c8809aef0c71cc92ffc7d922e8824c04a36f44b Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Thu, 11 Jan 2007 01:52:44 +0100 Subject: [PATCH] i386: Update defconfig Signed-off-by: Andi Kleen --- arch/i386/defconfig | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/i386/defconfig b/arch/i386/defconfig index 88b7c1cf65a2..5d80edfc61b7 100644 --- a/arch/i386/defconfig +++ b/arch/i386/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.19-git14 -# Sat Dec 9 21:23:14 2006 +# Linux kernel version: 2.6.20-rc3 +# Fri Jan 5 11:54:46 2007 # CONFIG_X86_32=y CONFIG_GENERIC_TIME=y @@ -1286,6 +1286,11 @@ CONFIG_USB_MON=y # DMA Devices # +# +# Virtualization +# +# CONFIG_KVM is not set + # # File systems # @@ -1471,6 +1476,8 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_MAGIC_SYSRQ=y CONFIG_UNUSED_SYMBOLS=y +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=18 CONFIG_DETECT_SOFTLOCKUP=y @@ -1489,12 +1496,10 @@ CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_DEBUG_HIGHMEM is not set CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_FS is not set # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set # CONFIG_FRAME_POINTER is not set # CONFIG_FORCED_INLINING is not set -# CONFIG_HEADERS_CHECK is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_LKDTM is not set CONFIG_EARLY_PRINTK=y @@ -1527,6 +1532,7 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_PLIST=y +CONFIG_IOMAP_COPY=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y -- cgit v1.2.3-59-g8ed1b From 4a5d107a9a79ef3404209a43866554cba451dda4 Mon Sep 17 00:00:00 2001 From: Vivek Goyal Date: Thu, 11 Jan 2007 01:52:44 +0100 Subject: [PATCH] i386: cpu hotplug/smpboot misc MODPOST warning fixes o Misc smpboot/cpu hotplug path cleanups. I did those to supress the warnings generated by MODPOST. These warnings are visible only if CONFIG_RELOCATABLE=y. o CONFIG_RELOCATABLE compiles the kernel with --emit-relocs option. This option retains relocation information in vmlinux file and MODPOST is quick to spit out "Section mismatch" warnings. o This patch fixes some of those warnings. Many of the functions in smpboot case are __devinit type and they in turn accesses text/data which if of type __cpuinit. Now if CONFIG_HOTPLUG=y and CONFIG_HOTPLUG_CPU=n then we end up in cases where a function in .text segment is calling another function in .init.text segment and MODPOST emits warning. WARNING: vmlinux - Section mismatch: reference to .init.text:identify_cpu from .text between 'smp_store_cpu_info' (at offset 0xc011020d) and 'do_boot_cpu' WARNING: vmlinux - Section mismatch: reference to .init.text:init_gdt from .text between 'do_boot_cpu' (at offset 0xc01102ca) and '__cpu_up' WARNING: vmlinux - Section mismatch: reference to .init.text:print_cpu_info from .text between 'do_boot_cpu' (at offset 0xc01105d0) and '__cpu_up' o It also fixes the issues where CONFIG_HOTPLUG_CPU=y and start_secondary() is calling smp_callin() which in-turn calls synchronize_tsc_ap() which is of type __init. This should have meant broken CPU hotplug. WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between 'start_secondary' (at offset 0xc011603f) and 'initialize_secondary' WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between 'MP_processor_info' (at offset 0xc0116a4f) and 'mp_register_lapic' WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between 'MP_processor_info' (at offset 0xc0116a4f) and 'mp_register_lapic' Signed-off-by: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Andi Kleen --- arch/i386/kernel/mpparse.c | 8 ++++---- arch/i386/kernel/setup.c | 2 +- arch/i386/kernel/smpboot.c | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'arch') diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 2ce67228dff8..49bff3596bff 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c @@ -36,7 +36,7 @@ /* Have we found an MP table */ int smp_found_config; -unsigned int __initdata maxcpus = NR_CPUS; +unsigned int __cpuinitdata maxcpus = NR_CPUS; /* * Various Linux-internal data structures created from the @@ -102,9 +102,9 @@ static int __init mpf_checksum(unsigned char *mp, int len) */ static int mpc_record; -static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] __initdata; +static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] __cpuinitdata; -static void __devinit MP_processor_info (struct mpc_config_processor *m) +static void __cpuinit MP_processor_info (struct mpc_config_processor *m) { int ver, apicid; physid_mask_t phys_cpu; @@ -822,7 +822,7 @@ void __init mp_register_lapic_address(u64 address) Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); } -void __devinit mp_register_lapic (u8 id, u8 enabled) +void __cpuinit mp_register_lapic (u8 id, u8 enabled) { struct mpc_config_processor processor; int boot_cpu = 0; diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 6f6cb7b31d18..1df506d8d0cf 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -77,7 +77,7 @@ extern struct resource code_resource; extern struct resource data_resource; /* cpu data as detected by the assembly code in head.S */ -struct cpuinfo_x86 new_cpu_data __initdata = { 0, 0, 0, 0, -1, 1, 0, 0, -1 }; +struct cpuinfo_x86 new_cpu_data __cpuinitdata = { 0, 0, 0, 0, -1, 1, 0, 0, -1 }; /* common cpu data for all cpus */ struct cpuinfo_x86 boot_cpu_data __read_mostly = { 0, 0, 0, 0, -1, 1, 0, 0, -1 }; EXPORT_SYMBOL(boot_cpu_data); diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 300d9b38d02e..dea7ef9d3e82 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c @@ -159,7 +159,7 @@ void __init smp_alloc_memory(void) * a given CPU */ -static void __devinit smp_store_cpu_info(int id) +static void __cpuinit smp_store_cpu_info(int id) { struct cpuinfo_x86 *c = cpu_data + id; @@ -364,7 +364,7 @@ extern void calibrate_delay(void); static atomic_t init_deasserted; -static void __devinit smp_callin(void) +static void __cpuinit smp_callin(void) { int cpuid, phys_id; unsigned long timeout; @@ -538,7 +538,7 @@ set_cpu_sibling_map(int cpu) /* * Activate a secondary processor. */ -static void __devinit start_secondary(void *unused) +static void __cpuinit start_secondary(void *unused) { /* * Don't put *anything* before secondary_cpu_init(), SMP @@ -931,7 +931,7 @@ static inline struct task_struct * alloc_idle_task(int cpu) #define alloc_idle_task(cpu) fork_idle(cpu) #endif -static int __devinit do_boot_cpu(int apicid, int cpu) +static int __cpuinit do_boot_cpu(int apicid, int cpu) /* * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad * (ie clustered apic addressing mode), this is a LOGICAL apic ID. @@ -1432,7 +1432,7 @@ void __cpu_die(unsigned int cpu) } #endif /* CONFIG_HOTPLUG_CPU */ -int __devinit __cpu_up(unsigned int cpu) +int __cpuinit __cpu_up(unsigned int cpu) { #ifdef CONFIG_HOTPLUG_CPU int ret=0; -- cgit v1.2.3-59-g8ed1b From e96763d6e52c22a8821466e4d01c0c995b8087be Mon Sep 17 00:00:00 2001 From: Vivek Goyal Date: Thu, 11 Jan 2007 01:52:44 +0100 Subject: [PATCH] i386: make apic probe function non-init o struct genapic contains pointer to probe() function which is of type __init. Hence MODPOST generates warning if kernel is compiled with CONFIG_RELOCATABLE=y for i386. WARNING: vmlinux - Section mismatch: reference to .init.text: from .data between 'apic_summit' (at offset 0xc058b504) and 'apic_bigsmp' WARNING: vmlinux - Section mismatch: reference to .init.text: from .data between 'apic_bigsmp' (at offset 0xc058b5a4) and 'cpu.4471' WARNING: vmlinux - Section mismatch: reference to .init.text: from .data between 'apic_es7000' (at offset 0xc058b644) and 'apic_default' WARNING: vmlinux - Section mismatch: reference to .init.text: from .data between 'apic_default' (at offset 0xc058b6e4) and 'interrupt' o One of the possible options is to put special case check in MODPOST to not emit warnings for this case but I think it is not a very good option in terms of maintenance. o Another option is to make probe() function non __init. Anyway this function is really small so not freeing this memory after init is not a big deal. Secondly, from a programming perspective, probably genapic should not provide pointers to functions which have been freed as genapic is non __init and is used even after initialization is complete. Signed-off-by: Vivek Goyal Signed-off-by: Andi Kleen Cc: "Eric W. Biederman" Cc: Andi Kleen Signed-off-by: Andrew Morton --- arch/i386/mach-generic/bigsmp.c | 2 +- arch/i386/mach-generic/default.c | 2 +- arch/i386/mach-generic/es7000.c | 2 +- arch/i386/mach-generic/summit.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/i386/mach-generic/bigsmp.c b/arch/i386/mach-generic/bigsmp.c index 33d9f93557ba..8a210fa915b5 100644 --- a/arch/i386/mach-generic/bigsmp.c +++ b/arch/i386/mach-generic/bigsmp.c @@ -45,7 +45,7 @@ static struct dmi_system_id __initdata bigsmp_dmi_table[] = { }; -static __init int probe_bigsmp(void) +static int probe_bigsmp(void) { if (def_to_bigsmp) dmi_bigsmp = 1; diff --git a/arch/i386/mach-generic/default.c b/arch/i386/mach-generic/default.c index 96c19821e47d..8685208d8512 100644 --- a/arch/i386/mach-generic/default.c +++ b/arch/i386/mach-generic/default.c @@ -18,7 +18,7 @@ #include /* should be called last. */ -static __init int probe_default(void) +static int probe_default(void) { return 1; } diff --git a/arch/i386/mach-generic/es7000.c b/arch/i386/mach-generic/es7000.c index aa144d82334d..b8963a5a3b25 100644 --- a/arch/i386/mach-generic/es7000.c +++ b/arch/i386/mach-generic/es7000.c @@ -19,7 +19,7 @@ #include #include -static __init int probe_es7000(void) +static int probe_es7000(void) { /* probed later in mptable/ACPI hooks */ return 0; diff --git a/arch/i386/mach-generic/summit.c b/arch/i386/mach-generic/summit.c index f7e5d66648dc..74883ccb8f73 100644 --- a/arch/i386/mach-generic/summit.c +++ b/arch/i386/mach-generic/summit.c @@ -18,7 +18,7 @@ #include #include -static __init int probe_summit(void) +static int probe_summit(void) { /* probed later in mptable/ACPI hooks */ return 0; -- cgit v1.2.3-59-g8ed1b From ed5316d4457b35c7b4942af028d6b878174264f7 Mon Sep 17 00:00:00 2001 From: Jack Steiner Date: Thu, 11 Jan 2007 01:52:44 +0100 Subject: [PATCH] x86-64: - Ignore long SMI interrupts in clock calibration Ensure that no SMI interrupts occur between the read of the HPET & TSC in the clock calibration loop. I noticed that a 2.66GHz system incorrectly detected the processor clock speed about 1/7 of the time: time.c: Detected 2660.005 MHz processor. (most of the time) time.c: Detected 2988.203 MHz processor. (sometime) The problem is caused by an SMI interrupt occuring in hpet_calibrate_tsc() between the read of the HPET & TSC. Prior to switching the BIOS into ACPI mode, it appears that every 27msec an SMI interrupt occurs. The SMI interrupt takes 4.8 msec to process. Note: On my test system, TICK_MIN had to be >380. I picked 5000 to minimize risk of having a value that is too small for other platforms. Signed-off-by: Jack Steiner Signed-off-by: Andi Kleen arch/x86_64/kernel/time.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) --- arch/x86_64/kernel/time.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 9f05bc9b2dad..5cc76d0d331f 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c @@ -656,6 +656,25 @@ core_initcall(cpufreq_tsc); */ #define TICK_COUNT 100000000 +#define TICK_MIN 5000 + +/* + * Some platforms take periodic SMI interrupts with 5ms duration. Make sure none + * occurs between the reads of the hpet & TSC. + */ +static void __init read_hpet_tsc(int *hpet, int *tsc) +{ + int tsc1, tsc2, hpet1; + + do { + tsc1 = get_cycles_sync(); + hpet1 = hpet_readl(HPET_COUNTER); + tsc2 = get_cycles_sync(); + } while (tsc2 - tsc1 > TICK_MIN); + *hpet = hpet1; + *tsc = tsc2; +} + static unsigned int __init hpet_calibrate_tsc(void) { @@ -666,13 +685,11 @@ static unsigned int __init hpet_calibrate_tsc(void) local_irq_save(flags); local_irq_disable(); - hpet_start = hpet_readl(HPET_COUNTER); - rdtscl(tsc_start); + read_hpet_tsc(&hpet_start, &tsc_start); do { local_irq_disable(); - hpet_now = hpet_readl(HPET_COUNTER); - tsc_now = get_cycles_sync(); + read_hpet_tsc(&hpet_now, &tsc_now); local_irq_restore(flags); } while ((tsc_now - tsc_start) < TICK_COUNT && (hpet_now - hpet_start) < TICK_COUNT); -- cgit v1.2.3-59-g8ed1b From b92cc55923898ab5e8a78939be9734ab9e1c8f49 Mon Sep 17 00:00:00 2001 From: Muli Ben-Yehuda Date: Thu, 11 Jan 2007 01:52:44 +0100 Subject: [PATCH] x86-64: tighten up printks Signed-off-by: Muli Ben-Yehuda Signed-off-by: Andi Kleen Cc: Andi Kleen Signed-off-by: Andrew Morton --- arch/x86_64/kernel/pci-calgary.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/x86_64/kernel/pci-calgary.c b/arch/x86_64/kernel/pci-calgary.c index 87d90cb68a74..3d65b1d4c2b3 100644 --- a/arch/x86_64/kernel/pci-calgary.c +++ b/arch/x86_64/kernel/pci-calgary.c @@ -1068,6 +1068,8 @@ void __init detect_calgary(void) if (!early_pci_allowed()) return; + printk(KERN_DEBUG "Calgary: detecting Calgary via BIOS EBDA area\n"); + ptr = (unsigned long)phys_to_virt(get_bios_ebda()); rio_table_hdr = NULL; @@ -1088,14 +1090,14 @@ void __init detect_calgary(void) offset = *((unsigned short *)(ptr + offset)); } if (!rio_table_hdr) { - printk(KERN_ERR "Calgary: Unable to locate " - "Rio Grande Table in EBDA - bailing!\n"); + printk(KERN_DEBUG "Calgary: Unable to locate Rio Grande table " + "in EBDA - bailing!\n"); return; } ret = build_detail_arrays(); if (ret) { - printk(KERN_ERR "Calgary: build_detail_arrays ret %d\n", ret); + printk(KERN_DEBUG "Calgary: build_detail_arrays ret %d\n", ret); return; } @@ -1128,6 +1130,9 @@ void __init detect_calgary(void) } } + printk(KERN_DEBUG "Calgary: finished detection, Calgary %s\n", + calgary_found ? "found" : "not found"); + if (calgary_found) { iommu_detected = 1; calgary_detected = 1; -- cgit v1.2.3-59-g8ed1b From 0e0be25d31f75f64b6fbe00f0b4e5d6b1ad1438e Mon Sep 17 00:00:00 2001 From: Vivek Goyal Date: Thu, 11 Jan 2007 01:52:44 +0100 Subject: [PATCH] i386: Fix memory hotplug related MODPOST generated warning o Fix modpost generated warning. WARNING: vmlinux - Section mismatch: reference to .init.text: from .text between 'add_one_highpage_hotplug' (at offset 0xc0113d3f) and 'online_page' Signed-off-by: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Andi Kleen --- arch/i386/mm/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 60a7e57af197..c5c5ea700cc7 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c @@ -283,7 +283,7 @@ void __init add_one_highpage_init(struct page *page, int pfn, int bad_ppro) SetPageReserved(page); } -static int add_one_highpage_hotplug(struct page *page, unsigned long pfn) +static int __meminit add_one_highpage_hotplug(struct page *page, unsigned long pfn) { free_new_highpage(page); totalram_pages++; @@ -300,7 +300,7 @@ static int add_one_highpage_hotplug(struct page *page, unsigned long pfn) * has been added dynamically that would be * onlined here is in HIGHMEM */ -void online_page(struct page *page) +void __meminit online_page(struct page *page) { ClearPageReserved(page); add_one_highpage_hotplug(page, page_to_pfn(page)); -- cgit v1.2.3-59-g8ed1b From 88d20328cd66ee05f9b7f4d414640700db69d82b Mon Sep 17 00:00:00 2001 From: Vivek Goyal Date: Thu, 11 Jan 2007 01:52:44 +0100 Subject: [PATCH] i386: Convert some functions to __init to avoid MODPOST warnings o Some functions which should have been in init sections as they are called only once. Put them in init sections. Otherwise MODPOST generates warning as these functions are placed in .text and they end up accessing something in init sections. WARNING: vmlinux - Section mismatch: reference to .init.text:migration_init from .text between 'do_pre_smp_initcalls' (at offset 0xc01000d1) and 'run_init_process' Signed-off-by: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Andi Kleen --- arch/i386/kernel/setup.c | 2 +- init/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 1df506d8d0cf..4b31ad70c1ac 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -495,7 +495,7 @@ static void set_mca_bus(int x) { } #endif /* Overridden in paravirt.c if CONFIG_PARAVIRT */ -char * __attribute__((weak)) memory_setup(void) +char * __init __attribute__((weak)) memory_setup(void) { return machine_specific_memory_setup(); } diff --git a/init/main.c b/init/main.c index d908d3e03344..8b4a7d769162 100644 --- a/init/main.c +++ b/init/main.c @@ -695,7 +695,7 @@ static void __init do_basic_setup(void) do_initcalls(); } -static void do_pre_smp_initcalls(void) +static void __init do_pre_smp_initcalls(void) { extern int spawn_ksoftirqd(void); #ifdef CONFIG_SMP -- cgit v1.2.3-59-g8ed1b From 7401969907594ac9632368ec53528fbd9b18f339 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Thu, 11 Jan 2007 01:52:45 +0100 Subject: [PATCH] x86-64: Fix warnings in ia32_aout.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix linux/arch/x86_64/ia32/ia32_aout.c: In function ‘create_aout_tables’: linux/arch/x86_64/ia32/ia32_aout.c:244: warning: cast from pointer to integer of different size linux/arch/x86_64/ia32/ia32_aout.c:253: warning: cast from pointer to integer of different size with gcc 4.3 Signed-off-by: Andi Kleen --- arch/x86_64/ia32/ia32_aout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/x86_64/ia32/ia32_aout.c b/arch/x86_64/ia32/ia32_aout.c index be87df506f39..fe83edb93c10 100644 --- a/arch/x86_64/ia32/ia32_aout.c +++ b/arch/x86_64/ia32/ia32_aout.c @@ -241,7 +241,7 @@ static u32 __user *create_aout_tables(char __user *p, struct linux_binprm *bprm) get_user(c,p++); } while (c); } - put_user(NULL,argv); + put_user(0, argv); current->mm->arg_end = current->mm->env_start = (unsigned long) p; while (envc-->0) { char c; @@ -250,7 +250,7 @@ static u32 __user *create_aout_tables(char __user *p, struct linux_binprm *bprm) get_user(c,p++); } while (c); } - put_user(NULL,envp); + put_user(0, envp); current->mm->env_end = (unsigned long) p; return sp; } -- cgit v1.2.3-59-g8ed1b