1. 29 4月, 2009 11 次提交
    • S
      x86, vmlinux.lds: unify .exit.* and .init.ramfs · bf6a5741
      Sam Ravnborg 提交于
      [ Impact: cleanup ]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tim Abbott <tabbott@MIT.EDU>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1240991249-27117-11-git-send-email-sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      bf6a5741
    • S
      x86, vmlinux.lds: unify parainstructions · ae618362
      Sam Ravnborg 提交于
      32 bit:
      
       - increase alignment from 4 to 8 for .parainstructions
       - increase alignment from 4 to 8 for .altinstructions
      
      64 bit:
      
       - move ALIGN() outside output section for .altinstructions
      
      None of the above should result in any functional change.
      
      [ Impact: refactor and unify linker script ]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tim Abbott <tabbott@MIT.EDU>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1240991249-27117-10-git-send-email-sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ae618362
    • S
      x86, vmlinux.lds: unify first part of initdata · e58bdaa8
      Sam Ravnborg 提交于
      32-bit:
      
       - Move definition of __init_begin outside output_section
         because it covers more than one section
       - Move ALIGN() for end-of-section inside .smp_locks output section.
         Same effect but the intent is better documented that
         we need both start and end aligned.
      
      64-bit:
      
       - Move ALIGN() outside output section in .init.setup
       - Deleted unused __smp_alt_* symbols
      
      None of the above should result in any functional change.
      
      [ Impact: refactor and unify linker script ]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tim Abbott <tabbott@MIT.EDU>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1240991249-27117-9-git-send-email-sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e58bdaa8
    • S
      x86, vmlinux.lds: move vsyscall output sections · ff6f87e1
      Sam Ravnborg 提交于
      [ Impact: cleanup ]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tim Abbott <tabbott@MIT.EDU>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1240991249-27117-8-git-send-email-sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ff6f87e1
    • S
      x86, vmlinux.lds: unify data output sections · 1f6397ba
      Sam Ravnborg 提交于
      For 64 bit the following functional changes are introduced:
      
       - .data.page_aligned has moved
       - .data.cacheline_aligned has moved
       - .data.read_mostly has moved
       - ALIGN() moved out of output section for .data.cacheline_aligned
       - ALIGN() moved out of output section for .data.page_aligned
      
      Notice that 32 bit and 64 bit has different location of _edata.
      .data_nosave is 32 bit only as 64 bit is special due to PERCPU.
      
      [ Impact: 32-bit: cleanup, 64-bit: use 32-bit linker script ]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tim Abbott <tabbott@MIT.EDU>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1240991249-27117-7-git-send-email-sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1f6397ba
    • S
      x86, vmlinux.lds: unify exception table · 448bc3ab
      Sam Ravnborg 提交于
      [ Impact: cleanup ]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tim Abbott <tabbott@MIT.EDU>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1240991249-27117-6-git-send-email-sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      448bc3ab
    • S
      x86, vmlinux.lds: unify .text output sections · dfc20895
      Sam Ravnborg 提交于
      32 bit x86 had a dedicated .text.head output section,
      whereas 64 bit had it all in a single output section.
      
      In the unified version the dedicated .text.head output section
      was kept to have full control over the head code.
      
      32 bit:
      
      - Moved definition of _stext to the linker script.
        The definition is located _after_ .text.page_aligned as this
        is what 32 bit did before.
      
      The ALIGN(8) was introduced so we hit the exact same address
      (on the tested config) before and after the move.
      
      I assume that it is a bug that _stext did not cover the
      .text.page_aligned section - if this is true it can be fixed
      in a follow-up patch (and the ugly ALIGN() can be dropped).
      
      [ Impact: 64-bit: cleanup, 32-bit: use the 64-bit linker script ]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tim Abbott <tabbott@MIT.EDU>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1240991249-27117-5-git-send-email-sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      dfc20895
    • S
      x86, vmlinux.lds: unify start/end of SECTIONS · 444e0ae4
      Sam Ravnborg 提交于
      [ Impact: cleanup ]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tim Abbott <tabbott@MIT.EDU>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1240991249-27117-4-git-send-email-sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      444e0ae4
    • S
      x86, vmlinux.lds: unify PHDRS · afb8095a
      Sam Ravnborg 提交于
      PHDRS are not equal for the two - so
      use ifdefs to cover up for that.
      
      On the assumption that they may become equal the ifdef
      is inside the PHDRS definiton.
      
      [ Impact: cleanup ]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tim Abbott <tabbott@MIT.EDU>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1240991249-27117-3-git-send-email-sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      afb8095a
    • S
      x86, vmlinux.lds: unify header/footer · 17ce265d
      Sam Ravnborg 提交于
      Merge everything except PHDRS and SECTIONS into
      vmlinux.lds.S.
      
      [ Impact: cleanup ]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tim Abbott <tabbott@MIT.EDU>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1240991249-27117-2-git-send-email-sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      17ce265d
    • S
      x86: beautify vmlinux_32.lds.S · aee6a166
      Sam Ravnborg 提交于
      Beautify vmlinux_32.lds.S:
      
       - Use tabs for indent
       - Located curly braces like in C code
       - Rearranged a few comments
      
      To see actual differences use "git diff -b" which
      ignore 'whitespace' changes.
      
      The beautification is done to prepare a unification
      of the _32 and _64 variants of the linker scripts.
      
      [ Impact: cleanup ]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tim Abbott <tabbott@MIT.EDU>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1240991249-27117-1-git-send-email-sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      aee6a166
  2. 27 4月, 2009 2 次提交
    • L
      x86: unify arch/x86/boot/compressed/vmlinux_*.lds · 51b26ada
      Linus Torvalds 提交于
      Look at the:
      
      	diff -u arch/x86/boot/compressed/vmlinux_*.lds
      
      output and realize that they're basially exactly the same except for
      trivial naming differences, and the fact that the 64-bit version has a
      "pgtable" thing.
      
      So unify them.
      
      There's some trivial cleanup there (make the output format a Kconfig thing
      rather than doing #ifdef's for it, and unify both 32-bit and 64-bit BSS
      end to "_ebss", where 32-bit used to use the traditional "_end"), but
      other than that it's really very mindless and straigt conversion.
      
      For example, I think we should aim to remove "startup_32" vs "startup_64",
      and just call it "startup", and get rid of one more difference. I didn't
      do that.
      
      Also, notice the comment in the unified vmlinux.lds.S talks about
      "head_64" and "startup_32" which is an odd and incorrect mix, but that was
      actually what the old 64-bit only lds file had, so the confusion isn't
      new, and now that mixing is arguably more accurate thanks to the
      vmlinux.lds.S file being shared between the two cases ;)
      
      [ Impact: cleanup, unification ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      51b26ada
    • S
      x86: beautify vmlinux_64.lds.S · 0a3ec21f
      Sam Ravnborg 提交于
      Beautify vmlinux_64.lds.S:
      
       - Use tabs for indent
       - Located curly braces like in C code
       - Rearranged a few comments
      
      There is no functional changes in this patch
      
      The beautification is done to prepare a unification
      of the _32 and the _64 variants of the linker scripts.
      
      [ Impact: cleanup ]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tim Abbott <tabbott@MIT.EDU>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <20090426210742.GA3464@uranus.ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0a3ec21f
  3. 17 4月, 2009 1 次提交
  4. 15 4月, 2009 6 次提交
    • L
      acpi-cpufreq: fix 'smp_call_function_many()' confusion · ea34f43a
      Linus Torvalds 提交于
      It turns out that 'smp_call_function_many()' doesn't work at all like
      'smp_call_function_single()', and my change to Andrew's patch to use it
      rather than a loop over all CPU's acpi-cpufreq doesn't work.
      
      My bad.
      
      'smp_call_function_many()' has two "features" (aka "documented bugs"):
      
       (a) it needs to be called with preemption disabled, because it uses
           smp_processor_id() without guarding the CPU lookup with 'get_cpu()'
           and 'put_cpu()' like the 'single' variant does.
      
       (b) even if the current CPU is part of the CPU mask, it won't do the
           call on that CPU.
      
      Still, we're better off trying to use 'smp_call_function_many()' than
      looping over CPU's, since it at least in theory allows us to use a
      broadcast IPI and do it all in parallel.  So let's just work around the
      silly semantic bugs in that function.
      Reported-and-tested-by: NAli Gholami Rudi <ali@rudi.ir>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Andrew Morton <akpm@linux-foundation.org>,
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Dave Jones <davej@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ea34f43a
    • S
      powerpc: pseries/dtl.c should include asm/firmware.h · b71a0c29
      Sachin Sant 提交于
      A randconfig build on powerpc failed with:
      
      dtl.c: In function 'dtl_init':
      dtl.c:238: error: implicit declaration of function 'firmware_has_feature'
      dtl.c:238: error: 'FW_FEATURE_SPLPAR' undeclared (first use in this function)
      
      - We need firmware.h for these definitions.
      Signed-off-by: NSachin Sant <sachinp@in.ibm.com>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b71a0c29
    • P
      powerpc: Fix data-corrupting bug in __futex_atomic_op · 306a8288
      Paul Mackerras 提交于
      Richard Henderson pointed out that the powerpc __futex_atomic_op has a
      bug: it will write the wrong value if the stwcx. fails and it has to
      retry the lwarx/stwcx. loop, since 'oparg' will have been overwritten
      by the result from the first time around the loop.  This happens
      because it uses the same register for 'oparg' (an input) as it uses
      for the result.
      
      This fixes it by using separate registers for 'oparg' and 'ret'.
      
      Cc: stable@kernel.org
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      306a8288
    • M
      powerpc/pseries: Set error_state to pci_channel_io_normal in eeh_report_reset() · c58dc575
      Mike Mason 提交于
      While adding native EEH support to Emulex and Qlogic drivers, it was
      discovered that dev->error_state was set to pci_io_channel_normal too
      late in the recovery process. These drivers rely on error_state to
      determine if they can access the device in their slot_reset callback,
      thus error_state needs to be set to pci_io_channel_normal in
      eeh_report_reset(). Below is a detailed explanation (courtesy of Richard
      Lary) as to why this is necessary.
      
      Background:
      PCI MMIO or DMA accesses to a frozen slot generate additional EEH
      errors. If the number of additional EEH errors exceeds EEH_MAX_FAILS the
      adapter will be shutdown. To avoid triggering excessive EEH errors and
      an undesirable adapter shutdown, some drivers use the
      pci_channel_offline(dev) wrapper function to return a Boolean value
      based on the value of pci_dev->error_state to determine if PCI MMIO or
      DMA accesses are safe. If the wrapper returns TRUE, drivers must not
      make PCI MMIO or DMA access to their hardware.
      
      The pci_dev structure member error_state reflects one of three values,
      1) pci_channel_io_normal, 2) pci_channel_io_frozen, 3)
      pci_channel_io_perm_failure.  Function pci_channel_offline(dev) returns
      TRUE if error_state is pci_channel_io_frozen or pci_channel_io_perm_failure.
      
      The EEH driver sets pci_dev->error_state to pci_channel_io_frozen at the
      point where the PCI slot is frozen. Currently, the EEH driver restores
      dev->error_state to pci_channel_io_normal in eeh_report_resume() before
      calling the driver's resume callback. However, when the EEH driver calls
      the driver's slot_reset callback() from eeh_report_reset(), it
      incorrectly indicates the error state is still pci_channel_io_frozen.
      
      Waiting until eeh_report_resume() to restore dev->error_state to
      pci_channel_io_normal is too late for Emulex and QLogic FC drivers and
      any other drivers which are designed to use common code paths in these
      two cases: i) those called after the driver's slot_reset callback() and
      ii) those called after the PCI slot is frozen but before the driver's
      slot_reset callback is called. Case i) all driver paths executed to
      reinitialize the hardware after a reset and case ii) all code paths
      executed by driver kernel threads that run asynchronous to the main
      driver thread, such as interrupt handlers and worker threads to process
      driver work queues.
      
      Emulex and QLogic FC drivers are designed with common code paths which
      require that pci_channel_offline(dev) reflect the true state of the
      hardware. The state transitions that the hardware takes from Normal
      Operations to Slot Frozen to Reset to Normal Operations are documented
      in the Power Architecture™ Platform Requirements+ (PAPR+) in Table 75.
      PE State Control.
      
      PAPR defines the following 3 states:
      
      0 -- Not reset, Not EEH stopped, MMIO load/store allowed, DMA allowed
           (Normal Operations)
      1 -- Reset, Not EEH stopped, MMIO load/store disabled, DMA disabled
      2 -- Not reset, EEH stopped, MMIO load/store disabled, DMA disabled
           (Slot Frozen)
      
      An EEH error places the slot in state 2 (Frozen) and the adapter driver
      is notified that an EEH error was detected. If the adapter driver
      returns PCI_ERS_RESULT_NEED_RESET, the EEH driver calls
      eeh_reset_device() to place the slot into state 1 (Reset) and
      eeh_reset_device completes by placing the slot into State 0 (Normal
      Operations). Upon return from eeh_reset_device(), the EEH driver calls
      eeh_report_reset, which then calls the adapter's slot_reset callback. At
      the time the adapter's slot_reset callback is called, the true state of
      the hardware is Normal Operations and should be accurately reflected by
      setting dev->error_state to pci_channel_io_normal.
      
      The current implementation of EEH driver does not do so and requires
      this change to correct this deficiency.
      Signed-off-by: NMike Mason <mmlnx@us.ibm.com>
      Acked-by: NLinas Vepstas <linasvepstas@gmail.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      c58dc575
    • H
      powerpc: Allow 256kB pages with SHMEM · adf213c4
      Hugh Dickins 提交于
      Now that shmem's divisions by zero and SHMEM_MAX_BYTES are fixed,
      let powerpc 256kB pages coexist with CONFIG_SHMEM again.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      adf213c4
    • H
      x86 microcode: revert some work_on_cpu · 6f66cbc6
      Hugh Dickins 提交于
      Revert part of af5c820a ("x86: cpumask:
      use work_on_cpu in arch/x86/kernel/microcode_core.c")
      
      That change is causing only one Intel CPU's microcode to be updated e.g.
      microcode: CPU3 updated from revision 0x9 to 0x17, date = 2005-04-22
      where before it announced that also for CPU0 and CPU1 and CPU2.
      
      We cannot use work_on_cpu() in the CONFIG_MICROCODE_OLD_INTERFACE code,
      because Intel's request_microcode_user() involves a copy_from_user() from
      /sbin/microcode_ctl, which therefore needs to be on that CPU at the time.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6f66cbc6
  5. 14 4月, 2009 14 次提交
  6. 13 4月, 2009 1 次提交
  7. 12 4月, 2009 3 次提交
    • S
      x86: add linux kernel support for YMM state · a30469e7
      Suresh Siddha 提交于
      Impact: save/restore Intel-AVX state properly between tasks
      
      Intel Advanced Vector Extensions (AVX) introduce 256-bit vector processing
      capability. More about AVX at http://software.intel.com/sites/avx
      
      Add OS support for YMM state management using xsave/xrstor infrastructure
      to support AVX.
      Signed-off-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      LKML-Reference: <1239402084.27006.8057.camel@localhost.localdomain>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a30469e7
    • M
      x86: fix wrong section of pat_disable & make it static · 1ee4bd92
      Marcin Slusarz 提交于
      pat_disable cannot be __cpuinit anymore because it's called from pat_init
      and the callchain looks like this:
      pat_disable [cpuinit] <- pat_init <- generic_set_all <-
       ipi_handler <- set_mtrr <- (other non init/cpuinit functions)
      
      WARNING: arch/x86/mm/built-in.o(.text+0x449e): Section mismatch in reference
      from the function pat_init() to the function .cpuinit.text:pat_disable()
      The function pat_init() references
      the function __cpuinit pat_disable().
      This is often because pat_init lacks a __cpuinit
      annotation or the annotation of pat_disable is wrong.
      
      Non CONFIG_X86_PAT version of pat_disable is static inline, so this version
      can be static too (and there are no callers outside of this file).
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      LKML-Reference: <49DFB055.6070405@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1ee4bd92
    • R
      x86: Fix section mismatches in mpparse · 57592224
      Rakib Mullick 提交于
      Impact: fix section mismatch
      
      In arch/x86/kernel/mpparse.c, smp_reserve_bootmem() has been called
      and also refers to a function which is in .init section. Thus causes
      the first warning. And check_irq_src() also requires an __init,
      because it refers to an .init section.
      Signed-off-by: NRakib Mullick <rakib.mullick@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      LKML-Reference: <b9df5fa10904102004g51265d9axc8d07278bfdb6ba0@mail.gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      57592224
  8. 11 4月, 2009 2 次提交