22 Feb, 2013

1 commit

  • Pull trivial tree from Jiri Kosina:
    "Assorted tiny fixes queued in trivial tree"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (22 commits)
    DocBook: update EXPORT_SYMBOL entry to point at export.h
    Documentation: update top level 00-INDEX file with new additions
    ARM: at91/ide: remove unsused at91-ide Kconfig entry
    percpu_counter.h: comment code for better readability
    x86, efi: fix comment typo in head_32.S
    IB: cxgb3: delay freeing mem untill entirely done with it
    net: mvneta: remove unneeded version.h include
    time: x86: report_lost_ticks doesn't exist any more
    pcmcia: avoid static analysis complaint about use-after-free
    fs/jfs: Fix typo in comment : 'how may' -> 'how many'
    of: add missing documentation for of_platform_populate()
    btrfs: remove unnecessary cur_trans set before goto loop in join_transaction
    sound: soc: Fix typo in sound/codecs
    treewide: Fix typo in various drivers
    btrfs: fix comment typos
    Update ibmvscsi module name in Kconfig.
    powerpc: fix typo (utilties -> utilities)
    of: fix spelling mistake in comment
    h8300: Fix home page URL in h8300/README
    xtensa: Fix home page URL in Kconfig
    ...

    Linus Torvalds
     

21 Feb, 2013

1 commit

  • Pull networking update from David Miller:

    1) Checkpoint/restarted TCP sockets now can properly propagate the TCP
    timestamp offset. From Andrey Vagin.

    2) VMWARE VM VSOCK layer, from Andy King.

    3) Much improved support for virtual functions and SR-IOV in bnx2x,
    from Ariel ELior.

    4) All protocols on ipv4 and ipv6 are now network namespace aware, and
    all the compatability checks for initial-namespace-only protocols is
    removed. Thanks to Tom Parkin for helping deal with the last major
    holdout, L2TP.

    5) IPV6 support in netpoll and network namespace support in pktgen,
    from Cong Wang.

    6) Multiple Registration Protocol (MRP) and Multiple VLAN Registration
    Protocol (MVRP) support, from David Ward.

    7) Compute packet lengths more accurately in the packet scheduler, from
    Eric Dumazet.

    8) Use per-task page fragment allocator in skb_append_datato_frags(),
    also from Eric Dumazet.

    9) Add support for connection tracking labels in netfilter, from
    Florian Westphal.

    10) Fix default multicast group joining on ipv6, and add anti-spoofing
    checks to 6to4 and 6rd. From Hannes Frederic Sowa.

    11) Make ipv4/ipv6 fragmentation memory limits more reasonable in modern
    times, rearrange inet frag datastructures for better cacheline
    locality, and move more operations outside of locking. From Jesper
    Dangaard Brouer.

    12) Instead of strict master slave relationships, allow arbitrary
    scenerios with "upper device lists". From Jiri Pirko.

    13) Improve rate limiting accuracy in TBF and act_police, also from Jiri
    Pirko.

    14) Add a BPF filter netfilter match target, from Willem de Bruijn.

    15) Orphan and delete a bunch of pre-historic networking drivers from
    Paul Gortmaker.

    16) Add TSO support for GRE tunnels, from Pravin B SHelar. Although
    this still needs some minor bug fixing before it's %100 correct in
    all cases.

    17) Handle unresolved IPSEC states like ARP, with a resolution packet
    queue. From Steffen Klassert.

    18) Remove TCP Appropriate Byte Count support (ABC), from Stephen
    Hemminger. This was long overdue.

    19) Support SO_REUSEPORT, from Tom Herbert.

    20) Allow locking a socket BPF filter, so that it cannot change after a
    process drops capabilities.

    21) Add VLAN filtering to bridge, from Vlad Yasevich.

    22) Bring ipv6 on-par with ipv4 and do not cache neighbour entries in
    the ipv6 routes, from YOSHIFUJI Hideaki.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1538 commits)
    ipv6: fix race condition regarding dst->expires and dst->from.
    net: fix a wrong assignment in skb_split()
    ip_gre: remove an extra dst_release()
    ppp: set qdisc_tx_busylock to avoid LOCKDEP splat
    atl1c: restore buffer state
    net: fix a build failure when !CONFIG_PROC_FS
    net: ipv4: fix waring -Wunused-variable
    net: proc: fix build failed when procfs is not configured
    Revert "xen: netback: remove redundant xenvif_put"
    net: move procfs code to net/core/net-procfs.c
    qmi_wwan, cdc-ether: add ADU960S
    bonding: set sysfs device_type to 'bond'
    bonding: fix bond_release_all inconsistencies
    b44: use netdev_alloc_skb_ip_align()
    xen: netback: remove redundant xenvif_put
    net: fec: Do a sanity check on the gpio number
    ip_gre: propogate target device GSO capability to the tunnel device
    ip_gre: allow CSUM capable devices to handle packets
    bonding: Fix initialize after use for 3ad machine state spinlock
    bonding: Fix race condition between bond_enslave() and bond_3ad_update_lacp_rate()
    ...

    Linus Torvalds
     

