02 Jun, 2012

1 commit

  • When NetLabel is not enabled, e.g. CONFIG_NETLABEL=n, and the system
    receives a CIPSO tagged packet it is dropped (cipso_v4_validate()
    returns non-zero). In most cases this is the correct and desired
    behavior, however, in the case where we are simply forwarding the
    traffic, e.g. acting as a network bridge, this becomes a problem.

    This patch fixes the forwarding problem by providing the basic CIPSO
    validation code directly in ip_options_compile() without the need for
    the NetLabel or CIPSO code. The new validation code can not perform
    any of the CIPSO option label/value verification that
    cipso_v4_validate() does, but it can verify the basic CIPSO option
    format.

    The behavior when NetLabel is enabled is unchanged.

    Signed-off-by: Paul Moore
    Signed-off-by: David S. Miller

    Paul Moore
     

01 Jun, 2012

6 commits

  • In SRIOV mode, the number of EQs used when computing the total ICM size
    was incorrect.

    To fix this, we do the following:
    1. We add a new structure to mlx4_dev, mlx4_phys_caps, to contain physical HCA
    capabilities. The PPF uses the phys capabilities when it computes things
    like ICM size.

    The dev_caps structure will then contain the paravirtualized values, making
    bookkeeping much easier in SRIOV mode. We add a structure rather than a
    single parameter because there will be other fields in the phys_caps.

    The first field we add to the mlx4_phys_caps structure is num_phys_eqs.

    2. In INIT_HCA, when running in SRIOV mode, the "log_num_eqs" parameter
    passed to the FW is the number of EQs per VF/PF; each function (PF or VF)
    has this number of EQs available.

    However, the total number of EQs which must be allowed for in the ICM is
    (1 << log_num_eqs) * (#VFs + #PFs). Rather than compute this quantity,
    we allocate ICM space for 1024 EQs (which is the device maximum
    number of EQs, and which is the value we place in the mlx4_phys_caps structure).

    For INIT_HCA, however, we use the per-function number of EQs as described
    above.

    Signed-off-by: Marcel Apfelbaum
    Signed-off-by: Jack Morgenstein
    Reviewed-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Marcel Apfelbaum
     
  • Pull battery updates from Anton Vorontsov:
    "A bunch of fixes for v3.5, nothing extraordinary."

    * tag 'for-v3.5' of git://git.infradead.org/battery-2.6: (27 commits)
    smb347-charger: Include missing
    smb347-charger: Clean up battery attributes
    max17042_battery: Add support for max17047/50 chip
    sbs-battery.c: Capacity attr = remaining relative capacity
    isp1704_charger: Use after free on probe error
    ds2781_battery: Use DS2781_PARAM_EEPROM_SIZE and DS2781_USER_EEPROM_SIZE
    power_supply: Fix a typo in BATTERY_DS2781 Kconfig entry
    charger-manager: Provide cm_notify_event function for in-kernel use
    charger-manager: Poll battery health in normal state
    smb347-charger: Convert to regmap API
    smb347-charger: Move IRQ enabling to the end of probe
    smb347-charger: Rename few functions to match better what they are doing
    smb347-charger: Convert to use module_i2c_driver()
    smb347_charger: Cleanup power supply registration code in probe
    ab8500: Clean up probe routines
    ab8500_fg: Harden platform data check
    ab8500_btemp: Harden platform data check
    ab8500_charger: Harden platform data check
    MAINTAINERS: Fix 'F' entry for the power supply class
    max17042_battery: Handle irq request failure case
    ...

    Linus Torvalds
     
  • Pull two small kvm fixes from Avi Kivity:
    "A build fix for non-kvm archs and a transparent hugepage refcount
    bugfix on hosts with 4M pages."

    * git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: Export asm-generic/kvm_para.h
    KVM: MMU: fix huge page adapted on non-PAE host

    Linus Torvalds
     
  • Pull final round of SCSI updates from James Bottomley:
    "This is primarily another round of driver updates (bnx2fc, qla2xxx,
    qla4xxx) including the target mode driver for qla2xxx. We've also got
    a couple of regression fixes (async scanning, broken this merge window
    and a fix to a long standing break in the scsi_wait_scan module)."

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (45 commits)
    [SCSI] fix scsi_wait_scan
    [SCSI] fix async probe regression
    [SCSI] be2iscsi: fix dma free size mismatch regression
    [SCSI] qla4xxx: Update driver version to 5.02.00-k17
    [SCSI] qla4xxx: Capture minidump for ISP82XX on firmware failure
    [SCSI] qla4xxx: Add change_queue_depth API support
    [SCSI] qla4xxx: Fix clear ddb mbx command failure issue.
    [SCSI] qla4xxx: Fix kernel panic during discovery logout.
    [SCSI] qla4xxx: Correct early completion of pending mbox.
    [SCSI] fcoe, bnx2fc, libfcoe: SW FCoE and bnx2fc use FCoE Syfs
    [SCSI] libfcoe: Add fcoe_sysfs
    [SCSI] bnx2fc: Allocate fcoe_ctlr with bnx2fc_interface, not as a member
    [SCSI] fcoe: Allocate fcoe_ctlr with fcoe_interface, not as a member
    [SCSI] Fix dm-multipath starvation when scsi host is busy
    [SCSI] ufs: fix potential NULL pointer dereferencing error in ufshcd_prove.
    [SCSI] qla2xxx: don't free pool that wasn't allocated
    [SCSI] mptfusion: unlock on error in mpt_config()
    [SCSI] tcm_qla2xxx: Add >= 24xx series fabric module for target-core
    [SCSI] qla2xxx: Add LLD target-mode infrastructure for >= 24xx series
    [SCSI] Revert "qla2xxx: During loopdown perform Diagnostic loopback."
    ...

    Linus Torvalds
     
  • Use the same mechanism as the block devices are using, but move the
    helper functions from fs/direct-io.c into fs/inode.c to remove the
    dependency on CONFIG_BLOCK.

    Signed-off-by: Trond Myklebust
    Cc: Christoph Hellwig
    Cc: Al Viro
    Cc: Fred Isaman
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     
  • Pull networking changes from David S. Miller:

    1) Fix IPSEC header length calculation for transport mode in ESP. The
    issue is whether to do the calculation before or after alignment.
    Fix from Benjamin Poirier.

    2) Fix regression in IPV6 IPSEC fragment length calculations, from Gao
    Feng. This is another transport vs tunnel mode issue.

    3) Handle AF_UNSPEC connect()s properly in L2TP to avoid OOPSes. Fix
    from James Chapman.

    4) Fix USB ASIX driver's reception of full sized VLAN packets, from
    Eric Dumazet.

    5) Allow drop monitor (and, more generically, all generic netlink
    protocols) to be automatically loaded as a module. From Neil
    Horman.

    Fix up trivial conflict in Documentation/feature-removal-schedule.txt
    due to new entries added next to each other at the end. As usual.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (38 commits)
    net/smsc911x: Repair broken failure paths
    virtio-net: remove useless disable on freeze
    netdevice: Update netif_dbg for CONFIG_DYNAMIC_DEBUG
    drop_monitor: Add module alias to enable automatic module loading
    genetlink: Build a generic netlink family module alias
    net: add MODULE_ALIAS_NET_PF_PROTO_NAME
    r6040: Do a Proper deinit at errorpath and also when driver unloads (calling r6040_remove_one)
    r6040: disable pci device if the subsequent calls (after pci_enable_device) fails
    skb: avoid unnecessary reallocations in __skb_cow
    net: sh_eth: fix the rxdesc pointer when rx descriptor empty happens
    asix: allow full size 8021Q frames to be received
    rds_rdma: don't assume infiniband device is PCI
    l2tp: fix oops in L2TP IP sockets for connect() AF_UNSPEC case
    mac80211: fix ADDBA declined after suspend with wowlan
    wlcore: fix undefined symbols when CONFIG_PM is not defined
    mac80211: fix flag check for QoS NOACK frames
    ath9k_hw: apply internal regulator settings on AR933x
    ath9k_hw: update AR933x initvals to fix issues with high power devices
    ath9k: fix a use-after-free-bug when ath_tx_setup_buffer() fails
    ath9k: stop rx dma before stopping tx
    ...

    Linus Torvalds
     

