1. 16 12月, 2009 1 次提交
  2. 15 12月, 2009 3 次提交
    • F
      x86: Split swiotlb initialization into two stages · 186a2502
      FUJITA Tomonori 提交于
      The commit f4780ca0 moves
      swiotlb initialization before dma32_free_bootmem(). It's
      supposed to fix a bug that the commit
      75f1cdf1 introduced, we
      initialize SWIOTLB right after dma32_free_bootmem so we wrongly
      steal memory area allocated for GART with broken BIOS earlier.
      
      However, the above commit introduced another problem, which
      likely breaks machines with huge amount of memory. Such a box
      use the majority of DMA32_ZONE so there is no memory for
      swiotlb.
      
      With this patch, the x86 IOMMU initialization sequence are:
      
      1. We set swiotlb to 1 in the case of (max_pfn > MAX_DMA32_PFN
         && !no_iommu). If swiotlb usage is forced by the boot option,
         we go to the step 3 and finish (we don't try to detect IOMMUs).
      
      2. We call the detection functions of all the IOMMUs. The
         detection function sets x86_init.iommu.iommu_init to the IOMMU
         initialization function (so we can avoid calling the
         initialization functions of all the IOMMUs needlessly).
      
      3. We initialize swiotlb (and set dma_ops to swiotlb_dma_ops) if
         swiotlb is set to 1.
      
      4. If the IOMMU initialization function doesn't need swiotlb
         (e.g. the initialization is sucessful) then sets swiotlb to zero.
      
      5. If we find that swiotlb is set to zero, we free swiotlb
         resource.
      Reported-by: NYinghai Lu <yinghai@kernel.org>
      Reported-by: NRoland Dreier <rdreier@cisco.com>
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      LKML-Reference: <20091215204729A.fujita.tomonori@lab.ntt.co.jp>
      Tested-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      186a2502
    • H
      x86: Regex support and known-movable symbols for relocs, fix _end · 873b5271
      H. Peter Anvin 提交于
      This adds a new category of symbols to the relocs program: symbols
      which are known to be relative, even though the linker emits them as
      absolute; this is the case for symbols that live in the linker script,
      which currently applies to _end.
      
      Unfortunately the previous workaround of putting _end in its own empty
      section was defeated by newer binutils, which remove empty sections
      completely.
      
      This patch also changes the symbol matching to use regular expressions
      instead of hardcoded C for specific patterns.
      
      This is a decidedly non-minimal patch: a modified version of the
      relocs program is used as part of the Syslinux build, and this 	is
      basically a backport to Linux of some of those changes; they have
      thus been well tested.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      LKML-Reference: <4AF86211.3070103@zytor.com>
      Acked-by: NMichal Marek <mmarek@suse.cz>
      Tested-by: NSedat Dilek <sedat.dilek@gmail.com>
      873b5271
    • H
      x86, msr: Remove incorrect, duplicated code in the MSR driver · 494c2ebf
      H. Peter Anvin 提交于
      The MSR driver would compute the values for cpu and c at declaration,
      and then again in the body of the function.  This isn't merely
      redundant, but unsafe, since cpu might not refer to a valid CPU at
      that point.
      
      Remove the unnecessary and dangerous references in the declarations.
      This code now matches the equivalent code in the CPUID driver.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      494c2ebf
  3. 14 12月, 2009 6 次提交
  4. 13 12月, 2009 1 次提交
  5. 12 12月, 2009 7 次提交
    • H
      nvram: Fix write beyond end condition; prove to gcc copy is safe · a01c7800
      H. Peter Anvin 提交于
      In nvram_write, first of all, correctly handle the case where the file
      pointer is already beyond the end; we should return EOF in that case.
      
      Second, make the logic a bit more explicit so that gcc can statically
      prove that the copy_from_user() is safe.  Once the condition of the
      beyond-end filepointer is eliminated, the copy is safe but gcc can't
      prove it, causing build failures for i386 allyesconfig.
      
      Third, eliminate the entirely superfluous variable "len", and just use
      the passed-in variable "count" instead.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <tip-*@git.kernel.org>
      a01c7800
    • H
      mm: Adjust do_pages_stat() so gcc can see copy_from_user() is safe · b9255850
      H. Peter Anvin 提交于
      Slightly adjust the logic for determining the size of the
      copy_form_user() in do_pages_stat(); with this change, gcc can see
      that the copying is safe.
      
      Without this, we get a build error for i386 allyesconfig:
      
      /home/hpa/kernel/linux-2.6-tip.urgent/arch/x86/include/asm/uaccess_32.h:213:
      error: call to ‘copy_from_user_overflow’ declared with attribute
      error: copy_from_user() buffer size is not provably correct
      
      Unlike an earlier patch from Arjan, this doesn't introduce new
      variables; merely reshuffles the compare so that gcc can see that an
      overflow cannot happen.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Brice Goglin <Brice.Goglin@inria.fr>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      LKML-Reference: <20090926205406.30d55b08@infradead.org>
      b9255850
    • M
      x86: Limit the number of processor bootup messages · 2eaad1fd
      Mike Travis 提交于
      When there are a large number of processors in a system, there
      is an excessive amount of messages sent to the system console.
      It's estimated that with 4096 processors in a system, and the
      console baudrate set to 56K, the startup messages will take
      about 84 minutes to clear the serial port.
      
      This set of patches limits the number of repetitious messages
      which contain no additional information.  Much of this information
      is obtainable from the /proc and /sysfs.   Some of the messages
      are also sent to the kernel log buffer as KERN_DEBUG messages so
      dmesg can be used to examine more closely any details specific to
      a problem.
      
      The new cpu bootup sequence for system_state == SYSTEM_BOOTING:
      
      Booting Node   0, Processors  #1 #2 #3 #4 #5 #6 #7 Ok.
      Booting Node   1, Processors  #8 #9 #10 #11 #12 #13 #14 #15 Ok.
      ...
      Booting Node   3, Processors  #56 #57 #58 #59 #60 #61 #62 #63 Ok.
      Brought up 64 CPUs
      
      After the system is running, a single line boot message is displayed
      when CPU's are hotplugged on:
      
          Booting Node %d Processor %d APIC 0x%x
      
      Status of the following lines:
      
          CPU: Physical Processor ID:		printed once (for boot cpu)
          CPU: Processor Core ID:		printed once (for boot cpu)
          CPU: Hyper-Threading is disabled	printed once (for boot cpu)
          CPU: Thermal monitoring enabled	printed once (for boot cpu)
          CPU %d/0x%x -> Node %d:		removed
          CPU %d is now offline:		only if system_state == RUNNING
          Initializing CPU#%d:		KERN_DEBUG
      Signed-off-by: NMike Travis <travis@sgi.com>
      LKML-Reference: <4B219E28.8080601@sgi.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      2eaad1fd
    • M
      x86: Remove enabling x2apic message for every CPU · 450b1e8d
      Mike Travis 提交于
      Print only once that the system is supporting x2apic mode.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Acked-by: NCyrill Gorcunov <gorcunov@openvz.org>
      LKML-Reference: <4B226E92.5080904@sgi.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      450b1e8d
    • H
      doc: Add documentation for bootloader_{type,version} · d75757ab
      H. Peter Anvin 提交于
      Add documentation for kernel/bootloader_type and
      kernel/bootloader_version to sysctl/kernel.txt.  This should really
      have been done a long time ago.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Shen Feng <shen@cn.fujitsu.com>
      d75757ab
    • B
      x86, msr: Add support for non-contiguous cpumasks · 50542251
      Borislav Petkov 提交于
      The current rd/wrmsr_on_cpus helpers assume that the supplied
      cpumasks are contiguous. However, there are machines out there
      like some K8 multinode Opterons which have a non-contiguous core
      enumeration on each node (e.g. cores 0,2 on node 0 instead of 0,1), see
      http://www.gossamer-threads.com/lists/linux/kernel/1160268.
      
      This patch fixes out-of-bounds writes (see URL above) by adding per-CPU
      msr structs which are used on the respective cores.
      
      Additionally, two helpers, msrs_{alloc,free}, are provided for use by
      the callers of the MSR accessors.
      
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Cc: Aristeu Rozanski <aris@redhat.com>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Doug Thompson <dougthompson@xmission.com>
      Signed-off-by: NBorislav Petkov <borislav.petkov@amd.com>
      LKML-Reference: <20091211171440.GD31998@aftab>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      50542251
    • H
      Merge commit 'linus/master' into x86/urgent · 5c6baba8
      H. Peter Anvin 提交于
      5c6baba8
  6. 11 12月, 2009 17 次提交
  7. 10 12月, 2009 5 次提交
    • D
      V4L/DVB (13592): max2165: 32bit build patch · 5476ffd2
      David Wong 提交于
      This patch drops usage of floating point variable for 32bit build
      Signed-off-by: NDavid T. L. Wong <davidtlwong@gmail.com>
      Acked-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      5476ffd2
    • I
      Merge branch 'amd-iommu/fixes' of... · 9cf78267
      Ingo Molnar 提交于
      Merge branch 'amd-iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu into x86/urgent
      9cf78267
    • J
      x86/amd-iommu: Fix PCI hotplug with passthrough mode · 8638c491
      Joerg Roedel 提交于
      The device change notifier is initialized in the dma_ops
      initialization path. But this path is never executed for
      iommu=pt. Move the notifier initialization to IOMMU hardware
      init code to fix this.
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      8638c491
    • J
      x86/amd-iommu: Fix passthrough mode · b7cc9554
      Joerg Roedel 提交于
      The data structure changes to use dev->archdata.iommu field
      broke the iommu=pt mode because in this case the
      dev->archdata.iommu was left uninitialized. This moves the
      inititalization of the devices into the main init function
      and fixes the problem.
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      b7cc9554
    • B
      exofs: Multi-device mirror support · 04dc1e88
      Boaz Harrosh 提交于
      This patch changes on-disk format, it is accompanied with a parallel
      patch to mkfs.exofs that enables multi-device capabilities.
      
      After this patch, old exofs will refuse to mount a new formatted FS and
      new exofs will refuse an old format. This is done by moving the magic
      field offset inside the FSCB. A new FSCB *version* field was added. In
      the future, exofs will refuse to mount unmatched FSCB version. To
      up-grade or down-grade an exofs one must use mkfs.exofs --upgrade option
      before mounting.
      
      Introduced, a new object that contains a *device-table*. This object
      contains the default *data-map* and a linear array of devices
      information, which identifies the devices used in the filesystem. This
      object is only written to offline by mkfs.exofs. This is why it is kept
      separate from the FSCB, since the later is written to while mounted.
      
      Same partition number, same object number is used on all devices only
      the device varies.
      
      * define the new format, then load the device table on mount time make
        sure every thing is supported.
      
      * Change I/O engine to now support Mirror IO, .i.e write same data
        to multiple devices, read from a random device to spread the
        read-load from multiple clients (TODO: stripe read)
      
      Implementation notes:
       A few points introduced in previous patch should be mentioned here:
      
      * Special care was made so absolutlly all operation that have any chance
        of failing are done before any osd-request is executed. This is to
        minimize the need for a data consistency recovery, to only real IO
        errors.
      
      * Each IO state has a kref. It starts at 1, any osd-request executed
        will increment the kref, finally when all are executed the first ref
        is dropped. At IO-done, each request completion decrements the kref,
        the last one to return executes the internal _last_io() routine.
        _last_io() will call the registered io_state_done. On sync mode a
        caller does not supply a done method, indicating a synchronous
        request, the caller is put to sleep and a special io_state_done is
        registered that will awaken the caller. Though also in sync mode all
        operations are executed in parallel.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      04dc1e88