1. 12 Jan, 2007 7 commits
    • Gautham R Shenoy's avatar
      [PATCH] Change cpu_up and co from __devinit to __cpuinit · b282b6f8
      Gautham R Shenoy authored
      Compiling the kernel with CONFIG_HOTPLUG = y and CONFIG_HOTPLUG_CPU = n
      with CONFIG_RELOCATABLE = y generates the following modpost warnings
      
      WARNING: vmlinux - Section mismatch: reference to .init.data: from
      .text between '_cpu_up' (at offset 0xc0141b7d) and 'cpu_up'
      WARNING: vmlinux - Section mismatch: reference to .init.data: from
      .text between '_cpu_up' (at offset 0xc0141b9c) and 'cpu_up'
      WARNING: vmlinux - Section mismatch: reference to .init.text:__cpu_up
      from .text between '_cpu_up' (at offset 0xc0141bd8) and 'cpu_up'
      WARNING: vmlinux - Section mismatch: reference to .init.data: from
      .text between '_cpu_up' (at offset 0xc0141c05) and 'cpu_up'
      WARNING: vmlinux - Section mismatch: reference to .init.data: from
      .text between '_cpu_up' (at offset 0xc0141c26) and 'cpu_up'
      WARNING: vmlinux - Section mismatch: reference to .init.data: from
      .text between '_cpu_up' (at offset 0xc0141c37) and 'cpu_up'
      
      This is because cpu_up, _cpu_up and __cpu_up (in some architectures) are
      defined as __devinit
      AND
      __cpu_up calls some __cpuinit functions.
      
      Since __cpuinit would map to __init with this kind of a configuration,
      we get a .text refering .init.data warning.
      
      This patch solves the problem by converting all of __cpu_up, _cpu_up
      and cpu_up from __devinit to __cpuinit. The approach is justified since
      the callers of cpu_up are either dependent on CONFIG_HOTPLUG_CPU or
      are of __init type.
      
      Thus when CONFIG_HOTPLUG_CPU=y, all these cpu up functions would land up
      in .text section, and when CONFIG_HOTPLUG_CPU=n, all these functions would
      land up in .init section.
      
      Tested on a i386 SMP machine running linux-2.6.20-rc3-mm1.
      Signed-off-by: default avatarGautham R Shenoy <ego@in.ibm.com>
      Cc: Vivek Goyal <vgoyal@in.ibm.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      b282b6f8
    • David Brownell's avatar
      [PATCH] rtc-sh: correctly report rtc_wkalrm.enabled · 0d103e90
      David Brownell authored
      This fixes the SH rtc driver to
        (a) correctly report 'enabled' status with other alarm status;
        (b) not duplicate that status in its procfs dump
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: default avatarPaul Mundt <lethal@linux-sh.org>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0d103e90
    • Roman Zippel's avatar
      [PATCH] qconf: (re)fix SIGSEGV on empty menu items · 6fa1da8e
      Roman Zippel authored
      Back out the recent fix for this bug, fix it by correctly initialising
      ConfigInfoView.sym.
      Signed-off-by: default avatarRoman Zippel <zippel@linux-m68k.org>
      Cc: "Cyrill V. Gorcunov" <gorcunov@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      6fa1da8e
    • Dave Hansen's avatar
      [PATCH] Fix sparsemem on Cell · a2f3aa02
      Dave Hansen authored
      Fix an oops experienced on the Cell architecture when init-time functions,
      early_*(), are called at runtime.  It alters the call paths to make sure
      that the callers explicitly say whether the call is being made on behalf of
      a hotplug even, or happening at boot-time.
      
      It has been compile tested on ppc64, ia64, s390, i386 and x86_64.
      Acked-by: default avatarArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: default avatarDave Hansen <haveblue@us.ibm.com>
      Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
      Acked-by: default avatarAndy Whitcroft <apw@shadowen.org>
      Cc: Christoph Lameter <clameter@engr.sgi.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Acked-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      a2f3aa02
    • Brice Goglin's avatar
      [PATCH] increment pos before looking for the next cap in __pci_find_next_ht_cap · 47a4d5be
      Brice Goglin authored
      While testing 2.6.20-rc3 on a machine with some CK804 chipsets, we noticed
      that quirk_nvidia_ck804_msi_ht_cap() was not detecting HT MSI capabilities
      anymore.  It is actually caused by the MSI mapping on the root chipset
      being the 2nd HT capability in the chain.  pci_find_ht_capability() does
      not seem to find anything but the first HT cap correctly, because it
      forgets to increment the position before looking for the next cap.  The
      following patch seems to fix it.
      
      At least, this proves that having a ttl is good idea since the machine
      would have been stucked in an infinite loop if we didn't have a ttl :)
      
      We have to pass pos + PCI_CAP_LIST_NEXT to __pci_find_next_cap_ttl to
      get the next HT cap instead of the same one again.
      Signed-off-by: default avatarBrice Goglin <brice@myri.com>
      Signed-off-by: default avatarAndrew J. Gallatin <gallatin@myri.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      47a4d5be
    • Nathan Lynch's avatar
      [PATCH] sched: tasks cannot run on cpus onlined after boot · e5e5673f
      Nathan Lynch authored
      Commit 5c1e1767 ("sched: force /sbin/init
      off isolated cpus") sets init's cpus_allowed to a subset of cpu_online_map
      at boot time, which means that tasks won't be scheduled on cpus that are
      added to the system later.
      
      Make init's cpus_allowed a subset of cpu_possible_map instead.  This should
      still preserve the behavior that Nick's change intended.
      
      Thanks to Giuliano Pochini for reporting this and testing the fix:
      
      http://ozlabs.org/pipermail/linuxppc-dev/2006-December/029397.htmlSigned-off-by: default avatarNathan Lynch <ntl@pobox.com>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      e5e5673f
    • Linus Torvalds's avatar
      Don't put "linux_banner" in the .init section · c71551ad
      Linus Torvalds authored
      It might save a few bytes after bootup, but it causes the string to be
      linked in at the end of the final vmlinux image, which defeats the whole
      point of doing all this, namely allowing some broken user-space binaries
      to search for the kernel version string in the kernel binary.
      
      So just remove the __init specifier.
      
      Cc: Olaf Hering <olaf@aepfle.de>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andrey Borzenkov <arvidjaar@mail.ru>
      Cc: Andrew Morton <akpm@osdl.org>
      Acked-by: default avatarAndy Whitcroft <apw@shadowen.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c71551ad
  2. 11 Jan, 2007 15 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6 · 0404f87f
      Linus Torvalds authored
      * 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6:
        [PATCH] x86-64: Fix warnings in ia32_aout.c
        [PATCH] i386: Convert some functions to __init to avoid MODPOST warnings
        [PATCH] i386: Fix memory hotplug related MODPOST generated warning
        [PATCH] x86-64: tighten up printks
        [PATCH] x86-64: - Ignore long SMI interrupts in clock calibration
        [PATCH] x86-64: pci quirks MODPOST warning fix
        [PATCH] x86-64: Modpost whitelist reference to more symbols (pattern 3)
        [PATCH] x86-64: modpost add more symbols to whitelist pattern2
        [PATCH] i386: make apic probe function non-init
        [PATCH] i386: cpu hotplug/smpboot misc MODPOST warning fixes
        [PATCH] x86-64: Use different constraint for gcc < 4.1 in bitops.h
        [PATCH] x86-64: Make noirqdebug_setup function non init to fix modpost warning
        [PATCH] i386: Update defconfig
        [PATCH] x86-64: Update defconfig
      0404f87f
    • Andi Kleen's avatar
      [PATCH] x86-64: Fix warnings in ia32_aout.c · 74019699
      Andi Kleen authored
      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: default avatarAndi Kleen <ak@suse.de>
      74019699
    • Vivek Goyal's avatar
      [PATCH] i386: Convert some functions to __init to avoid MODPOST warnings · 88d20328
      Vivek Goyal authored
      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: default avatarVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      88d20328
    • Vivek Goyal's avatar
      [PATCH] i386: Fix memory hotplug related MODPOST generated warning · 0e0be25d
      Vivek Goyal authored
      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: default avatarVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      0e0be25d
    • Muli Ben-Yehuda's avatar
      [PATCH] x86-64: tighten up printks · b92cc559
      Muli Ben-Yehuda authored
      Signed-off-by: default avatarMuli Ben-Yehuda <muli@il.ibm.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      b92cc559
    • Jack Steiner's avatar
      [PATCH] x86-64: - Ignore long SMI interrupts in clock calibration · ed5316d4
      Jack Steiner authored
      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: default avatarJack Steiner <steiner@sgi.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      
       arch/x86_64/kernel/time.c |   25 +++++++++++++++++++++----
       1 file changed, 21 insertions(+), 4 deletions(-)
      ed5316d4
    • Vivek Goyal's avatar
      [PATCH] x86-64: pci quirks MODPOST warning fix · 9d24a81e
      Vivek Goyal authored
      o MODPOST generates warnings for i386 if kernel is compiled with
        CONFIG_RELOCATABLE=y
      
      WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between 'asus_hides_smbus_lpc_ich6' (at offset 0xc0217d58) and 'quirk_cardbus_legacy'
      WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between 'asus_hides_smbus_lpc' (at offset 0xc0217fd9) and 'pci_match_id'
      
      o Two quirk functions which are non __init, are accessing data which is
        of type __init.
      Signed-off-by: default avatarVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      9d24a81e
    • Vivek Goyal's avatar
      [PATCH] x86-64: Modpost whitelist reference to more symbols (pattern 3) · ee6a8545
      Vivek Goyal authored
      o MODPOST generates warning on i386 if kernel is compiled with
        CONFIG_RELOCATABLE=y.
      
      WARNING: vmlinux - Section mismatch: reference to .init.text:__init_begin from .text between 'free_initmem' (at offset 0xc0114fd3) and 'do_test_wp_bit'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'core_kernel_text' (at offset 0xc012aeae) and 'kernel_text_address'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'core_kernel_text' (at offset 0xc012aeb7) and 'kernel_text_address'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'get_symbol_pos' (at offset 0xc0135776) and 'reset_iter'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'get_symbol_pos' (at offset 0xc013577d) and 'reset_iter'
      
      o These symbols (__init_begin, _sinittext, _einittext) belong to init
        section and generally represent a section boundary. These are special
        symbols in the sense that their size is zero and no memory is allocated
        for them in init section. Their addr and value are same. So even if
        we free the init section, it is ok to reference them.
      
      o Whitelist access to such select symbols in MODPOST.
      Signed-off-by: default avatarVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      ee6a8545
    • Vivek Goyal's avatar
      [PATCH] x86-64: modpost add more symbols to whitelist pattern2 · 118c0ace
      Vivek Goyal authored
      o MODPOST generates warning for i386 if compiled with CONFIG_RELOCATABLE=y
        and serial console support is enabled.
      
      o Serial console setup function, serial8250_console_setup(), is a non __init
        function and it calls functions which are of type __init().
        (uart_parse_options() and uart_set_options()). Assuming, setup will
        be called during init time, changing serial8250_console_setup() to __init.
      
      o Adding one more pattern to modpost whitelist. Console drivers might
        have *_console structures containing references to setup functions which
        can be of __init type. Don't generate warnings for those.
      
      WARNING: vmlinux - Section mismatch: reference to .init.text: from .data between 'serial8250_console' (at offset 0xc05a33d8) and 'serial8250_reg'
      Signed-off-by: default avatarVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      118c0ace
    • Vivek Goyal's avatar
      [PATCH] i386: make apic probe function non-init · e96763d6
      Vivek Goyal authored
      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: default avatarVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      e96763d6
    • Vivek Goyal's avatar
      [PATCH] i386: cpu hotplug/smpboot misc MODPOST warning fixes · 4a5d107a
      Vivek Goyal authored
      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: default avatarVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      4a5d107a
    • Andi Kleen's avatar
      [PATCH] x86-64: Use different constraint for gcc < 4.1 in bitops.h · 24420760
      Andi Kleen authored
      +m is really correct for a RMW instruction, but some older gccs
      error out. I finally gave in and ifdefed it.
      
      This fixes compilation errors with some compiler version.
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      24420760
    • Vivek Goyal's avatar
      [PATCH] x86-64: Make noirqdebug_setup function non init to fix modpost warning · 343cde51
      Vivek Goyal authored
      o noirqdebug_setup() is __init but it is being called by
        quirk_intel_irqbalance() which if of type __devinit. If CONFIG_HOTPLUG=y,
        quirk_intel_irqbalance() is put into text section and it is wrong to
        call a function in __init section.
      
      o MODPOST flags this on i386 if CONFIG_RELOCATABLE=y
      
      WARNING: vmlinux - Section mismatch: reference to .init.text:noirqdebug_setup from .text between 'quirk_intel_irqbalance' (at offset 0xc010969e) and 'i8237A_suspend'
      
      o Make noirqdebug_setup() non-init.
      Signed-off-by: default avatarVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      343cde51
    • Andi Kleen's avatar
      [PATCH] i386: Update defconfig · 7c8809ae
      Andi Kleen authored
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      7c8809ae
    • Andi Kleen's avatar
      [PATCH] x86-64: Update defconfig · 03c3cc61
      Andi Kleen authored
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      03c3cc61
  3. 10 Jan, 2007 11 commits
  4. 09 Jan, 2007 7 commits