31 May, 2012

5 commits

  • Make netif_dbg use dynamic debugging whenever
    CONFIG_DYNAMIC_DEBUG is enabled.

    commit b558c96ffa53
    ("dynamic_debug: make dynamic-debug supersede DEBUG ccflag")
    missed updating the netif_dbg variant.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • Pull ceph updates from Sage Weil:
    "There are some updates and cleanups to the CRUSH placement code, a bug
    fix with incremental maps, several cleanups and fixes from Josh Durgin
    in the RBD block device code, a series of cleanups and bug fixes from
    Alex Elder in the messenger code, and some miscellaneous bounds
    checking and gfp cleanups/fixes."

    Fix up trivial conflicts in net/ceph/{messenger.c,osdmap.c} due to the
    networking people preferring "unsigned int" over just "unsigned".

    * git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (45 commits)
    libceph: fix pg_temp updates
    libceph: avoid unregistering osd request when not registered
    ceph: add auth buf in prepare_write_connect()
    ceph: rename prepare_connect_authorizer()
    ceph: return pointer from prepare_connect_authorizer()
    ceph: use info returned by get_authorizer
    ceph: have get_authorizer methods return pointers
    ceph: ensure auth ops are defined before use
    ceph: messenger: reduce args to create_authorizer
    ceph: define ceph_auth_handshake type
    ceph: messenger: check return from get_authorizer
    ceph: messenger: rework prepare_connect_authorizer()
    ceph: messenger: check prepare_write_connect() result
    ceph: don't set WRITE_PENDING too early
    ceph: drop msgr argument from prepare_write_connect()
    ceph: messenger: send banner in process_connect()
    ceph: messenger: reset connection kvec caller
    libceph: don't reset kvec in prepare_write_banner()
    ceph: ignore preferred_osd field
    ceph: fully initialize new layout
    ...

    Linus Torvalds
     
  • Pull i2c updates from Jean Delvare.

    * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
    i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING
    i2c-dev: Add support for I2C_M_RECV_LEN

    Linus Torvalds
     
  • Pull second set of watchdog updates from Wim Van Sebroeck:
    "This changeset contains following changes:
    * Add support for multiple watchdog devices. We use dynamically
    allocated device id's for this.
    * Add locking into the generic watchdog infrastructure.
    * Add support for dynamically allocated watchdog_device structs so
    that we can deal with devices that get unbound.
    * convert following drivers to the generic watchdog framework:
    sch5627, sch5636 and sp805_wdt.
    * Add DA9052/53 PMIC watchdog support
    * Fix printk format warnings for iTCO_wdt.c"

    * git://www.linux-watchdog.org/linux-watchdog:
    watchdog: iTCO_wdt.c: fix printk format warnings
    watchdog: sp805_wdt: Add clk_{un}prepare support
    watchdog: sp805_wdt: convert to watchdog core
    hwmon/sch56xx: Depend on watchdog for watchdog core functions
    watchdog: sch56xx-common: set correct bits in register()
    Watchdog: DA9052/53 PMIC watchdog support
    watchdog: sch56xx-common: Add proper ref-counting of watchdog data
    watchdog: sch56xx: Remove unnecessary checks for register changes
    watchdog: sch56xx: Use watchdog core
    watchdog: Add support for dynamically allocated watchdog_device structs
    watchdog: Add Locking support
    watchdog: watchdog_dev: Rewrite wrapper code
    watchdog: use dev_ functions
    watchdog: create all the proper device files
    watchdog: Add a flag to indicate the watchdog doesn't reboot things
    watchdog: Add multiple device support
    watchdog: watchdog_core.h: make functions extern
    watchdog: correct the name of the watchdog_core inlude file
    watchdog: Add watchdog_active() routine
    watchdog: watchdog_dev: include private header to pickup global symbol prototypes

    Linus Torvalds
     
  • Pull block driver updates from Jens Axboe:
    "Here are the driver related changes for 3.5. It contains:

    - The floppy changes from Jiri. Jiri is now also marked as the
    maintainer of floppy.c, I shall be publically branding his forehead
    with red hot iron at the next opportune moment.

    - A batch of drbd updates and fixes from the linbit crew, as well as
    fixes from others.

    - Two small fixes for xen-blkfront courtesy of Jan."

    * 'for-3.5/drivers' of git://git.kernel.dk/linux-block: (70 commits)
    floppy: take over maintainership
    floppy: remove floppy-specific O_EXCL handling
    floppy: convert to delayed work and single-thread wq
    xen-blkfront: module exit handling adjustments
    xen-blkfront: properly name all devices
    drbd: grammar fix in log message
    drbd: check MODULE for THIS_MODULE
    drbd: Restore the request restart logic
    drbd: introduce a bio_set to allocate housekeeping bios from
    drbd: remove unused define
    drbd: bm_page_async_io: properly initialize page->private
    drbd: use the newly introduced page pool for bitmap IO
    drbd: add page pool to be used for meta data IO
    drbd: allow bitmap to change during writeout from resync_finished
    drbd: fix race between drbdadm invalidate/verify and finishing resync
    drbd: fix resend/resubmit of frozen IO
    drbd: Ensure that data_size is not 0 before using data_size-1 as index
    drbd: Delay/reject other state changes while establishing a connection
    drbd: move put_ldev from __req_mod() to the endio callback
    drbd: fix WRITE_ACKED_BY_PEER_AND_SIS to not set RQ_NET_DONE
    ...

    Linus Torvalds
     

