1. 12 1月, 2007 2 次提交
    • G
      [PATCH] Change cpu_up and co from __devinit to __cpuinit · b282b6f8
      Gautham R Shenoy 提交于
      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: NGautham 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: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b282b6f8
    • D
      [PATCH] Fix sparsemem on Cell · a2f3aa02
      Dave Hansen 提交于
      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: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NDave Hansen <haveblue@us.ibm.com>
      Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
      Acked-by: NAndy Whitcroft <apw@shadowen.org>
      Cc: Christoph Lameter <clameter@engr.sgi.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a2f3aa02
  2. 11 1月, 2007 12 次提交
    • A
      [PATCH] x86-64: Fix warnings in ia32_aout.c · 74019699
      Andi Kleen 提交于
      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: NAndi Kleen <ak@suse.de>
      74019699
    • V
      [PATCH] i386: Convert some functions to __init to avoid MODPOST warnings · 88d20328
      Vivek Goyal 提交于
      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: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      88d20328
    • V
      [PATCH] i386: Fix memory hotplug related MODPOST generated warning · 0e0be25d
      Vivek Goyal 提交于
      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: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      0e0be25d
    • M
      [PATCH] x86-64: tighten up printks · b92cc559
      Muli Ben-Yehuda 提交于
      Signed-off-by: NMuli Ben-Yehuda <muli@il.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      b92cc559
    • J
      [PATCH] x86-64: - Ignore long SMI interrupts in clock calibration · ed5316d4
      Jack Steiner 提交于
      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: NJack Steiner <steiner@sgi.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      
       arch/x86_64/kernel/time.c |   25 +++++++++++++++++++++----
       1 file changed, 21 insertions(+), 4 deletions(-)
      ed5316d4
    • V
      [PATCH] i386: make apic probe function non-init · e96763d6
      Vivek Goyal 提交于
      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: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      e96763d6
    • V
      [PATCH] i386: cpu hotplug/smpboot misc MODPOST warning fixes · 4a5d107a
      Vivek Goyal 提交于
      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: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      4a5d107a
    • A
      [PATCH] i386: Update defconfig · 7c8809ae
      Andi Kleen 提交于
      Signed-off-by: NAndi Kleen <ak@suse.de>
      7c8809ae
    • A
      [PATCH] x86-64: Update defconfig · 03c3cc61
      Andi Kleen 提交于
      Signed-off-by: NAndi Kleen <ak@suse.de>
      03c3cc61
    • A
      [MIPS] Alchemy: Fix PCI-memory access · 8a93c496
      Alexander Bigga 提交于
          
          The problem was introduced in 2.6.18.3 with the casting of some
          36bit-defines (PCI memory) in au1000.h to resource_size_t which may be
          u32 or u64 depending on the experimental CONFIG_RESOURCES_64BIT.
          
          With unset CONFIG_RESOURCES_64BIT, the pci-memory cannot be accessed
          because the ioremap in arch/mips/au1000/common/pci.c already used the
          truncated addresses.
          With set CONFIG_RESOURCES_64BIT, things get even worse, because PCI-scan
          aborts, due to resource conflict: request_resource() in arch/mips/pci/pci.c
          fails because the maximum iomem-address is 0xffffffff (32bit) but the
          pci-memory-start-address is 0x440000000 (36bit).
          
          To get pci working again, I propose the following patch:
          
          1. remove the resource_size_t-casting from au1000.h again
          2. make the casting in arch/mips/au1000/common/pci.c (it's allowed and
          necessary here. The 36bit-handling will be done in __fixup_bigphys_addr).
          
          With this patch pci works again like in 2.6.18.2, the gcc-compile warnings
          in pci.c are gone and it doesn't depend on CONFIG_EXPERIMENTAL.
      Signed-off-by: NAlexander Bigga <ab@mycable.de>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      
      ---
      8a93c496
    • A
      [MIPS] Fix N32 SysV IPC routines · e16d8df0
      Atsushi Nemoto 提交于
      Add wrappers for N32 msg{snd,rcv}.  compat_sys_msg{snd,rcv} can not not be
      used as system call entries as is.  This fix is based on Kaz Kylheku's
      patch.
      
      Also change a type of last argument of sysn32_semctl to match its true
      size.
      Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      e16d8df0
    • A
      6b4cd275
  3. 09 1月, 2007 26 次提交