18 Feb, 2013

1 commit

  • This reverts commit aac73f34542bc7ae4317928d2eabfeb21d247323. That
    commit causes two kinds of breakage; it breaks registration of AMBA
    devices when one of the parent nodes already contains overlapping
    resource regions, and it breaks calls to request_region() by device
    drivers in certain conditions where there are overlapping memory
    regions. Both of these problems can probably be fixed, but it is better
    to back out the commit and get a proper fix designed before trying again.

    Signed-off-by: Grant Likely

    Grant Likely
     

13 Feb, 2013

6 commits


09 Feb, 2013

1 commit

  • With the locking cleanup in place (from "OF: Fixup resursive
    locking code paths"), we can now do the conversion from the
    rw_lock to a raw spinlock as required for preempt-rt.

    The previous cleanup and this conversion were originally
    separate since they predated when mainline got raw spinlock (in
    commit c2f21ce2e31286a "locking: Implement new raw_spinlock").

    So, at that point in time, the cleanup was considered plausible
    for mainline, but not this conversion. In any case, we've kept
    them separate as it makes for easier review and better bisection.

    Signed-off-by: Thomas Gleixner
    [PG: taken from preempt-rt, update subject & add a commit log]
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Rob Herring

    Thomas Gleixner
     

08 Feb, 2013

1 commit


06 Feb, 2013

2 commits

  • This allows platform_device_add a chance to call insert_resource on all
    of the resources from OF. At a minimum this fills in proc/iomem and
    presumably makes resource tracking and conflict detection work better.
    However, it has the side effect of moving all OF generated platform
    devices from /sys/devices to /sys/devices/platform/. It /shouldn't/
    break userspace because userspace is not supposed to depend on the full
    path (because userspace always does what it is supposed to, right?).

    This may cause breakage if either:
    1) any two nodes in a given device tree have overlapping & staggered
    regions (ie. 0x80..0xbf and 0xa0..0xdf; where one is not contained
    within the other). In this case one of the devices will fail to
    register and an exception will be needed in platform_device_add() to
    complain but not fail.
    2) any device calls request_mem_region() on a region larger than
    specified in the device tree. In this case the device node may be
    wrong, or the driver is overreaching. In either case I'd like to know
    about any problems and fix them.

    Please test. Despite the above, I'm still fairly confident that this
    patch is in good shape. I'd like to put it into linux-next, but would
    appreciate some bench testing from others before I do; particularly on
    PowerPC machines.

    v2: Remove powerpc special-case

    Cc: Jason Gunthorpe
    Cc: Benjamin Herrenschmidt
    Cc: Rob Herring
    Cc: Greg Kroah-Hartman
    Signed-off-by: Grant Likely

    Grant Likely
     
  • In some situations, userspace may want to resolve a
    device by function and logical number (ie, "serial0")
    rather than by the base address or full device path. Being
    able to resolve a device by alias frees userspace from the
    burden of otherwise having to maintain a mapping between
    device addresses and their logical assignments on each
    platform when multiple instances of the same hardware block
    are present in the system.

    Although the uevent device attribute contains devicetree
    compatible information and the full device path, the uevent
    does not list the alises that may have been defined for the
    device.

    Signed-off-by: Stepan Moskovchenko
    [grant.likely: Removed OF_ALIAS_N field; I don't think it's needed]
    [grant.likely: Added #ifndef _LINUX_OF_PRIVATE_H wrapper]
    Signed-off-by: Grant Likely

    Stepan Moskovchenko
     

29 Jan, 2013

1 commit


28 Jan, 2013

1 commit

  • There is no real reason to use a rwlock for devtree_lock. It even
    could be a mutex, but unfortunately it's locked from cpu hotplug
    paths which can't schedule :(

    So it needs to become a raw lock on rt as well. The devtree_lock would
    be the only user of a raw_rw_lock, so we are better off cleaning up the
    recursive locking paths which allows us to convert devtree_lock to a
    read_lock.

    Here we do the standard thing of introducing __foo() as the "raw"
    version of foo(), so that we can take better control of the locking.
    The "raw" versions are not exported and are for internal use within
    the file itself.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Rob Herring

    Thomas Gleixner
     

21 Jan, 2013

1 commit

  • The of_find_matching_node_and_match() function incorrectly sets the matched
    entry to 'matches' when the compatible value of a node matches one of the
    possible values. This results in incorrectly selecting the the first entry in
    the 'matches' list as the matched entry. Fix this by noting down the result of
    the call to of_match_node() and setting that as the matched entry.

    Signed-off-by: Thomas Abraham
    Signed-off-by: Rob Herring

    Thomas Abraham
     

15 Jan, 2013

1 commit

  • The flags argument of the phy_{attach,connect,connect_direct} functions
    is then used to assign a struct phy_device dev_flags with its value.
    All callers but the tg3 driver pass the flag 0, which results in the
    underlying PHY drivers in drivers/net/phy/ not being able to actually
    use any of the flags they would set in dev_flags. This patch gets rid of
    the flags argument, and passes phydev->dev_flags to the internal PHY
    library call phy_attach_direct() such that drivers which actually modify
    a phy device dev_flags get the value preserved for use by the underlying
    phy driver.

    Acked-by: Kosta Zertsekel
    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     

09 Jan, 2013

2 commits


19 Dec, 2012

2 commits

  • Commit 50c8af4cf9, "of: introduce for_each_matching_node_and_match()"
    renamed of_find_matching_node() to of_find_matching_node_and_match() and
    created a new static inline of_find_matching_node() wrapper around the
    new name. However, the change neglected to change the EXPORT_SYMBOL()
    reference causing build errors for modules.

    This patch fixes the EXPORT_SYMBOL() statement. Discovered on a PowerPC
    Efika build with the mpc52xx_uart driver being built as a module.

    Reported-by: Benjamin Herrenschmidt
    Signed-off-by: Grant Likely

    Grant Likely
     
  • Pull powerpc update from Benjamin Herrenschmidt:
    "The main highlight is probably some base POWER8 support. There's more
    to come such as transactional memory support but that will wait for
    the next one.

    Overall it's pretty quiet, or rather I've been pretty poor at picking
    things up from patchwork and reviewing them this time around and Kumar
    no better on the FSL side it seems..."

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (73 commits)
    powerpc+of: Rename and fix OF reconfig notifier error inject module
    powerpc: mpc5200: Add a3m071 board support
    powerpc/512x: don't compile any platform DIU code if the DIU is not enabled
    powerpc/mpc52xx: use module_platform_driver macro
    powerpc+of: Export of_reconfig_notifier_[register,unregister]
    powerpc/dma/raidengine: add raidengine device
    powerpc/iommu/fsl: Add PAMU bypass enable register to ccsr_guts struct
    powerpc/mpc85xx: Change spin table to cached memory
    powerpc/fsl-pci: Add PCI controller ATMU PM support
    powerpc/86xx: fsl_pcibios_fixup_bus requires CONFIG_PCI
    drivers/virt: the Freescale hypervisor driver doesn't need to check MSR[GS]
    powerpc/85xx: p1022ds: Use NULL instead of 0 for pointers
    powerpc: Disable relocation on exceptions when kexecing
    powerpc: Enable relocation on during exceptions at boot
    powerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate function
    powerpc: Add wrappers to enable/disable relocation on exceptions
    powerpc: Add set_mode hcall
    powerpc: Setup relocation on exceptions for bare metal systems
    powerpc: Move initial mfspr LPCR out of __init_LPCR
    powerpc: Add relocation on exception vector handlers
    ...

    Linus Torvalds
     

18 Dec, 2012

1 commit


15 Dec, 2012

1 commit

  • Pull another devicetree update from Grant Likely:
    "Here's a couple more devicetree changes that I missed in the first
    pull by putting the tag in the wrong place.

    Two minor devicetree fixups for v3.8. Addition of dummy inlines and
    constification of node argument to of_parse_phandle_with_args()."

    * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6:
    of: *node argument to of_parse_phandle_with_args should be const
    of/i2c: add dummy inline functions for when CONFIG_OF_I2C(_MODULE) isn't defined

    Linus Torvalds
     

14 Dec, 2012

1 commit


12 Dec, 2012

1 commit


08 Dec, 2012

1 commit


30 Nov, 2012

4 commits

  • ERROR: "allnodes" [drivers/w1/masters/w1-gpio.ko] undefined!

    Signed-off-by: Randy Dunlap
    [grant.likely: allnodes is too generic; rename to of_allnodes]
    Signed-off-by: Grant Likely
    Cc: Ville Syrjala

    Randy Dunlap
     
  • Currently of_mdiobus_register() function registers all PHY devices,
    independetly from their status property in device tree. According to
    "ePAPR 1.1" spec, device should only be registered if there is no
    "status" property, or it has "ok" (or "okay") value (see
    of_device_is_available()). In case of "platform devices",
    of_platform_device_create_pdata() checks for "status" and ensures
    that disabled devices are not pupulated. But such check for MDIO buses
    was missing until now. Fix it.

    Signed-off-by: Alexander Sverdlin
    Signed-off-by: Grant Likely

    Alexander Sverdlin
     
  • Currently of_i2c_register_devices() function registers all i2c devices,
    independently from their status property in device tree. According to
    "ePAPR 1.1" spec, device should only be registered if there is no
    "status" property, or it has "ok" (or "okay") value (see
    of_device_is_available()). In case of "platform devices",
    of_platform_device_create_pdata() checks for "status" and ensures
    that disabled devices are not populated. But such check for i2c buses
    was missing until now. Fix it.

    Signed-off-by: Alexander Sverdlin
    Acked-by: Rob Herring
    Acked-by: Wolfram Sang
    Reviewed-by: Barry Song
    Signed-off-by: Grant Likely

    Alexander Sverdlin
     
  • The existing function does not change the passed device_node pointer. It is
    only handed to of_get_property which itself takes a const struct device_node.

    of_parse_phandle() can therefore take a const pointer as well.

    Signed-off-by: Steffen Trumtrar
    [grant.likely: drop extraneous whitespace change]
    Signed-off-by: Grant Likely

    Steffen Trumtrar
     

29 Nov, 2012

1 commit


26 Nov, 2012

1 commit


21 Nov, 2012

4 commits

  • The following pattern of code is tempting:

    for_each_matching_node(np, table) {
    match = of_match_node(table, np);

    However, this results in iterating over table twice; the second time
    inside of_match_node(). The implementation of for_each_matching_node()
    already found the match, so this is redundant. Invent new function
    of_find_matching_node_and_match() and macro
    for_each_matching_node_and_match() to remove the double iteration,
    thus transforming the above code to:

    for_each_matching_node_and_match(np, table, &match)

    Signed-off-by: Stephen Warren
    Signed-off-by: Rob Herring

    Stephen Warren
     
  • This adds following helper routines:
    - of_property_read_u8_array()
    - of_property_read_u16_array()
    - of_property_read_u8()
    - of_property_read_u16()

    This expects arrays from DT to be passed as:
    - u8 array:
    property = /bits/ 8 ;
    - u16 array:
    property = /bits/ 16 ;

    Signed-off-by: Viresh Kumar
    Reviewed-by: Stephen Warren
    Signed-off-by: Rob Herring

    Viresh Kumar
     
  • Commit 509b7455 (of/fdt: Don't copy garbage after "/" in root node path)
    sets the path length to 0 to ignore any garbage after "/" in the root
    node path. This has the side effect of also ignoring '\0' at the end of
    the root node path. This patch sets the ignores the garbage by setting
    the last character to '\0' and length to 1.

    Signed-off-by: Catalin Marinas
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Rob Herring

    Catalin Marinas
     
  • Constify 'pathp' in order to get rid of the following warning:

    drivers/of/fdt.c:491:10: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

    Signed-off-by: Fabio Estevam
    [Rob Herring: also constify np and lp]
    Signed-off-by: Rob Herring

    Fabio Estevam
     

17 Nov, 2012

1 commit

  • Neither of these should ever be changed once set. Make them const and
    fix up the users that try to modify it in-place. In one case
    kmalloc+memcpy is replaced with kstrdup() to avoid modifying the string.

    Build tested with defconfigs on ARM, PowerPC, Sparc, MIPS, x86 among
    others.

    Signed-off-by: Grant Likely
    Acked-by: David S. Miller
    Cc: Benjamin Herrenschmidt
    Cc: Julian Calaby

    Grant Likely
     

15 Nov, 2012

3 commits

  • Rename the prom_*_property routines of the generic OF code to of_*_property.
    This brings them in line with the naming used by the rest of the OF code.

    Signed-off-by: Nathan Fontenot
    Acked-by: Geoff Levand
    Acked-by: Rob Herring
    Acked-by: Grant Likely
    Signed-off-by: Benjamin Herrenschmidt

    Nathan Fontenot
     
  • This patch moves the notification chain for updates to the device tree
    from the powerpc/pseries code to the base OF code. This makes this
    functionality available to all architectures.

    Additionally the notification chain is updated to allow notifications
    for property add/remove/update. To make this work a pointer to a new
    struct (of_prop_reconfig) is passed to the routines in the notification chain.
    The of_prop_reconfig property contains a pointer to the node containing the
    property and a pointer to the property itself. In the case of property
    updates, the property pointer refers to the new property.

    Signed-off-by: Nathan Fontenot
    Acked-by: Rob Herring
    Acked-by: Grant Likely
    Signed-off-by: Benjamin Herrenschmidt

    Nathan Fontenot
     
  • When adding or removing a device tree node we should also update
    the device tree in /proc/device-tree. This action is already done in the
    generic OF code for adding/removing properties of a node. This patch adds
    this functionality for nodes.

    Signed-off-by: Nathan Fontenot
    Acked-by: Rob Herring
    Acked-by: Grant Likely
    Signed-off-by: Benjamin Herrenschmidt

    Nathan Fontenot