30 May, 2012

28 commits

  • Merge block/IO core bits from Jens Axboe:
    "This is a bit bigger on the core side than usual, but that is purely
    because we decided to hold off on parts of Tejun's submission on 3.4
    to give it a bit more time to simmer. As a consequence, it's seen a
    long cycle in for-next.

    It contains:

    - Bug fix from Dan, wrong locking type.
    - Relax splice gifting restriction from Eric.
    - A ton of updates from Tejun, primarily for blkcg. This improves
    the code a lot, making the API nicer and cleaner, and also includes
    fixes for how we handle and tie policies and re-activate on
    switches. The changes also include generic bug fixes.
    - A simple fix from Vivek, along with a fix for doing proper delayed
    allocation of the blkcg stats."

    Fix up annoying conflict just due to different merge resolution in
    Documentation/feature-removal-schedule.txt

    * 'for-3.5/core' of git://git.kernel.dk/linux-block: (92 commits)
    blkcg: tg_stats_alloc_lock is an irq lock
    vmsplice: relax alignement requirements for SPLICE_F_GIFT
    blkcg: use radix tree to index blkgs from blkcg
    blkcg: fix blkcg->css ref leak in __blkg_lookup_create()
    block: fix elvpriv allocation failure handling
    block: collapse blk_alloc_request() into get_request()
    blkcg: collapse blkcg_policy_ops into blkcg_policy
    blkcg: embed struct blkg_policy_data in policy specific data
    blkcg: mass rename of blkcg API
    blkcg: style cleanups for blk-cgroup.h
    blkcg: remove blkio_group->path[]
    blkcg: blkg_rwstat_read() was missing inline
    blkcg: shoot down blkgs if all policies are deactivated
    blkcg: drop stuff unused after per-queue policy activation update
    blkcg: implement per-queue policy activation
    blkcg: add request_queue->root_blkg
    blkcg: make request_queue bypassing on allocation
    blkcg: make sure blkg_lookup() returns %NULL if @q is bypassing
    blkcg: make blkg_conf_prep() take @pol and return with queue lock held
    blkcg: remove static policy ID enums
    ...

    Linus Torvalds
     
  • Pull IOMMU updates from Joerg Roedel:
    "Not much stuff this time. The only change to the IOMMU core code is
    the addition of a handle to the fault handling code. A few updates to
    the AMD IOMMU driver to work around new errata. The other patches are
    mostly fixes and enhancements to the existing ARM IOMMU drivers and
    documentation updates.

    A new IOMMU driver for the Exynos platform was also underway but got
    merged via the Samsung tree and is not part of this tree."

    * tag 'iommu-updates-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
    Documentation: kernel-parameters.txt Add amd_iommu_dump
    iommu/core: pass a user-provided token to fault handlers
    iommu/tegra: gart: Fix register offset correctly
    iommu: OMAP: device detach on domain destroy
    iommu: tegra/gart: Add device tree support
    iommu: tegra/gart: use correct gart_device
    iommu/tegra: smmu: Print device name correctly
    iommu/amd: Add workaround for event log erratum
    iommu/amd: Check for the right TLP prefix bit
    dma-debug: release free_entries_lock before saving stack trace

    Linus Torvalds
     
  • Since there are uses for I2C_M_NOSTART which are much more sensible and
    standard than most of the protocol mangling functionality (the main one
    being gather writes to devices where something like a register address
    needs to be inserted before a block of data) create a new I2C_FUNC_NOSTART
    for this feature and update all the users to use it.

    Also strengthen the disrecommendation of the protocol mangling while we're
    at it.

    In the case of regmap-i2c we remove the requirement for mangling as
    I2C_M_NOSTART is the only mangling feature which is being used.

    Signed-off-by: Mark Brown
    Acked-by: Wolfram Sang
    Signed-off-by: Jean Delvare

    Mark Brown
     
  • If a driver's watchdog_device struct is part of a dynamically allocated
    struct (which it often will be), merely locking the module is not enough,
    even with a drivers module locked, the driver can be unbound from the device,
    examples:
    1) The root user can unbind it through sysfd
    2) The i2c bus master driver being unloaded for an i2c watchdog

    I will gladly admit that these are corner cases, but we still need to handle
    them correctly.

    The fix for this consists of 2 parts:
    1) Add ref / unref operations, so that the driver can refcount the struct
    holding the watchdog_device struct and delay freeing it until any
    open filehandles referring to it are closed
    2) Most driver operations will do IO on the device and the driver should not
    do any IO on the device after it has been unbound. Rather then letting each
    driver deal with this internally, it is better to ensure at the watchdog
    core level that no operations (other then unref) will get called after
    the driver has called watchdog_unregister_device(). This actually is the
    bulk of this patch.

    Signed-off-by: Hans de Goede
    Signed-off-by: Wim Van Sebroeck

    Hans de Goede
     
  • This patch fixes some potential multithreading issues, despite only
    allowing one process to open the /dev/watchdog device, we can still get
    called multiple times at the same time, since a program could be using thread,
    or could share the fd after a fork.

    This causes 2 potential problems:
    1) watchdog_start / open do an unlocked test_n_set / test_n_clear,
    if these 2 race, the watchdog could be stopped while the active
    bit indicates it is running or visa versa.

    2) Most watchdog_dev drivers probably assume that only one
    watchdog-op will get called at a time, this is not necessary
    true atm.

    Signed-off-by: Hans de Goede
    Signed-off-by: Wim Van Sebroeck

    Hans de Goede
     
  • Create the watchdog class and it's associated devices.

    Signed-off-by: Alan Cox
    Signed-off-by: Hans de Goede
    Signed-off-by: Wim Van Sebroeck

    Alan Cox
     
  • Some watchdogs merely trigger external alarms and controls. In a managed
    environment this is very useful but we want drivers to be able to figure
    out which is which now multiple dogs can be loaded. Thus add an ALARMONLY
    feature flag.

    Signed-off-by: Alan Cox
    Signed-off-by: Hans de Goede
    Signed-off-by: Wim Van Sebroeck

    Alan Cox
     
  • We keep the old /dev/watchdog interface file for the first watchdog via
    miscdev. This is basically a cut and paste of the relevant interface code
    from the rtc driver layer tweaked for watchdog.

    Revised to fix problems noted by Hans de Goede

    Signed-off-by: Alan Cox
    Signed-off-by: Hans de Goede
    Signed-off-by: Tomas Winkler
    Signed-off-by: Wim Van Sebroeck

    Alan Cox
     
  • Some watchdog may need to check if watchdog is ACTIVE or not, for example in
    their suspend/resume hooks.

    This patch adds this routine and changes the core drivers to use it.

    Signed-off-by: Viresh Kumar
    Signed-off-by: Wim Van Sebroeck

    Viresh Kumar
     
  • Generic netlink searches for -type- formatted aliases when requesting a module to
    fulfill a protocol request (i.e. net-pf-16-proto-16-type-, where x is a type
    value). However generic netlink protocols have no well defined type numbers,
    they have string names. Modify genl_ctrl_getfamily to request an alias in the
    format net-pf-16-proto-16-family- instead, where x is a generic string, and
    add a macro that builds on the previously added MODULE_ALIAS_NET_PF_PROTO_NAME
    macro to allow modules to specifify those generic strings.

    Note, l2tp previously hacked together an net-pf-16-proto-16-type-l2tp alias
    using the MODULE_ALIAS macro, with these updates we can convert that to use the
    PROTO_NAME macro.

    Signed-off-by: Neil Horman
    CC: Eric Dumazet
    CC: James Chapman
    CC: David Miller
    Signed-off-by: David S. Miller

    Neil Horman
     
  • The MODULE_ALAIS_NET_PF macro set is missing a variant that allows for the
    appending of an arbitrary string to the net-pf--proto- base. while
    MODULE_ALIAS_NET_PF_PROTO_NAME_TYPE allows an appending of a numerical type, we
    need to be able to append a generic string to support generic netlink families
    that have neither a fix numberical protocol nor type number

    Signed-off-by: Neil Horman
    CC: Eric Dumazet
    CC: David Miller
    Signed-off-by: David S. Miller

    Neil Horman
     
  • Pull EDAC internal API changes from Mauro Carvalho Chehab:
    "This changeset is the first part of a series of patches that fixes the
    EDAC sybsystem. On this set, it changes the Kernel EDAC API in order
    to properly represent the Intel i3/i5/i7, Xeon 3xxx/5xxx/7xxx, and
    Intel E5-xxxx memory controllers.

    The EDAC core used to assume that:

    - the DRAM chip select pin is directly accessed by the memory
    controller

    - when multiple channels are used, they're all filled with the
    same type of memory.

    None of the above premises is true on Intel memory controllers since
    2002, when RAMBUS and FB-DIMMs were introduced, and Advanced Memory
    Buffer or by some similar technologies hides the direct access to the
    DRAM pins.

    So, the existing drivers for those chipsets had to lie to the EDAC
    core, in general telling that just one channel is filled. That
    produces some hard to understand error messages like:

    EDAC MC0: CE row 3, channel 0, label "DIMM1": 1 Unknown error(s): memory read error on FATAL area : cpu=0 Err=0008:00c2 (ch=2), addr = 0xad1f73480 => socket=0, Channel=0(mask=2), rank=1

    The location information there (row3 channel 0) is completely bogus:
    it has no physical meaning, and are just some random values that the
    driver uses to talk with the EDAC core. The error actually happened
    at CPU socket 0, channel 0, slot 1, but this is not reported anywhere,
    as the EDAC core doesn't know anything about the memory layout. So,
    only advanced users that know how the EDAC driver works and that tests
    their systems to see how DIMMs are mapped can actually benefit for
    such error logs.

    This patch series fixes the error report logic, in order to allow the
    EDAC to expose the memory architecture used by them to the EDAC core.
    So, as the EDAC core now understands how the memory is organized, it
    can provide an useful report:

    EDAC MC0: CE memory read error on DIMM1 (channel:0 slot:1 page:0x364b1b offset:0x600 grain:32 syndrome:0x0 - count:1 area:DRAM err_code:0001:0090 socket:0 channel_mask:1 rank:4)

    The location of the DIMM where the error happened is reported by "MC0"
    (cpu socket #0), at "channel:0 slot:1" location, and matches the
    physical location of the DIMM.

    There are two remaining issues not covered by this patch series:

    - The EDAC sysfs API will still report bogus values. So,
    userspace tools like edac-utils will still use the bogus data;

    - Add a new tracepoint-based way to get the binary information
    about the errors.

    Those are on a second series of patches (also at -next), but will
    probably miss the train for 3.5, due to the slow review process."

    Fix up trivial conflict (due to spelling correction of removed code) in
    drivers/edac/edac_device.c

    * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: (42 commits)
    i7core: fix ranks information at the per-channel struct
    i5000: Fix the fatal error handling
    i5100_edac: Fix a warning when compiled with 32 bits
    i82975x_edac: Test nr_pages earlier to save a few CPU cycles
    e752x_edac: provide more info about how DIMMS/ranks are mapped
    i5000_edac: Fix the logic that retrieves memory information
    i5400_edac: improve debug messages to better represent the filled memory
    edac: Cleanup the logs for i7core and sb edac drivers
    edac: Initialize the dimm label with the known information
    edac: Remove the legacy EDAC ABI
    x38_edac: convert driver to use the new edac ABI
    tile_edac: convert driver to use the new edac ABI
    sb_edac: convert driver to use the new edac ABI
    r82600_edac: convert driver to use the new edac ABI
    ppc4xx_edac: convert driver to use the new edac ABI
    pasemi_edac: convert driver to use the new edac ABI
    mv64x60_edac: convert driver to use the new edac ABI
    mpc85xx_edac: convert driver to use the new edac ABI
    i82975x_edac: convert driver to use the new edac ABI
    i82875p_edac: convert driver to use the new edac ABI
    ...

    Linus Torvalds
     
  • Pull MIPS updates from Ralf Baechle:
    "The whole series has been sitting in -next for quite a while with no
    complaints. The last change to the series was before the weekend the
    removal of an SPI patch which Grant - even though previously acked by
    himself - appeared to raise objections. So I removed it until the
    situation is clarified. Other than that all the patches have the acks
    from their respective maintainers, all MIPS and x86 defconfigs are
    building fine and I'm not aware of any problems introduced by this
    series.

    Among the key features for this patch series is a sizable patchset for
    Lantiq which among other things introduces support for Lantiq's
    flagship product, the FALCON SOC. It also means that the opensource
    developers behind this patchset have overtaken Lantiq's competing
    inhouse development team that was working behind closed doors.

    Less noteworthy the ath79 patchset which adds support for a few more
    chip variants, cleanups and fixes. Finally the usual dose of tweaking
    of generic code."

    Fix up trivial conflicts in arch/mips/lantiq/xway/gpio_{ebu,stp}.c where
    printk spelling fixes clashed with file move and eventual removal of the
    printk.

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (81 commits)
    MIPS: lantiq: remove orphaned code
    MIPS: Remove all -Wall and almost all -Werror usage from arch/mips.
    MIPS: lantiq: implement support for FALCON soc
    MTD: MIPS: lantiq: verify that the NOR interface is available on falcon soc
    MTD: MIPS: lantiq: implement OF support
    watchdog: MIPS: lantiq: implement OF support and minor fixes
    SERIAL: MIPS: lantiq: implement OF support
    GPIO: MIPS: lantiq: convert gpio-stp-xway to OF
    GPIO: MIPS: lantiq: convert gpio-mm-lantiq to OF and of_mm_gpio
    GPIO: MIPS: lantiq: move gpio-stp and gpio-ebu to the subsystem folder
    MIPS: pci: convert lantiq driver to OF
    MIPS: lantiq: convert dma to platform driver
    MIPS: lantiq: implement support for clkdev api
    MIPS: lantiq: drop ltq_gpio_request() and gpio_to_irq()
    OF: MIPS: lantiq: implement irq_domain support
    OF: MIPS: lantiq: implement OF support
    MIPS: lantiq: drop mips_machine support
    OF: PCI: const usage needed by MIPS
    MIPS: Cavium: Remove smp_reserve_lock.
    MIPS: Move cache setup to setup_arch().
    ...

    Linus Torvalds
     
  • Some DS13XX devices have "trickle chargers". Its configuration register
    is at different locations, the setup is the same, though. Since the
    configuration is board specific, introduce a platform_data to this driver.
    Tested with a DS1339 on a custom board.

    Signed-off-by: Wolfram Sang
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wolfram Sang
     
  • Currently there is no generic way to get the RTC battery status within an
    application. So add an ioctl to read the status bit. The idea is that
    the bit is set once a low voltage is detected. It stays there until it is
    reset using the RTC_VL_CLR ioctl.

    Signed-off-by: Alexander Stein
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Stein
     
  • Using %ps in a printk format will sometimes fail silently and print the
    empty string if the address passed in does not match a symbol that
    kallsyms knows about. But using %pS will fall back to printing the full
    address if kallsyms can't find the symbol. Make %ps act the same as %pS
    by falling back to printing the address.

    While we're here also make %ps print the module that a symbol comes from
    so that it matches what %pS already does. Take this simple function for
    example (in a module):

    static void test_printk(void)
    {
    int test;
    pr_info("with pS: %pS\n", &test);
    pr_info("with ps: %ps\n", &test);
    }

    Before this patch:

    with pS: 0xdff7df44
    with ps:

    After this patch:

    with pS: 0xdff7df44
    with ps: 0xdff7df44

    Signed-off-by: Stephen Boyd
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • max brightness is 127, so the range of brt_val should be from 0 to 127

    Signed-off-by: Milo(Woogyom) Kim
    Acked-by: Linus Walleij
    Cc: Shreshtha Kumar SAHU
    Cc: Richard Purdie
    Cc: Bryan Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kim, Milo
     
  • Add a new field to led_classdev to save activattion state after activate
    routine is successful. This saved state is used in deactivate routine to
    do cleanup such as removing device files, and free memory allocated during
    activation. Currently trigger_data not being null is used for this
    purpose.

    Existing triggers will need changes to use this new field.

    Signed-off-by: Shuah Khan
    Cc: Richard Purdie
    Cc: Bryan Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shuah Khan
     
  • Include the header to pickup the exported symbol prototype.

    Quiets the sparse warning:

    warning: symbol 'apple_bl_register' was not declared. Should it be static?
    warning: symbol 'apple_bl_unregister' was not declared. Should it be static?

    [akpm@linux-foundation.org: fix resulting build error]
    Signed-off-by: H Hartley Sweeten
    Cc: Richard Purdie
    Signed-off-by: Florian Tobias Schandinat
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    H Hartley Sweeten
     
  • This patchset adds early fb blank feature that a callback of lcd panel
    driver is called prior to specific fb driver's one. In the case of
    MIPI-DSI based video mode LCD Panel, for lcd power off, the power off
    commands should be transferred to lcd panel with display and mipi-dsi
    controller enabled because the commands is set to lcd panel at vsync porch
    period. and in opposite case, the callback of fb driver should be called
    prior to lcd panel driver's one because of same issue. Also if fb_blank
    mode is changed to FB_BLANK_POWERDOWN then display controller would be
    off(clock disable) but lcd panel would be still on. at this time, you
    could see some issue like sparkling on lcd panel because video clock to be
    delivered to ldi module of lcd panel was disabled. this issue could
    occurs for all lcd panels.

    The callback order is as the following:

    at fb_blank function of fbmem.c
    -> fb_notifier_call_chain(FB_EARLY_EVENT_BLANK)
    -> lcd panel driver's early_set_power()
    -> info->fbops->fb_blank()
    -> spcefic fb driver's fb_blank()
    -> fb_notifier_call_chain(FB_EVENT_BLANK)
    -> lcd panel driver's set_power()
    -> fb_notifier_call_chain(FB_R_EARLY_EVENT_BLANK) if
    info->fops->fb_blank() was failed.

    fb_notifier_call_chain(FB_R_EARLY_EVENT_BLANK) would be called to revert
    the effects of previous FB_EARLY_EVENT_BLANK call. and note that if
    early_set_power() of lcd_ops is NULL then early fb blank callback would be
    ignored.

    This patch:

    Add early_set_power and r_early_set_power callbacks. early_set_power
    callback is called prior to fb_blank() of fbmem.c and r_early_set_power
    callback is called if fb_blank() was failed to revert the effects of the
    early_set_power call of lcd panel driver.

    Signed-off-by: Inki Dae
    Signed-off-by: Kyungmin Park
    Cc: Lars-Peter Clausen
    Cc: Florian Tobias Schandinat
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Inki Dae
     
  • Add FB_EARLY_EVENT_BLANK and FB_R_EARLY_EVENT_BLANK event mode supports.
    first, fb_notifier_call_chain() is called with FB_EARLY_EVENT_BLANK and
    fb_blank() of specific fb driver is called and then
    fb_notifier_call_chain() is called with FB_EVENT_BLANK again at
    fb_blank(). and if fb_blank() was failed then fb_nitifier_call_chain()
    would be called with FB_R_EARLY_EVENT_BLANK to revert the previous
    effects.

    Signed-off-by: Inki Dae
    Signed-off-by: Kyungmin Park
    Cc: Lars-Peter Clausen
    Acked-by: Florian Tobias Schandinat
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Inki Dae
     
  • We call the destroy function when a cgroup starts to be removed, such as
    by a rmdir event.

    However, because of our reference counters, some objects are still
    inflight. Right now, we are decrementing the static_keys at destroy()
    time, meaning that if we get rid of the last static_key reference, some
    objects will still have charges, but the code to properly uncharge them
    won't be run.

    This becomes a problem specially if it is ever enabled again, because now
    new charges will be added to the staled charges making keeping it pretty
    much impossible.

    We just need to be careful with the static branch activation: since there
    is no particular preferred order of their activation, we need to make sure
    that we only start using it after all call sites are active. This is
    achieved by having a per-memcg flag that is only updated after
    static_key_slow_inc() returns. At this time, we are sure all sites are
    active.

    This is made per-memcg, not global, for a reason: it also has the effect
    of making socket accounting more consistent. The first memcg to be
    limited will trigger static_key() activation, therefore, accounting. But
    all the others will then be accounted no matter what. After this patch,
    only limited memcgs will have its sockets accounted.

    [akpm@linux-foundation.org: move enum sock_flag_bits into sock.h,
    document enum sock_flag_bits,
    convert memcg_proto_active() and memcg_proto_activated() to test_bit(),
    redo tcp_update_limit() comment to 80 cols]
    Signed-off-by: Glauber Costa
    Cc: Tejun Heo
    Cc: Li Zefan
    Acked-by: KAMEZAWA Hiroyuki
    Cc: Johannes Weiner
    Cc: Michal Hocko
    Acked-by: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Glauber Costa
     
  • Take lruvec further: pass it instead of zone to add_page_to_lru_list() and
    del_page_from_lru_list(); and pagevec_lru_move_fn() pass lruvec down to
    its target functions.

    This cleanup eliminates a swathe of cruft in memcontrol.c, including
    mem_cgroup_lru_add_list(), mem_cgroup_lru_del_list() and
    mem_cgroup_lru_move_lists() - which never actually touched the lists.

    In their place, mem_cgroup_page_lruvec() to decide the lruvec, previously
    a side-effect of add, and mem_cgroup_update_lru_size() to maintain the
    lru_size stats.

    Whilst these are simplifications in their own right, the goal is to bring
    the evaluation of lruvec next to the spin_locking of the lrus, in
    preparation for a future patch.

    Signed-off-by: Hugh Dickins
    Cc: KOSAKI Motohiro
    Acked-by: KAMEZAWA Hiroyuki
    Acked-by: Michal Hocko
    Acked-by: Konstantin Khlebnikov
    Cc: Johannes Weiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Konstantin just introduced mem_cgroup_get_lruvec_size() and
    get_lruvec_size(), I'm about to add mem_cgroup_update_lru_size(): but
    we're dealing with the same thing, lru_size[lru]. We ought to agree on
    the naming, and I do think lru_size is the more correct: so rename his
    ones to get_lru_size().

    Signed-off-by: Hugh Dickins
    Acked-by: KAMEZAWA Hiroyuki
    Acked-by: Konstantin Khlebnikov
    Acked-by: Michal Hocko
    Cc: KOSAKI Motohiro
    Cc: Johannes Weiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Since we will succeed with the allocation no matter what, there isn't a
    need to use __must_check with it. It can very well be optional.

    Signed-off-by: Glauber Costa
    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Aneesh Kumar K.V
    Cc: Michal Hocko
    Cc: Johannes Weiner
    Cc: Frederic Weisbecker
    Cc: Ying Han
    Reviewed-by: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Glauber Costa
     
  • When killing a res_counter which is a child of other counter, we need to
    do

    res_counter_uncharge(child, xxx)
    res_counter_charge(parent, xxx)

    This is not atomic and wastes CPU. This patch adds
    res_counter_uncharge_until(). This function's uncharge propagates to
    ancestors until specified res_counter.

    res_counter_uncharge_until(child, parent, xxx)

    Now the operation is atomic and efficient.

    Signed-off-by: Frederic Weisbecker
    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Aneesh Kumar K.V
    Cc: Michal Hocko
    Cc: Johannes Weiner
    Cc: Ying Han
    Cc: Glauber Costa
    Reviewed-by: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frederic Weisbecker
     
  • Switch mem_cgroup_inactive_anon_is_low() to lruvec pointers,
    mem_cgroup_get_lruvec_size() is more effective than
    mem_cgroup_zone_nr_lru_pages()

    Signed-off-by: Konstantin Khlebnikov
    Cc: Mel Gorman
    Cc: KAMEZAWA Hiroyuki
    Acked-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Konstantin Khlebnikov
     
  • If memory cgroup is enabled we always use lruvecs which are embedded into
    struct mem_cgroup_per_zone, so we can reach lru_size counters via
    container_of().

    Signed-off-by: Konstantin Khlebnikov
    Cc: Mel Gorman
    Cc: KAMEZAWA Hiroyuki
    Acked-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Konstantin Khlebnikov