1. 18 Mar, 2013 3 commits
  2. 11 Mar, 2013 1 commit
  3. 07 Mar, 2013 1 commit
    • Johannes Berg's avatar
      mac80211: provide ieee80211_sta_eosp() · e943789e
      Johannes Berg authored
      The irqsafe version ieee80211_sta_eosp_irqsafe() exists, but
      drivers must not mix calls to any irqsafe/non-irqsafe function.
      Both ath9k and iwlwifi, the likely first users of this interface,
      use non-irqsafe RX/TX/TX status so must also use a non-irqsafe
      version of this function. Since no driver uses the _irqsafe()
      version, remove that.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  4. 06 Mar, 2013 15 commits
  5. 02 Mar, 2013 7 commits
    • James Hogan's avatar
      mm: define VM_GROWSUP for CONFIG_METAG · 9ca52ed9
      James Hogan authored
      Commit cc2383ec
       ("mm: introduce
      arch-specific vma flag VM_ARCH_1") merged in v3.7-rc1.
      The above commit combined several arch-specific vma flags into one, and
      in the process it changed the VM_GROWSUP definition to depend on
      specific architectures rather than CONFIG_STACK_GROWSUP. Therefore add
      an ifdef for CONFIG_METAG to also set VM_GROWSUP.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: linux-mm@kvack.org
    • James Hogan's avatar
      metag: Internal and external irqchips · 5698c50d
      James Hogan authored
      Meta core internal interrupts (from HWSTATMETA and friends) are vectored
      onto the TR1 core trigger for the current thread. This is demultiplexed
      in irq-metag.c to individual Linux IRQs for each internal interrupt.
      External SoC interrupts (from HWSTATEXT and friends) are vectored onto
      the TR2 core trigger for the current thread. This is demultiplexed in
      irq-metag-ext.c to individual Linux IRQs for each external SoC interrupt.
      The external irqchip has devicetree bindings for configuring the number
      of irq banks and the type of masking available.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Rob Landley <rob@landley.net>
      Cc: Dom Cobley <popcornmix@gmail.com>
      Cc: Simon Arlott <simon@fire.lp0.eu>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: devicetree-discuss@lists.ozlabs.org
      Cc: linux-doc@vger.kernel.org
    • James Hogan's avatar
      metag: Time keeping · a2c5d4ed
      James Hogan authored
      Add time keeping code for metag. Meta hardware threads have 2 timers.
      The background timer (TXTIMER) is used as a free-running time base, and
      the interrupt timer (TXTIMERI) is used for the timer interrupt. Both
      counters traditionally count at approximately 1MHz.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: John Stultz <johnstul@us.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
    • James Hogan's avatar
      metag: ptrace · bc3966bf
      James Hogan authored
      The ptrace interface for metag provides access to some core register
      sets using the PTRACE_GETREGSET and PTRACE_SETREGSET operations. The
      details of the internal context structures is abstracted into user API
      structures to both ease use and allow flexibility to change the internal
      context layouts. Copyin and copyout functions for these register sets
      are exposed to allow signal handling code to use them to copy to and
      from the signal context.
      struct user_gp_regs (NT_PRSTATUS) provides access to the core general
      purpose register context.
      struct user_cb_regs (NT_METAG_CBUF) provides access to the TXCATCH*
      registers which contains information abuot a memory fault, unaligned
      access error or watchpoint. This can be modified to alter the way the
      fault is replayed on resume ("catch replay"), or to prevent the replay
      taking place.
      struct user_rp_state (NT_METAG_RPIPE) provides access to the state of
      the Meta read pipeline which can be used to hide memory latencies in
      hand optimised data loops.
      Extended DSP register state, DSP RAM, and hardware breakpoint registers
      aren't yet exposed through ptrace.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Denys Vlasenko <vda.linux@googlemail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
    • James Hogan's avatar
      asm-generic/unistd.h: handle symbol prefixes in cond_syscall · 4dd3c959
      James Hogan authored
      Some architectures have symbol prefixes and set CONFIG_SYMBOL_PREFIX,
      but this wasn't taken into account by the generic cond_syscall. It's
      easy enough to fix in a generic fashion, so add the symbol prefix to
      symbol names in cond_syscall when CONFIG_SYMBOL_PREFIX is set.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
    • James Hogan's avatar
      asm-generic/io.h: check CONFIG_VIRT_TO_BUS · c93d0312
      James Hogan authored
      Make asm-generic/io.h check CONFIG_VIRT_TO_BUS before defining
      virt_to_bus() and bus_to_virt(), otherwise it's easy to accidentally
      have a silently failing incorrect direct mapped definition rather then
      no definition at all.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
    • Yinghai Lu's avatar
      x86, ACPI, mm: Revert movablemem_map support · 20e6926d
      Yinghai Lu authored
      Tim found:
        WARNING: at arch/x86/kernel/smpboot.c:324 topology_sane.isra.2+0x6f/0x80()
        Hardware name: S2600CP
        sched: CPU #1's llc-sibling CPU #0 is not on the same node! [node: 1 != 0]. Ignoring dependency.
        smpboot: Booting Node   1, Processors  #1
        Modules linked in:
        Pid: 0, comm: swapper/1 Not tainted 3.9.0-0-generic #1
        Call Trace:
      Don Morris reproduced on a HP z620 workstation, and bisected it to
      commit e8d19552 ("acpi, memory-hotplug: parse SRAT before memblock
      is ready")
      It turns out movable_map has some problems, and it breaks several things
      1. numa_init is called several times, NOT just for srat. so those
      	memset(&numa_meminfo, 0, sizeof(numa_meminfo))
         can not be just removed.  Need to consider sequence is: numaq, srat, amd, dummy.
         and make fall back path working.
      2. simply split acpi_numa_init to early_parse_srat.
         a. that early_parse_srat is NOT called for ia64, so you break ia64.
         b.  for (i = 0; i < MAX_LOCAL_APIC; i++)
      	     set_apicid_to_node(i, NUMA_NO_NODE)
           still left in numa_init. So it will just clear result from early_parse_srat.
           it should be moved before that....
         c.  it breaks ACPI_TABLE_OVERIDE...as the acpi table scan is moved
             early before override from INITRD is settled.
      3. that patch TITLE is total misleading, there is NO x86 in the title,
         but it changes critical x86 code. It caused x86 guys did not
         pay attention to find the problem early. Those patches really should
         be routed via tip/x86/mm.
      4. after that commit, following range can not use movable ram:
        a. real_mode code.... well..funny, legacy Node0 [0,1M) could be hot-removed?
        b. initrd... it will be freed after booting, so it could be on movable...
        c. crashkernel for kdump...: looks like we can not put kdump kernel above 4G
        d. init_mem_mapping: can not put page table high anymore.
        e. initmem_init: vmemmap can not be high local node anymore. That is
           not good.
      If node is hotplugable, the mem related range like page table and
      vmemmap could be on the that node without problem and should be on that
      We have workaround patch that could fix some problems, but some can not
      be fixed.
      So just remove that offending commit and related ones including:
       f7210e6c ("mm/memblock.c: use CONFIG_HAVE_MEMBLOCK_NODE_MAP to
          protect movablecore_map in memblock_overlaps_region().")
       01a178a9 ("acpi, memory-hotplug: support getting hotplug info from
       27168d38 ("acpi, memory-hotplug: extend movablemem_map ranges to
          the end of node")
       e8d19552 ("acpi, memory-hotplug: parse SRAT before memblock is
       fb06bc8e ("page_alloc: bootmem limit with movablecore_map")
       42f47e27 ("page_alloc: make movablemem_map have higher priority")
       6981ec31 ("page_alloc: introduce zone_movable_limit[] to keep
          movable limit for nodes")
       34b71f1e ("page_alloc: add movable_memmap kernel parameter")
       ("x86: get pg_data_t's memory from other node")
      Later we should have patches that will make sure kernel put page table
      and vmemmap on local node ram instead of push them down to node0.  Also
      need to find way to put other kernel used ram to local node ram.
      Reported-by: default avatarTim Gardner <tim.gardner@canonical.com>
      Reported-by: default avatarDon Morris <don.morris@hp.com>
      Bisected-by: default avatarDon Morris <don.morris@hp.com>
      Tested-by: default avatarDon Morris <don.morris@hp.com>
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Thomas Renninger <trenn@suse.de>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Tang Chen <tangchen@cn.fujitsu.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  6. 01 Mar, 2013 12 commits
    • Al Viro's avatar
    • Al Viro's avatar
      cache the value of file_inode() in struct file · dd37978c
      Al Viro authored
      Note that this thing does *not* contribute to inode refcount;
      it's pinned down by dentry.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    • Alasdair G Kergon's avatar
      dm: add target num_write_bios fn · b0d8ed4d
      Alasdair G Kergon authored
      Add a num_write_bios function to struct target.
      If an instance of a target sets this, it will be queried before the
      target's mapping function is called on a write bio, and the response
      controls the number of copies of the write bio that the target will
      This provides a convenient way for a target to send the same data to
      more than one device.  The new cache target uses this in writethrough
      mode, to send the data both to the cache and the backing device.
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    • Mikulas Patocka's avatar
      dm kcopyd: introduce configurable throttling · df5d2e90
      Mikulas Patocka authored
      This patch allows the administrator to reduce the rate at which kcopyd
      issues I/O.
      Each module that uses kcopyd acquires a throttle parameter that can be
      set in /sys/module/*/parameters.
      We maintain a history of kcopyd usage by each module in the variables
      io_period and total_period in struct dm_kcopyd_throttle. The actual
      kcopyd activity is calculated as a percentage of time equal to
      "(100 * io_period / total_period)".  This is compared with the user-defined
      throttle percentage threshold and if it is exceeded, we sleep.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    • Mikulas Patocka's avatar
      dm ioctl: allow message to return data · a2606241
      Mikulas Patocka authored
      This patch introduces enhanced message support that allows the
      device-mapper core to recognise messages that are common to all devices,
      and for messages to return data to userspace.
      Core messages are processed by the function "message_for_md".  If the
      device mapper doesn't support the message, it is passed to the target
      If the message returns data, the kernel sets the flag
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    • Mikulas Patocka's avatar
      dm ioctl: optimize functions without variable params · 02cde50b
      Mikulas Patocka authored
      Device-mapper ioctls receive and send data in a buffer supplied
      by userspace.  The buffer has two parts.  The first part contains
      a 'struct dm_ioctl' and has a fixed size.  The second part depends
      on the ioctl and has a variable size.
      This patch recognises the specific ioctls that do not use the variable
      part of the buffer and skips allocating memory for it.
      In particular, when a device is suspended and a resume ioctl is sent,
      this now avoid memory allocation completely.
      The variable "struct dm_ioctl tmp" is moved from the function
      copy_params to its caller ctl_ioctl and renamed to param_kernel.
      It is used directly when the ioctl function doesn't need any arguments.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    • Alasdair G Kergon's avatar
      dm: rename request variables to bios · 55a62eef
      Alasdair G Kergon authored
      Use 'bio' in the name of variables and functions that deal with
      bios rather than 'request' to avoid confusion with the normal
      block layer use of 'request'.
      No functional changes.
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    • Mikulas Patocka's avatar
      dm: fix truncated status strings · fd7c092e
      Mikulas Patocka authored
      Avoid returning a truncated table or status string instead of setting
      the DM_BUFFER_FULL_FLAG when the last target of a table fills the
      When processing a table or status request, the function retrieve_status
      calls ti->type->status. If ti->type->status returns non-zero,
      retrieve_status assumes that the buffer overflowed and sets
      However, targets don't return non-zero values from their status method
      on overflow. Most targets returns always zero.
      If a buffer overflow happens in a target that is not the last in the
      table, it gets noticed during the next iteration of the loop in
      retrieve_status; but if a buffer overflow happens in the last target, it
      goes unnoticed and erroneously truncated data is returned.
      In the current code, the targets behave in the following way:
      * dm-crypt returns -ENOMEM if there is not enough space to store the
        key, but it returns 0 on all other overflows.
      * dm-thin returns errors from the status method if a disk error happened.
        This is incorrect because retrieve_status doesn't check the error
        code, it assumes that all non-zero values mean buffer overflow.
      * all the other targets always return 0.
      This patch changes the ti->type->status function to return void (because
      most targets don't use the return code). Overflow is detected in
      retrieve_status: if the status method fills up the remaining space
      completely, it is assumed that buffer overflow happened.
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    • Randy Dunlap's avatar
      hsi: fix kernel-doc warnings · 8eae508b
      Randy Dunlap authored
      Fix kernel-doc warnings in hsi files:
        Warning(include/linux/hsi/hsi.h:136): Excess struct/union/enum/typedef member 'e_handler' description in 'hsi_client'
        Warning(include/linux/hsi/hsi.h:136): Excess struct/union/enum/typedef member 'pclaimed' description in 'hsi_client'
        Warning(include/linux/hsi/hsi.h:136): Excess struct/union/enum/typedef member 'nb' description in 'hsi_client'
        Warning(drivers/hsi/hsi.c:434): No description found for parameter 'handler'
        Warning(drivers/hsi/hsi.c:434): Excess function parameter 'cb' description in 'hsi_register_port_event'
      Don't document "private:" fields with kernel-doc notation.
      If you want to leave them fully documented, that's OK, but
      then don't mark them as "private:".
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Carlos Chinea <carlos.chinea@nokia.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-omap@vger.kernel.org
      Acked-by: default avatarNishanth Menon <nm@ti.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Fabio Porcedda's avatar
      watchdog: core: dt: add support for the timeout-sec dt property · 3048253e
      Fabio Porcedda authored
      Add support for watchdog drivers to initialize/set the timeout field
      of the watchdog_device structure. The timeout field is initialised
      either with the module timeout parameter value (if valid) or with the
      timeout-sec dt property (if valid). If both are invalid the initial
      value is unchanged.
      Signed-off-by: default avatarFabio Porcedda <fabio.porcedda@gmail.com>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
    • Hauke Mehrtens's avatar
      watchdog: bcm47xx_wdt.c: use platform device · f82dedf8
      Hauke Mehrtens authored
      Instead of accessing the function to set the watchdog timer directly,
      register a platform driver the platform could register to use this
      watchdog driver.
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
    • Wolfram Sang's avatar
      rtc: stmp3xxx: add wdt-accessor function · 1a71fb84
      Wolfram Sang authored
      This RTC also includes a watchdog timer. Provide an accessor function
      for setting the watchdog timeout value which will be picked up by a
      watchdog driver. Also register the platform_device for the watchdog here
      to get the boot-time dependencies right.
      Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
      Acked-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
  7. 28 Feb, 2013 1 commit
    • Theodore Ts'o's avatar
      ext4: optimize ext4_es_shrink() · 24630774
      Theodore Ts'o authored
      When the system is under memory pressure, ext4_es_srhink() will get
      called very often.  So optimize returning the number of items in the
      file system's extent status cache by keeping a per-filesystem count,
      instead of calculating it each time by scanning all of the inodes in
      the extent status cache.
      Also rename the slab used for the extent status cache to be
      "ext4_extent_status" so it's obviousl the slab in question is created
      by ext4.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: Zheng Liu <gnehzuil.liu@gmail.com>