1. 23 10月, 2007 15 次提交
    • R
      Virtio console driver · 31610434
      Rusty Russell 提交于
      This is an hvc-based virtio console driver.  It's suboptimal becuase
      hvc expects to have raw access to interrupts and virtio doesn't assume
      that, so it currently polls.
      
      There are two solutions: expose hvc's "kick" interface, or wean off hvc.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      31610434
    • R
      Block driver using virtio. · e467cde2
      Rusty Russell 提交于
      The block driver uses scatter-gather lists with sg[0] being the
      request information (struct virtio_blk_outhdr) with the type, sector
      and inbuf id.  The next N sg entries are the bio itself, then the last
      sg is the status byte.  Whether the N entries are in or out depends on
      whether it's a read or a write.
      
      We accept the normal (SCSI) ioctls: they get handed through to the other
      side which can then handle it or reply that it's unsupported.  It's
      not clear that this actually works in general, since I don't know
      if blk_pc_request() requests have an accurate rq_data_dir().
      
      Although we try to reply -ENOTTY on unsupported commands, ioctl(fd,
      CDROMEJECT) returns success to userspace.  This needs a separate
      patch.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      e467cde2
    • R
      Net driver using virtio · 296f96fc
      Rusty Russell 提交于
      The network driver uses two virtqueues: one for input packets and one
      for output packets.  This has nice locking properties (ie. we don't do
      any for recv vs send).
      
      TODO:
      	1) Big packets.
      	2) Multi-client devices (maybe separate driver?).
      	3) Resolve freeing of old xmit skbs (Christian Borntraeger)
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: netdev@vger.kernel.org
      296f96fc
    • R
      Virtio interface · ec3d41c4
      Rusty Russell 提交于
      This attempts to implement a "virtual I/O" layer which should allow
      common drivers to be efficiently used across most virtual I/O
      mechanisms.  It will no-doubt need further enhancement.
      
      The virtio drivers add buffers to virtio queues; as the buffers are consumed
      the driver "interrupt" callbacks are invoked.
      
      There is also a generic implementation of config space which drivers can query
      to get setup information from the host.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Dor Laor <dor.laor@qumranet.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      ec3d41c4
    • R
      Boot with virtual == physical to get closer to native Linux. · 47436aa4
      Rusty Russell 提交于
      1) This allows us to get alot closer to booting bzImages.
      
      2) It means we don't have to know page_offset.
      
      3) The Guest needs to modify the boot pagetables to create the
         PAGE_OFFSET mapping before jumping to C code.
      
      4) guest_pa() walks the page tables rather than using page_offset.
      
      5) We don't use page_offset to figure out whether to emulate: it was
         always kinda quesationable, and won't work for instructions done
         before remapping (bzImage unpacking in particular).
      
      6) We still want the kernel address for tlb flushing: have the initial
         hypercall give us that, too.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      47436aa4
    • R
      Allow guest to specify syscall vector to use. · c18acd73
      Rusty Russell 提交于
      (Based on Ron Minnich's LGUEST_PLAN9_SYSCALL patch).
      
      This patch allows Guests to specify what system call vector they want,
      and we try to reserve it.  We only allow one non-Linux system call
      vector, to try to avoid DoS on the Host.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      c18acd73
    • J
      47aee45a
    • J
      Make hypercalls arch-independent. · b410e7b1
      Jes Sorensen 提交于
      Clean up the hypercall code to make the code in hypercalls.c
      architecture independent. First process the common hypercalls and
      then call lguest_arch_do_hcall() if the call hasn't been handled.
      Rename struct hcall_ring to hcall_args.
      
      This patch requires the previous patch which reorganize the layout of
      struct lguest_regs on i386 so they match the layout of struct
      hcall_args.
      Signed-off-by: NJes Sorensen <jes@sgi.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      b410e7b1
    • R
      Remove fixed limit on number of guests, and lguests array. · 48245cc0
      Rusty Russell 提交于
      Back when we had all the Guest state in the switcher, we had a fixed
      array of them.  This is no longer necessary.
      
      If we switch the network code to using random_ether_addr (46 bits is
      enough to avoid clashes), we can get rid of the concept of "guest id"
      altogether.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      48245cc0
    • J
      Move lguest hcalls to arch-specific header · c37ae93d
      Jes Sorensen 提交于
      Move architecture specific portion of lg_hcall code to asm-i386/lg_hcall.h
      and have it included from linux/lguest.h.
      
      [Changed to asm-i386/lguest_hcall.h so documentation finds it -RR]
      Signed-off-by: NJes Sorensen <jes@sgi.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Jes Sorensen <jes@sgi.com>
      c37ae93d
    • R
      Make lguest_launcher.h types userspace-friendly · b45d8cb0
      Rusty Russell 提交于
      lguest_launcher.h uses "u32" not "__u32", which sets a bad example.  Fix that,
      and include <linux/types.h>.
      
      This means we need to use -I on the Launcher build line so types.h is found.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      b45d8cb0
    • R
      Make asm-x86/bootparam.h includable from userspace. · ee8e7cfe
      Rusty Russell 提交于
      To actually write a bootloader (or, say, the lguest launcher)
      currently requires duplication of these structures.  Making them
      includable from userspace is much nicer.
      
      We merge the common userspace-required definitions of e820_32/64.h
      into e820.h for export.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      ee8e7cfe
    • D
      Expand hwif->host_flags so that it fits new flags. · e95d9c6b
      David Miller 提交于
      Commit 238e4f14 ("ide: add
      IDE_HFLAG_NO_LBA48 and IDE_HFLAG_NO_LBA48_DMA host flags") caused a
      regression because the host_flags in struct hwif_s wasn't expanded to
      cope with the fact that the host flags no longer fit in 16 bits.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      [ I hate having to add good commit descriptions.  - Linus ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e95d9c6b
    • J
      Add CONFIG_DEBUG_SG sg validation · d6ec0842
      Jens Axboe 提交于
      Add a Kconfig entry which will toggle some sanity checks on the sg
      entry and tables.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      d6ec0842
    • J
      Change table chaining layout · 18dabf47
      Jens Axboe 提交于
      Change the page member of the scatterlist structure to be an unsigned
      long, and encode more stuff in the lower bits:
      
      - Bits 0 and 1 zero: this is a normal sg entry. Next sg entry is located
        at sg + 1.
      - Bit 0 set: this is a chain entry, the next real entry is at ->page_link
        with the two low bits masked off.
      - Bit 1 set: this is the final entry in the sg entry. sg_next() will return
        NULL when passed such an entry.
      
      It's thus important that sg table users use the proper accessors to get
      and set the page member.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      18dabf47
  2. 22 10月, 2007 25 次提交
    • C
      exportfs: update documentation · e38f9817
      Christoph Hellwig 提交于
      Update documentation to the current state of affairs.  Remove duplicated
      method descruptions in exportfs.h and point to Documentation/filesystems/
      Exporting instead.  Add a little file header comment in expfs.c describing
      what's going on and mentioning Neils and my copyright [1].
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Neil Brown <neilb@suse.de>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: David Chinner <dgc@sgi.com>
      Cc: Timothy Shimmin <tes@sgi.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Chris Mason <mason@suse.com>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Cc: "Vladimir V. Saveliev" <vs@namesys.com>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e38f9817
    • C
      exportfs: make struct export_operations const · 39655164
      Christoph Hellwig 提交于
      Now that nfsd has stopped writing to the find_exported_dentry member we an
      mark the export_operations const
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Neil Brown <neilb@suse.de>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: David Chinner <dgc@sgi.com>
      Cc: Timothy Shimmin <tes@sgi.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Chris Mason <mason@suse.com>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Cc: "Vladimir V. Saveliev" <vs@namesys.com>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      39655164
    • C
      exportfs: remove old methods · cfaea787
      Christoph Hellwig 提交于
      Now that all filesystems are converted remove support for the old methods.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Neil Brown <neilb@suse.de>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: David Chinner <dgc@sgi.com>
      Cc: Timothy Shimmin <tes@sgi.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Chris Mason <mason@suse.com>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Cc: "Vladimir V. Saveliev" <vs@namesys.com>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cfaea787
    • C
      reiserfs: new export ops · be55caf1
      Christoph Hellwig 提交于
      Another nice little cleanup by using the new methods.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Neil Brown <neilb@suse.de>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Chris Mason <mason@suse.com>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Cc: "Vladimir V. Saveliev" <vs@namesys.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      be55caf1
    • C
      efs: new export ops · 05da0804
      Christoph Hellwig 提交于
      Trivial switch over to the new generic helpers.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Neil Brown <neilb@suse.de>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      05da0804
    • C
      exportfs: add new methods · 2596110a
      Christoph Hellwig 提交于
      Add the guts for the new filesystem API to exportfs.
      
      There's now a fh_to_dentry method that returns a dentry for the object looked
      for given a filehandle fragment, and a fh_to_parent operation that returns the
      dentry for the encoded parent directory in case the file handle contains it.
      
      There are default implementations for these methods that only take a callback
      for an nfs-enhanced iget variant and implement the rest of the semantics.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Neil Brown <neilb@suse.de>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: David Chinner <dgc@sgi.com>
      Cc: Timothy Shimmin <tes@sgi.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Chris Mason <mason@suse.com>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Cc: "Vladimir V. Saveliev" <vs@namesys.com>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2596110a
    • C
      exportfs: add fid type · 6e91ea2b
      Christoph Hellwig 提交于
      This patchset is a medium scale rewrite of the export operations interface.
      The goal is to make the interface less complex, and easier to understand from
      the filesystem side, aswell as preparing generic support for exporting of
      64bit inode numbers.
      
      This touches all nfs exporting filesystems, and I've done testing on all of
      the filesystems I have here locally (xfs, ext2, ext3, reiserfs, jfs)
      
      This patch:
      
      Add a structured fid type so that we don't have to pass an array of u32 values
      around everywhere.  It's a union of possible layouts.
      
      As a start there's only the u32 array and the traditional 32bit inode format,
      but there will be more in one of my next patchset when I start to document the
      various filehandle formats we have in lowlevel filesystems better.
      
      Also add an enum that gives the various filehandle types human- readable
      names.
      
      Note: Some people might think the struct containing an anonymous union is
      ugly, but I didn't want to pass around a raw union type.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Neil Brown <neilb@suse.de>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: David Chinner <dgc@sgi.com>
      Cc: Timothy Shimmin <tes@sgi.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Chris Mason <mason@suse.com>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Cc: "Vladimir V. Saveliev" <vs@namesys.com>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6e91ea2b
    • B
      kexec: add BSS to resource tree · 00bf4098
      Bernhard Walle 提交于
      Add the BSS to the resource tree just as kernel text and kernel data are in
      the resource tree.  The main reason behind this is to avoid crashkernel
      reservation in that area.
      
      While it's not strictly necessary to have the BSS in the resource tree (the
      actual collision detection is done in the reserve_bootmem() function before),
      the usage of the BSS resource should be presented to the user in /proc/iomem
      just as Kernel data and Kernel code.
      
      Note: The patch currently is only implemented for x86 and ia64 (because
      efi_initialize_iomem_resources() has the same signature on i386 and ia64).
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NBernhard Walle <bwalle@suse.de>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Vivek Goyal <vgoyal@in.ibm.com>
      Cc: <linux-arch@vger.kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      00bf4098
    • K
      Intel IOMMU: DMAR fault handling support · 3460a6d9
      Keshavamurthy, Anil S 提交于
      MSI interrupt handler registrations and fault handling support for Intel-IOMMU
      hadrware.
      
      This patch enables the MSI interrupts for the DMA remapping units and in the
      interrupt handler read the fault cause and outputs the same on to the console.
      Signed-off-by: NAnil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Muli Ben-Yehuda <muli@il.ibm.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Ashok Raj <ashok.raj@intel.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3460a6d9
    • K
      Intel IOMMU: Intel IOMMU driver · ba395927
      Keshavamurthy, Anil S 提交于
      Actual intel IOMMU driver.  Hardware spec can be found at:
      http://www.intel.com/technology/virtualization
      
      This driver sets X86_64 'dma_ops', so hook into standard DMA APIs.  In this
      way, PCI driver will get virtual DMA address.  This change is transparent to
      PCI drivers.
      
      [akpm@linux-foundation.org: remove unneeded cast]
      [akpm@linux-foundation.org: build fix]
      [bunk@stusta.de: fix duplicate CONFIG_DMAR Makefile line]
      Signed-off-by: NAnil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Muli Ben-Yehuda <muli@il.ibm.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Ashok Raj <ashok.raj@intel.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ba395927
    • K
      Intel IOMMU: PCI generic helper function · 994a65e2
      Keshavamurthy, Anil S 提交于
      When devices are under a p2p bridge, upstream transactions get replaced by the
      device id of the bridge as it owns the PCIE transaction.  Hence its necessary
      to setup translations on behalf of the bridge as well.  Due to this limitation
      all devices under a p2p share the same domain in a DMAR.
      
      We just cache the type of device, if its a native PCIe device
      or not for later use.
      
      [akpm@linux-foundation.org: BUG_ON -> WARN_ON+recover]
      Signed-off-by: NAnil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Muli Ben-Yehuda <muli@il.ibm.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Ashok Raj <ashok.raj@intel.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      994a65e2
    • K
      Intel IOMMU: DMAR detection and parsing logic · 10e5247f
      Keshavamurthy, Anil S 提交于
      This patch supports the upcomming Intel IOMMU hardware a.k.a.  Intel(R)
      Virtualization Technology for Directed I/O Architecture and the hardware spec
      for the same can be found here
      http://www.intel.com/technology/virtualization/index.htm
      
      FAQ! (questions from akpm, answers from ak)
      
      > So...  what's all this code for?
      >
      > I assume that the intent here is to speed things up under Xen, etc?
      
      Yes in some cases, but not this code.  That would be the Xen version of this
      code that could potentially assign whole devices to guests.  I expect this to
      be only useful in some special cases though because most hardware is not
      virtualizable and you typically want an own instance for each guest.
      
      Ok at some point KVM might implement this too; i likely would use this code
      for this.
      
      > Do we
      > have any benchmark results to help us to decide whether a merge would be
      > justified?
      
      The main advantage for doing it in the normal kernel is not performance, but
      more safety.  Broken devices won't be able to corrupt memory by doing random
      DMA.
      
      Unfortunately that doesn't work for graphics yet, for that need user space
      interfaces for the X server are needed.
      
      There are some potential performance benefits too:
      
      - When you have a device that cannot address the complete address range an
        IOMMU can remap its memory instead of bounce buffering.  Remapping is likely
        cheaper than copying.
      
      - The IOMMU can merge sg lists into a single virtual block.  This could
        potentially speed up SG IO when the device is slow walking SG lists.  [I
        long ago benchmarked 5% on some block benchmark with an old MPT Fusion; but
        it probably depends a lot on the HBA]
      
      And you get better driver debugging because unexpected memory accesses from
      the devices will cause a trappable event.
      
      >
      > Does it slow anything down?
      
      It adds more overhead to each IO so yes.
      
      This patch:
      
      Add support for early detection and parsing of DMAR's (DMA Remapping) reported
      to OS via ACPI tables.
      
      DMA remapping(DMAR) devices support enables independent address translations
      for Direct Memory Access(DMA) from Devices.  These DMA remapping devices are
      reported via ACPI tables and includes pci device scope covered by these DMA
      remapping device.
      
      For detailed info on the specification of "Intel(R) Virtualization Technology
      for Directed I/O Architecture" please see
      http://www.intel.com/technology/virtualization/index.htmSigned-off-by: NAnil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Muli Ben-Yehuda <muli@il.ibm.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Ashok Raj <ashok.raj@intel.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Len Brown <lenb@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      10e5247f
    • J
      ext2: avoid rec_len overflow with 64KB block size · 89910ccc
      Jan Kara 提交于
      With 64KB blocksize, a directory entry can have size 64KB which does not
      fit into 16 bits we have for entry length.  So we store 0xffff instead and
      convert the value when read from / written to disk.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NJan Kara <jack@suse.cz>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      89910ccc
    • S
      capabilities: clean up file capability reading · b68680e4
      Serge E. Hallyn 提交于
      Simplify the vfs_cap_data structure.
      
      Also fix get_file_caps which was declaring
      __le32 v1caps[XATTR_CAPS_SZ] on the stack, but
      XATTR_CAPS_SZ is already * sizeof(__le32).
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NSerge E. Hallyn <serue@us.ibm.com>
      Cc: Andrew Morgan <morgan@kernel.org>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b68680e4
    • Y
      memory hotplug: make kmem_cache_node for SLUB on memory online avoid panic · b9049e23
      Yasunori Goto 提交于
      Fix a panic due to access NULL pointer of kmem_cache_node at discard_slab()
      after memory online.
      
      When memory online is called, kmem_cache_nodes are created for all SLUBs
      for new node whose memory are available.
      
      slab_mem_going_online_callback() is called to make kmem_cache_node() in
      callback of memory online event.  If it (or other callbacks) fails, then
      slab_mem_offline_callback() is called for rollback.
      
      In memory offline, slab_mem_going_offline_callback() is called to shrink
      all slub cache, then slab_mem_offline_callback() is called later.
      
      [akpm@linux-foundation.org: coding-style fixes]
      [akpm@linux-foundation.org: locking fix]
      [akpm@linux-foundation.org: build fix]
      Signed-off-by: NYasunori Goto <y-goto@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b9049e23
    • Y
      memory hotplug: rearrange memory hotplug notifier · 7b78d335
      Yasunori Goto 提交于
      Current memory notifier has some defects yet.  (Fortunately, nothing uses
      it.) This patch is to fix and rearrange for them.
      
        - Add information of start_pfn, nr_pages, and node id if node status is
          changes from/to memoryless node for callback functions.
          Callbacks can't do anything without those information.
        - Add notification going-online status.
          It is necessary for creating per node structure before the node's
          pages are available.
        - Move GOING_OFFLINE status notification after page isolation.
          It is good place for return memory like cache for callback,
          because returned page is not used again.
        - Make CANCEL events for rollingback when error occurs.
        - Delete MEM_MAPPING_INVALID notification. It will be not used.
        - Fix compile error of (un)register_memory_notifier().
      Signed-off-by: NYasunori Goto <y-goto@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7b78d335
    • R
    • J
      [SG] Add helpers for manipulating SG entries · 82f66fbe
      Jens Axboe 提交于
      We can then transition drivers without changing the generated code.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      82f66fbe
    • H
      V4L/DVB (6321): Remove obsolete VIDIOC_S/G_MPEGCOMP ioctls · 3bcc9576
      Hans Verkuil 提交于
      Remove the obsolete VIDIOC_G_MPEGCOMP and VIDIOC_S_MPEGCOMP ioctls from
      the V4L2 API as per the removal schedule (October 2007).
      Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      3bcc9576
    • M
      V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field · 22c4a4e9
      Mauro Carvalho Chehab 提交于
      struct video_device used to define a .hardware field. While
      initialized on severl drivers, this field is never used inside V4L.
      However, drivers using it need to include the old V4L1 header.
      
      This seems to cause compilation troubles with some random configs.
      Better just to remove it from all drivers.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      22c4a4e9
    • P
      [NET]: Cut off the queue_mapping field from sk_buff · e3fa259b
      Pavel Emelyanov 提交于
      Just hide it behind the #ifdef, because nobody wants
      it now.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3fa259b
    • P
      [NET]: Hide the queue_mapping field inside netif_subqueue_stopped · 668f895a
      Pavel Emelyanov 提交于
      Many places get the queue_mapping field from skb to pass it to the
      netif_subqueue_stopped() which will be 0 in any case.
      
      Make the helper that works with sk_buff
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      668f895a
    • P
      [NET]: Make and use skb_get_queue_mapping · 4e3ab47a
      Pavel Emelyanov 提交于
      Make the helper for getting the field, symmetrical to
      the "set" one. Return 0 if CONFIG_NETDEVICES_MULTIQUEUE=n
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4e3ab47a
    • J
      [INET]: Let inet_diag and friends autoload · 305e1e96
      Jean Delvare 提交于
      By adding module aliases to inet_diag, tcp_diag and dccp_diag, we let
      them load automatically as needed. This makes tools like "ss" run
      faster.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      305e1e96
    • H
      [NET]: Fix SKB_WITH_OVERHEAD calculation · deea84b0
      Herbert Xu 提交于
      The calculation in SKB_WITH_OVERHEAD is incorrect in that it can cause
      an overflow across a page boundary which is what it's meant to prevent.
      In particular, the header length (X) should not be lumped together with
      skb_shared_info.  The latter needs to be aligned properly while the header
      has no choice but to sit in front of wherever the payload is.
      
      Therefore the correct calculation is to take away the aligned size of
      skb_shared_info, and then subtract the header length.  The resulting
      quantity L satisfies the following inequality:
      
      	SKB_DATA_ALIGN(L + X) + sizeof(struct skb_shared_info) <= PAGE_SIZE
      
      This is the quantity used by alloc_skb to do the actual allocation.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      deea84b0