1. 29 6月, 2011 6 次提交
  2. 28 6月, 2011 34 次提交
    • N
      md: avoid endless recovery loop when waiting for fail device to complete. · 4274215d
      NeilBrown 提交于
      If a device fails in a way that causes pending request to take a while
      to complete, md will not be able to immediately remove it from the
      array in remove_and_add_spares.
      It will then incorrectly look like a spare device and md will try to
      recover it even though it is failed.
      This leads to a recovery process starting and instantly aborting over
      and over again.
      
      We should check if the device is faulty before considering it to be a
      spare.  This will avoid trying to start a recovery that cannot
      proceed.
      
      This bug was introduced in 2.6.26 so that patch is suitable for any
      kernel since then.
      
      Cc: stable@kernel.org
      Reported-by: NJim Paradis <james.paradis@stratus.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      4274215d
    • L
      Linux 3.0-rc5 · b0af8dfd
      Linus Torvalds 提交于
      b0af8dfd
    • H
      drm/i915: more struct_mutex locking · ecbec53b
      Hugh Dickins 提交于
      When auditing the locking in i915_gem.c (for a prospective change which
      I then abandoned), I noticed two places where struct_mutex is not held
      across GEM object manipulations that would usually require it.
      
      Since one is in initial setup and the other in driver unload, I'm
      guessing the mutex is not required for either; but post a patch in case
      it is.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Keith Packard <keithp@keithp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ecbec53b
    • H
      drm/i915: use shmem_truncate_range · e2377fe0
      Hugh Dickins 提交于
      The interface to ->truncate_range is changing very slightly: once "tmpfs:
      take control of its truncate_range" has been applied, this can be applied.
       For now there is only a slight inefficiency while this remains unapplied,
      but it will soon become essential for managing shmem's use of swap.
      
      Change i915_gem_object_truncate() to use shmem_truncate_range() directly:
      which should also spare i915 later change if we switch from
      inode_operations->truncate_range to file_operations->fallocate.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Keith Packard <keithp@keithp.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e2377fe0
    • H
      drm/i915: use shmem_read_mapping_page · 5949eac4
      Hugh Dickins 提交于
      Soon tmpfs will stop supporting ->readpage and read_cache_page_gfp(): once
      "tmpfs: add shmem_read_mapping_page_gfp" has been applied, this patch can
      be applied to ease the transition.
      
      Make i915_gem_object_get_pages_gtt() use shmem_read_mapping_page_gfp() in
      the one place it's needed; elsewhere use shmem_read_mapping_page(), with
      the mapping's gfp_mask properly initialized.
      
      Forget about __GFP_COLD: since tmpfs initializes its pages with memset,
      asking for a cold page is counter-productive.
      
      Include linux/shmem_fs.h also in drm_gem.c: with shmem_file_setup() now
      declared there too, we shall remove the prototype from linux/mm.h later.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Keith Packard <keithp@keithp.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5949eac4
    • H
      drm/ttm: use shmem_read_mapping_page · 3142b651
      Hugh Dickins 提交于
      Soon tmpfs will stop supporting ->readpage and read_mapping_page(): once
      "tmpfs: add shmem_read_mapping_page_gfp" has been applied, this patch can
      be applied to ease the transition.
      
      ttm_tt_swapin() and ttm_tt_swapout() use shmem_read_mapping_page() in
      place of read_mapping_page(), since their swap_space has been created with
      shmem_file_setup().
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3142b651
    • A
      drivers/tty/serial/8250_pci.c: fix warning · a39bce7b
      Andrew Morton 提交于
      Fis the warning
      
        drivers/tty/serial/8250_pci.c:1457: warning: initialization from incompatible pointer type
      
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a39bce7b
    • R
      drivers/misc/ioc4.c: fix section mismatch / race condition · 1fc6e987
      Ralf Baechle 提交于
      Fix this section mismatch:
      
        WARNING: drivers/misc/ioc4.o(.data+0x144): Section mismatch in reference from the variable ioc4_load_modules_work to the function .devinit.text:ioc4_load_modules()
        The variable ioc4_load_modules_work references
        the function __devinit ioc4_load_modules()
        If the reference is valid then annotate the
        variable with __init* or __refdata (see linux/init.h) or name the variable:
        *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
      
      This one is potentially fatal; by the time ioc4_load_modules is invoked
      it may already have been freed.  For that reason ioc4_load_modules_work
      can't be turned to __devinitdata but also because it's referenced in
      ioc4_exit.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NBrent Casavant <bcasavan@sgi.com>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1fc6e987
    • R
      drivers/leds/leds-lp5523.c: fix section mismatches · 33721bd3
      Ralf Baechle 提交于
      Fix this section mismatch:
      
        WARNING: drivers/leds/leds-lp5523.o(.text+0x12f4): Section mismatch in reference from the function lp5523_probe() to the function .init.text:lp5523_init_led()
        The function lp5523_probe() references
        the function __init lp5523_init_led().
        This is often because lp5523_probe lacks a __init
        annotation or the annotation of lp5523_init_led is wrong.
      
      Fixing this one triggers one more mismatch, fix that one as well.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      33721bd3
    • R
      drivers/leds/leds-lp5521.c: fix section mismatches · 5286bd95
      Ralf Baechle 提交于
      Fix this section mismatch:
      
        WARNING: drivers/leds/leds-lp5521.o(.text+0xf2c): Section mismatch in reference from the function lp5521_probe() to the function .init.text:lp5521_init_led()
        The function lp5521_probe() references
        the function __init lp5521_init_led().
        This is often because lp5521_probe lacks a __init
        annotation or the annotation of lp5521_init_led is wrong.
      
      Fixing this mismatch triggers one more mismatch, fix that one as well.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5286bd95
    • K
      memcg: fix direct softlimit reclaim to be called in limit path · ac34a1a3
      KAMEZAWA Hiroyuki 提交于
      Commit d149e3b2 ("memcg: add the soft_limit reclaim in global direct
      reclaim") adds a softlimit hook to shrink_zones().  By this, soft limit
      is called as
      
         try_to_free_pages()
             do_try_to_free_pages()
                 shrink_zones()
                     mem_cgroup_soft_limit_reclaim()
      
      Then, direct reclaim is memcg softlimit hint aware, now.
      
      But, the memory cgroup's "limit" path can call softlimit shrinker.
      
         try_to_free_mem_cgroup_pages()
             do_try_to_free_pages()
                 shrink_zones()
                     mem_cgroup_soft_limit_reclaim()
      
      This will cause a global reclaim when a memcg hits limit.
      
      This is bug. soft_limit_reclaim() should be called when
      scanning_global_lru(sc) == true.
      
      And the commit adds a variable "total_scanned" for counting softlimit
      scanned pages....it's not "total".  This patch removes the variable and
      update sc->nr_scanned instead of it.  This will affect shrink_slab()'s
      scan condition but, global LRU is scanned by softlimit and I think this
      change makes sense.
      
      TODO: avoid too much scanning of a zone when softlimit did enough work.
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
      Cc: Ying Han <yinghan@google.com>
      Cc: Michal Hocko <mhocko@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ac34a1a3
    • V
      taskstats: don't allow duplicate entries in listener mode · 26c4caea
      Vasiliy Kulikov 提交于
      Currently a single process may register exit handlers unlimited times.
      It may lead to a bloated listeners chain and very slow process
      terminations.
      
      Eg after 10KK sent TASKSTATS_CMD_ATTR_REGISTER_CPUMASKs ~300 Mb of
      kernel memory is stolen for the handlers chain and "time id" shows 2-7
      seconds instead of normal 0.003.  It makes it possible to exhaust all
      kernel memory and to eat much of CPU time by triggerring numerous exits
      on a single CPU.
      
      The patch limits the number of times a single process may register
      itself on a single CPU to one.
      
      One little issue is kept unfixed - as taskstats_exit() is called before
      exit_files() in do_exit(), the orphaned listener entry (if it was not
      explicitly deregistered) is kept until the next someone's exit() and
      implicit deregistration in send_cpu_listeners().  So, if a process
      registered itself as a listener exits and the next spawned process gets
      the same pid, it would inherit taskstats attributes.
      Signed-off-by: NVasiliy Kulikov <segooon@gmail.com>
      Cc: Balbir Singh <bsingharora@gmail.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      26c4caea
    • J
      mm: fix assertion mapping->nrpages == 0 in end_writeback() · 08142579
      Jan Kara 提交于
      Under heavy memory and filesystem load, users observe the assertion
      mapping->nrpages == 0 in end_writeback() trigger.  This can be caused by
      page reclaim reclaiming the last page from a mapping in the following
      race:
      
      	CPU0				CPU1
        ...
        shrink_page_list()
          __remove_mapping()
            __delete_from_page_cache()
              radix_tree_delete()
      					evict_inode()
      					  truncate_inode_pages()
      					    truncate_inode_pages_range()
      					      pagevec_lookup() - finds nothing
      					  end_writeback()
      					    mapping->nrpages != 0 -> BUG
              page->mapping = NULL
              mapping->nrpages--
      
      Fix the problem by doing a reliable check of mapping->nrpages under
      mapping->tree_lock in end_writeback().
      
      Analyzed by Jay <jinshan.xiong@whamcloud.com>, lost in LKML, and dug out
      by Miklos Szeredi <mszeredi@suse.de>.
      
      Cc: Jay <jinshan.xiong@whamcloud.com>
      Cc: Miklos Szeredi <mszeredi@suse.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      08142579
    • P
      mm/memory-failure.c: fix spinlock vs mutex order · 9b679320
      Peter Zijlstra 提交于
      We cannot take a mutex while holding a spinlock, so flip the order and
      fix the locking documentation.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9b679320
    • J
      drivers/misc/lkdtm.c: fix race when crashpoint is hit multiple times before checking count · aa2c96d6
      Josh Hunt 提交于
      We observed the crash point count going negative in cases where the
      crash point is hit multiple times before the check of "count == 0" is
      done.  Because of this we never call lkdtm_do_action().  This patch just
      adds a spinlock to protect count.
      Reported-by: NTapan Dhimant <tdhimant@akamai.com>
      Signed-off-by: NJosh Hunt <johunt@akamai.com>
      Acked-by: NAnkita Garg <ankita@in.ibm.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      aa2c96d6
    • C
      include/linux/compat.h: declare compat_sys_sendmmsg() · 507c5f12
      Chris Metcalf 提交于
      This is required for tilegx to be able to use the compat unistd.h header
      where compat_sys_sendmmsg() is now mentioned.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      507c5f12
    • B
      romfs: fix romfs_get_unmapped_area() argument check · 2b4b2482
      Bob Liu 提交于
      romfs_get_unmapped_area() checks argument `len' without considering
      PAGE_ALIGN which will cause do_mmap_pgoff() return -EINVAL error after
      commit f67d9b15 ("nommu: add page_align to mmap").
      
      Fix the check by changing it in same way ramfs_nommu_get_unmapped_area()
      was changed in ramfs/file-nommu.c.
      Signed-off-by: NBob Liu <lliubbo@gmail.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Acked-by: NGreg Ungerer <gerg@snapgear.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2b4b2482
    • R
      um: add asm/percpu.h · 8c95aa60
      Richard Weinberger 提交于
      To make SLUB work on UML we need this_cpu_cmpxchg from
      asm-generic/percpu.h.
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8c95aa60
    • P
      drivers/rtc/rtc-ds1307.c: add support for RTC device pt7c4338 · 31c1771c
      Priyanka Jain 提交于
      PT7C4338 chip is being manufactured by Pericom Technology Inc.  It is a
      serial real-time clock which provides:
      
      1) Low-power clock/calendar.
      2) Programmable square-wave output.
      
      It has 56 bytes of nonvolatile RAM.  Its register set is same as that of
      rtc device: DS1307.
      Signed-off-by: NPriyanka Jain <Priyanka.Jain@freescale.com>
      Acked-by: NTimur Tabi <timur@freescale.com>
      Reviewed-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      31c1771c
    • H
      tmpfs: add shmem_read_mapping_page_gfp · d9d90e5e
      Hugh Dickins 提交于
      Although it is used (by i915) on nothing but tmpfs, read_cache_page_gfp()
      is unsuited to tmpfs, because it inserts a page into pagecache before
      calling the filesystem's ->readpage: tmpfs may have pages in swapcache
      which only it knows how to locate and switch to filecache.
      
      At present tmpfs provides a ->readpage method, and copes with this by
      copying pages; but soon we can simplify it by removing its ->readpage.
      Provide shmem_read_mapping_page_gfp() now, ready for that transition,
      
      Export shmem_read_mapping_page_gfp() and add it to list in shmem_fs.h,
      with shmem_read_mapping_page() inline for the common mapping_gfp case.
      
      (shmem_read_mapping_page_gfp or shmem_read_cache_page_gfp? Generally the
      read_mapping_page functions use the mapping's ->readpage, and the
      read_cache_page functions use the supplied filler, so I think
      read_cache_page_gfp was slightly misnamed.)
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d9d90e5e
    • H
      tmpfs: take control of its truncate_range · 94c1e62d
      Hugh Dickins 提交于
      2.6.35's new truncate convention gave tmpfs the opportunity to control
      its file truncation, no longer enforced from outside by vmtruncate().
      We shall want to build upon that, to handle pagecache and swap together.
      
      Slightly redefine the ->truncate_range interface: let it now be called
      between the unmap_mapping_range()s, with the filesystem responsible for
      doing the truncate_inode_pages_range() from it - just as the filesystem
      is nowadays responsible for doing that from its ->setattr.
      
      Let's rename shmem_notify_change() to shmem_setattr().  Instead of
      calling the generic truncate_setsize(), bring that code in so we can
      call shmem_truncate_range() - which will later be updated to perform its
      own variant of truncate_inode_pages_range().
      
      Remove the punch_hole unmap_mapping_range() from shmem_truncate_range():
      now that the COW's unmap_mapping_range() comes after ->truncate_range,
      there is no need to call it a third time.
      
      Export shmem_truncate_range() and add it to the list in shmem_fs.h, so
      that i915_gem_object_truncate() can call it explicitly in future; get
      this patch in first, then update drm/i915 once this is available (until
      then, i915 will just be doing the truncate_inode_pages() twice).
      
      Though introduced five years ago, no other filesystem is implementing
      ->truncate_range, and its only other user is madvise(,,MADV_REMOVE): we
      expect to convert it to fallocate(,FALLOC_FL_PUNCH_HOLE,,) shortly,
      whereupon ->truncate_range can be removed from inode_operations -
      shmem_truncate_range() will help i915 across that transition too.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      94c1e62d
    • H
      mm: move shmem prototypes to shmem_fs.h · 072441e2
      Hugh Dickins 提交于
      Before adding any more global entry points into shmem.c, gather such
      prototypes into shmem_fs.h.  Remove mm's own declarations from swap.h,
      but for now leave the ones in mm.h: because shmem_file_setup() and
      shmem_zero_setup() are called from various places, and we should not
      force other subsystems to update immediately.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      072441e2
    • H
      mm: move vmtruncate_range to truncate.c · 5b8ba101
      Hugh Dickins 提交于
      You would expect to find vmtruncate_range() next to vmtruncate() in
      mm/truncate.c: move it there.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Acked-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5b8ba101
    • V
      Fix some kernel-doc warnings · 4d258b25
      Vitaliy Ivanov 提交于
      Fix 'make htmldocs' warnings:
      
        Warning(/include/linux/hrtimer.h:153): No description found for parameter 'clockid'
        Warning(/include/linux/device.h:604): Excess struct/union/enum/typedef member 'of_match' description in 'device'
        Warning(/include/net/sock.h:349): Excess struct/union/enum/typedef member 'sk_rmem_alloc' description in 'sock'
      Signed-off-by: NVitaliy Ivanov <vitalivanov@gmail.com>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4d258b25
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc · a64227b0
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
        mmc: queue: bring discard_granularity/alignment into line with SCSI
        mmc: queue: append partition subname to queue thread name
        mmc: core: make erase timeout calculation allow for gated clock
        mmc: block: switch card to User Data Area when removing the block driver
        mmc: sdio: reset card during power_restore
        mmc: cb710: fix #ifdef HAVE_EFFICIENT_UNALIGNED_ACCESS
        mmc: sdhi: DMA slave ID 0 is invalid
        mmc: tmio: fix regression in TMIO_MMC_WRPROTECT_DISABLE handling
        mmc: omap_hsmmc: use original sg_len for dma_unmap_sg
        mmc: omap_hsmmc: fix ocr mask usage
        mmc: sdio: fix runtime PM path during driver removal
        mmc: Add PCI fixup quirks for Ricoh 1180:e823 reader
        mmc: sdhi: fix module unloading
        mmc: of_mmc_spi: add NO_IRQ define to of_mmc_spi.c
        mmc: vub300: fix null dereferences in error handling
      a64227b0
    • G
      Staging: comedi: fix build breakages on some platforms · a73738e9
      Greg Kroah-Hartman 提交于
      Some platforms do not have virt_to_bus(), so properly depend on
      CONFIG_VIRT_TO_BUS for the Comedi drivers that need this function.
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a73738e9
    • G
      Staging: brcm80211: disable drivers except for X86 or MIPS platforms · d4620396
      Greg Kroah-Hartman 提交于
      As David points out, the driver is also broken on SPARC, so might
      as well just only enable it on platforms where people have reported it
      working, instead of trying to list all of the ones where it doesn't
      work, as the working platform list is much smaller...
      Reported-by: NDavid Miller <davem@davemloft.net>
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Henry Ptasinski <henryp@broadcom.com>
      Cc: Brett Rudley <brudley@broadcom.com>
      Cc: Roland Vossen <rvossen@broadcom.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d4620396
    • G
      Staging: brcm80211: disable drivers for PPC platforms · 15e5201d
      Greg Kroah-Hartman 提交于
      Right now, bad things happen if you try to build these drivers for the
      PPC platform as it seems that the code only has been tested and built on
      the MIPS big endian platform.
      
      So disable it on the PPC32 and PPC64 platforms for now, hopefully this
      will be resolved in the future as I'm sure someone will want to use
      these chips with that platform someday.
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Henry Ptasinski <henryp@broadcom.com>
      Cc: Brett Rudley <brudley@broadcom.com>
      Cc: Roland Vossen <rvossen@broadcom.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      15e5201d
    • G
      Staging: iio: Make IIO depend on GENERIC_HARDIRQS · 928f9111
      Geert Uytterhoeven 提交于
      On m68k (which doesn't support generic hardirqs yet):
      
      drivers/staging/iio/industrialio-trigger.c: In function ‘iio_trigger_poll’:
      drivers/staging/iio/industrialio-trigger.c:180: error: implicit declaration of function ‘generic_handle_irq’
      drivers/staging/iio/industrialio-trigger.c: In function ‘iio_trigger_poll_chained’:
      drivers/staging/iio/industrialio-trigger.c:200: error: implicit declaration of function ‘handle_nested_irq’
      drivers/staging/iio/industrialio-trigger.c: In function ‘iio_trig_release’:
      drivers/staging/iio/industrialio-trigger.c:379: error: implicit declaration of function ‘irq_modify_status’
      drivers/staging/iio/industrialio-trigger.c:382: error: implicit declaration of function ‘irq_set_chip’
      drivers/staging/iio/industrialio-trigger.c:384: error: implicit declaration of function ‘irq_set_handler’
      drivers/staging/iio/industrialio-trigger.c:388: error: implicit declaration of function ‘irq_free_descs’
      drivers/staging/iio/industrialio-trigger.c: In function ‘iio_trig_subirqmask’:
      drivers/staging/iio/industrialio-trigger.c:402: error: implicit declaration of function ‘irq_data_get_irq_chip’
      drivers/staging/iio/industrialio-trigger.c:402: warning: initialization makes pointer from integer without a cast
      drivers/staging/iio/industrialio-trigger.c: In function ‘iio_trig_subirqunmask’:
      drivers/staging/iio/industrialio-trigger.c:411: warning: initialization makes pointer from integer without a cast
      drivers/staging/iio/industrialio-trigger.c: In function ‘iio_allocate_trigger’:
      drivers/staging/iio/industrialio-trigger.c:432: error: implicit declaration of function ‘irq_alloc_descs’
      drivers/staging/iio/industrialio-trigger.c:455: error: ‘handle_simple_irq’ undeclared (first use in this function)
      drivers/staging/iio/industrialio-trigger.c:455: error: (Each undeclared identifier is reported only once
      drivers/staging/iio/industrialio-trigger.c:455: error: for each function it appears in.)
      
      Hence IIO_TRIGGER should depend on GENERIC_HARDIRQS.
      But as IIO_TRIGGER and IIO_RING_BUFFER form a maze of dependencies and selects,
      just make the whole IIO subsystem depend on GENERIC_HARDIRQS.
      
      This dependency also covers !S390, so that one can be removed again.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NJonathan Cameron <jic23@cam.ac.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      928f9111
    • T
      Staging: mei: fix suspend failure · a534bb6e
      Tomas Winkler 提交于
      wait_event_interruptible_timeout return value was wrongly used.
      The remaining timeout was used as the error code.
      This fix translated wait_event_interruptible_timeout return value
      into error code that can be propagated.
      
      [10291.674121] pci_pm_suspend(): mei_pci_suspend+0x0/0x8b [mei] returns 2500
      It's thinkpad t400 with
      00:03.0 Communication controller [0780]: Intel Corporation Mobile 4 Series Chipset MEI Controller [8086:2a44] (rev 07)
      Reported-by: NArkadiusz Miskiewicz <a.miskiewicz@gmail.com>
      Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a534bb6e
    • R
      Staging: fix iio builds when IIO_RING_BUFFER is not enabled · fdf2df0e
      Randy Dunlap 提交于
      Fix build by moving enum list outside of
      #ifdef CONFIG_IIO_RING_BUFFER.
      
      drivers/staging/iio/accel/adis16201_core.c:413: error: 'ADIS16201_SCAN_SUPPLY' undeclared here (not in a function)
      drivers/staging/iio/accel/adis16201_core.c:417: error: 'ADIS16201_SCAN_TEMP' undeclared here (not in a function)
      drivers/staging/iio/accel/adis16201_core.c:422: error: 'ADIS16201_SCAN_ACC_X' undeclared here (not in a function)
      drivers/staging/iio/accel/adis16201_core.c:427: error: 'ADIS16201_SCAN_ACC_Y' undeclared here (not in a function)
      drivers/staging/iio/accel/adis16201_core.c:432: error: 'ADIS16201_SCAN_AUX_ADC' undeclared here (not in a function)
      drivers/staging/iio/accel/adis16201_core.c:436: error: 'ADIS16201_SCAN_INCLI_X' undeclared here (not in a function)
      drivers/staging/iio/accel/adis16201_core.c:441: error: 'ADIS16201_SCAN_INCLI_Y' undeclared here (not in a function)
      
      vers/staging/iio/accel/adis16203_core.c:374: error: 'ADIS16203_SCAN_SUPPLY' undeclared here (not in a function)
      drivers/staging/iio/accel/adis16203_core.c:378: error: 'ADIS16203_SCAN_AUX_ADC' undeclared here (not in a function)
      drivers/staging/iio/accel/adis16203_core.c:382: error: 'ADIS16203_SCAN_INCLI_X' undeclared here (not in a function)
      drivers/staging/iio/accel/adis16203_core.c:388: error: 'ADIS16203_SCAN_INCLI_Y' undeclared here (not in a function)
      drivers/staging/iio/accel/adis16203_core.c:392: error: 'ADIS16203_SCAN_TEMP' undeclared here (not in a function)
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: NJonathan Cameron <jic23@cam.ac.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fdf2df0e
    • R
      Staging: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE · 6fab3e1f
      Ralf Baechle 提交于
      On architectures that don't define PAGE_KERNEL_NOCACHE, the Comedi driver turns
      into tragedy:
      
        CC [M]  drivers/staging/comedi/drivers.o
      drivers/staging/comedi/drivers.c: In function ‘comedi_buf_alloc’:
      drivers/staging/comedi/drivers.c:505:41: error: ‘PAGE_KERNEL_NOCACHE’ undeclared (first use in this function)
      drivers/staging/comedi/drivers.c:505:41: note: each undeclared identifier is rep orted only once for each function it appears in
      make[3]: *** [drivers/staging/comedi/drivers.o] Error 1
      
      Restrict the driver to only those architectures that define PAGE_KERNEL_NOCACHE.
      
      PAGE_KERNEL_NOCACHE is a kludge - some system architectures such as SGI IP27
      are even uable to offer uncached operation - at least in the way an unwitting
      driver might assume.  I haven't looked in details how the driver is using
      the area vmaped with PAGE_KERNEL_NOCACHE but maybe doing it XFS-style using
      cached memory and the flush_kernel_vmap_range / invalidate_kernel_vmap_range
      APIs in conjunction with the DMA API is a practical alternative.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Reported-by: NDavid Miller <davem@davemloft.net>
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Martyn Welch <martyn.welch@ge.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6fab3e1f
    • R
      Staging: fix more iio builds when IIO_RING_BUFFER is not enabled · 89089158
      Randy Dunlap 提交于
      Fix lots more build errors in staging/iio when CONFIG_IIO_RING_BUFFER
      is not enabled by moving enums and defines outside of the
      CONFIG_IIO_RING_BUFFER ifdef block.
      
      Examples (one from each driver; there were 116 total errors):
      
      drivers/staging/iio/accel/adis16204_core.c:437: error: 'ADIS16204_SCAN_SUPPLY' undeclared here (not in a function)
      drivers/staging/iio/accel/adis16209_core.c:410: error: 'ADIS16209_SCAN_SUPPLY' undeclared here (not in a function)
      drivers/staging/iio/gyro/adis16260_core.c:420: error: 'ADIS16260_SCAN_GYRO' undeclared here (not in a function)
      drivers/staging/iio/imu/adis16400_core.c:565: error: 'ADIS16400_SCAN_SUPPLY' undeclared here (not in a function)
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: NJonathan Cameron <jic23@cam.ac.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      89089158
    • K
      Fix node_start/end_pfn() definition for mm/page_cgroup.c · c6830c22
      KAMEZAWA Hiroyuki 提交于
      commit 21a3c964 uses node_start/end_pfn(nid) for detection start/end
      of nodes. But, it's not defined in linux/mmzone.h but defined in
      /arch/???/include/mmzone.h which is included only under
      CONFIG_NEED_MULTIPLE_NODES=y.
      
      Then, we see
        mm/page_cgroup.c: In function 'page_cgroup_init':
        mm/page_cgroup.c:308: error: implicit declaration of function 'node_start_pfn'
        mm/page_cgroup.c:309: error: implicit declaration of function 'node_end_pfn'
      
      So, fixiing page_cgroup.c is an idea...
      
      But node_start_pfn()/node_end_pfn() is a very generic macro and
      should be implemented in the same manner for all archs.
      (m32r has different implementation...)
      
      This patch removes definitions of node_start/end_pfn() in each archs
      and defines a unified one in linux/mmzone.h. It's not under
      CONFIG_NEED_MULTIPLE_NODES, now.
      
      A result of macro expansion is here (mm/page_cgroup.c)
      
      for !NUMA
       start_pfn = ((&contig_page_data)->node_start_pfn);
        end_pfn = ({ pg_data_t *__pgdat = (&contig_page_data); __pgdat->node_start_pfn + __pgdat->node_spanned_pages;});
      
      for NUMA (x86-64)
        start_pfn = ((node_data[nid])->node_start_pfn);
        end_pfn = ({ pg_data_t *__pgdat = (node_data[nid]); __pgdat->node_start_pfn + __pgdat->node_spanned_pages;});
      
      Changelog:
       - fixed to avoid using "nid" twice in node_end_pfn() macro.
      Reported-and-acked-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Reported-and-tested-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NMel Gorman <mgorman@suse.de>
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c6830c22