20 Nov, 2013

3 commits

  • This commit adds a very basic registry of msi_chip structures, so that
    an IRQ controller driver can register an msi_chip, and a PCIe host
    controller can find it, based on a 'struct device_node'.

    Signed-off-by: Thomas Petazzoni
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Rob Herring
    Signed-off-by: Jason Cooper

    Thomas Petazzoni
     
  • This function can be used to parse a bus-range property as specified by
    device nodes representing PCI bridges.

    Signed-off-by: Thierry Reding
    Signed-off-by: Jason Cooper

    Thierry Reding
     
  • This function can be used to parse the device and function number from a
    standard 5-cell PCI resource. PCI_SLOT() and PCI_FUNC() can be used on
    the returned value obtain the device and function numbers respectively.

    Signed-off-by: Thierry Reding
    Signed-off-by: Thomas Petazzoni
    Signed-off-by: Jason Cooper

    Thierry Reding
     

30 Oct, 2013

2 commits

  • devicetrees may have a linux,stdout-path property in the chosen
    node describing the console device. This adds a helper function
    to match a device against this property so a driver can call
    add_preferred_console for a matching device.

    Signed-off-by: Sascha Hauer
    Acked-by: Rob Herring
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Huang Shijie

    Sascha Hauer
     
  • This patch factors out common implementation patterns to reduce overall kernel
    code and provide a means for host bridge drivers to directly obtain struct
    resources from the DT's ranges property without relying on architecture specific
    DT handling. This will make it easier to write archiecture independent host bridge
    drivers and mitigate against further duplication of DT parsing code.

    This patch can be used in the following way:

    struct of_pci_range_parser parser;
    struct of_pci_range range;

    if (of_pci_range_parser_init(&parser, np))
    ; //no ranges property

    for_each_of_pci_range(&parser, &range) {

    /*
    directly access properties of the address range, e.g.:
    range.pci_space, range.pci_addr, range.cpu_addr,
    range.size, range.flags

    alternatively obtain a struct resource, e.g.:
    struct resource res;
    of_pci_range_to_resource(&range, np, &res);
    */
    }

    Additionally the implementation takes care of adjacent ranges and merges them
    into a single range (as was the case with powerpc and microblaze).

    Signed-off-by: Andrew Murray
    Signed-off-by: Liviu Dudau
    Signed-off-by: Thomas Petazzoni
    Reviewed-by: Rob Herring
    Tested-by: Thomas Petazzoni
    Tested-by: Linus Walleij
    Tested-by: Jingoo Han
    Acked-by: Grant Likely
    Signed-off-by: Jason Cooper

    Andrew Murray
     

27 Sep, 2013

1 commit

  • commit 0640332e073be9207f0784df43595c0c39716e42 upstream.

    Any calls to dt_alloc() need to be zeroed. This is a temporary fix, but
    the allocation function itself needs to zero memory before returning
    it. This is a follow up to patch 9e4012752, "of: fdt: fix memory
    initialization for expanded DT" which fixed one call site but missed
    another.

    Signed-off-by: Grant Likely
    Acked-by: Wladislav Wiebe
    Signed-off-by: Greg Kroah-Hartman

    Grant Likely
     

30 Aug, 2013

1 commit

  • commit 9e40127526e857fa3f29d51e83277204fbdfc6ba upstream.

    Already existing property flags are filled wrong for properties created from
    initial FDT. This could cause problems if this DYNAMIC device-tree functions
    are used later, i.e. properties are attached/detached/replaced. Simply dumping
    flags from the running system show, that some initial static (not allocated via
    kzmalloc()) nodes are marked as dynamic.

    I putted some debug extensions to property_proc_show(..) :
    ..
    + if (OF_IS_DYNAMIC(pp))
    + pr_err("DEBUG: xxx : OF_IS_DYNAMIC\n");
    + if (OF_IS_DETACHED(pp))
    + pr_err("DEBUG: xxx : OF_IS_DETACHED\n");

    when you operate on the nodes (e.g.: ~$ cat /proc/device-tree/*some_node*) you
    will see that those flags are filled wrong, basically in most cases it will dump
    a DYNAMIC or DETACHED status, which is in not true.
    (BTW. this OF_IS_DETACHED is a own define for debug purposes which which just
    make a test_bit(OF_DETACHED, &x->_flags)

    If nodes are dynamic kernel is allowed to kfree() them. But it will crash
    attempting to do so on the nodes from FDT -- they are not allocated via
    kzmalloc().

    Signed-off-by: Wladislav Wiebe
    Acked-by: Alexander Sverdlin
    Signed-off-by: Rob Herring
    Signed-off-by: Greg Kroah-Hartman

    Wladislav Wiebe
     

26 Jul, 2013

1 commit

  • commit 6dd18e4684f3d188277bbbc27545248487472108 upstream.

    Commit:

    e38c0a1fbc5803cbacdaac0557c70ac8ca5152e7
    of/address: Handle #address-cells > 2 specially

    broke real time clock access on Bimini, js2x, and similar powerpc
    machines using the "maple" platform. That code was indirectly relying
    on the old (broken) behaviour of the translation for the hypertransport
    to ISA bridge.

    This fixes it by treating hypertransport as a PCI bus

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Rob Herring
    Signed-off-by: Grant Likely
    Cc: Jonghwan Choi
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Herrenschmidt
     

14 Jun, 2013

1 commit

  • The OF code uses irqsafe locks everywhere except in a handful of functions
    for no obvious reasons. Since the conversion from the old rwlocks, this
    now triggers lockdep warnings when used at interrupt time. At least one
    driver (ibmvscsi) seems to be doing that from softirq context.

    This converts the few non-irqsafe locks into irqsafe ones, making them
    consistent with the rest of the code.

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Thomas Gleixner
    Acked-by: David S. Miller
    Signed-off-by: Grant Likely

    Benjamin Herrenschmidt
     

19 May, 2013

1 commit

  • Pull device tree fixes from Grant Likely:
    "Device tree bug fixes and documentation updates for v3.10

    Nothing earth shattering here. A build failure fix, and fix for
    releasing nodes and some documenation updates."

    * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
    Documentation/devicetree: make semantic of initrd-end more explicit
    of/base: release the node correctly in of_parse_phandle_with_args()
    of/documentation: move video device bindings to a common place
    : fix compilation warnings with DT disabled

    Linus Torvalds
     

09 May, 2013

1 commit

  • of_mdiobus_register creates a phy_device even if get_phy_device failed
    to create it previously. This causes indefinite polling on non-existent
    PHYs. This fix makes of_mdio_register rely on get_phy_device to
    properly create the device or fail otherwise.

    Signed-off-by: Sebastian Hesselbarth
    Signed-off-by: David S. Miller

    Sebastian Hesselbarth
     

05 May, 2013

1 commit

  • Pull ARM SoC driver changes from Olof Johansson:
    "This is a rather large set of patches for device drivers that for one
    reason or another the subsystem maintainer preferred to get merged
    through the arm-soc tree. There are both new drivers as well as
    existing drivers that are getting converted from platform-specific
    code into standalone drivers using the appropriate subsystem specific
    interfaces.

    In particular, we can now have pinctrl, clk, clksource and irqchip
    drivers in one file per driver, without the need to call into platform
    specific interface, or to get called from platform specific code, as
    long as all information about the hardware is provided through a
    device tree.

    Most of the drivers we touch this time are for clocksource. Since now
    most of them are part of drivers/clocksource, I expect that we won't
    have to touch these again from arm-soc and can let the clocksource
    maintainers take care of these in the future.

    Another larger part of this series is specific to the exynos platform,
    which is seeing some significant effort in upstreaming and
    modernization of its device drivers this time around, which
    unfortunately is also the cause for the churn and a lot of the merge
    conflicts.

    There is one new subsystem that gets merged as part of this series:
    the reset controller interface, which is a very simple interface for
    taking devices on the SoC out of reset or back into reset. Patches to
    use this interface on i.MX follow later in this merge window, and we
    are going to have other platforms (at least tegra and sirf) get
    converted in 3.11. This will let us get rid of platform specific
    callbacks in a number of platform independent device drivers."

    * tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (256 commits)
    irqchip: s3c24xx: add missing __init annotations
    ARM: dts: Disable the RTC by default on exynos5
    clk: exynos5250: Fix parent clock for sclk_mmc{0,1,2,3}
    ARM: exynos: restore mach/regs-clock.h for exynos5
    clocksource: exynos_mct: fix build error on non-DT
    pinctrl: vt8500: wmt: Fix checking return value of pinctrl_register()
    irqchip: vt8500: Convert arch-vt8500 to new irqchip infrastructure
    reset: NULL deref on allocation failure
    reset: Add reset controller API
    dt: describe base reset signal binding
    ARM: EXYNOS: Add arm-pmu DT binding for exynos421x
    ARM: EXYNOS: Add arm-pmu DT binding for exynos5250
    ARM: EXYNOS: Enable PMUs for exynos4
    irqchip: exynos-combiner: Correct combined IRQs for exynos4
    irqchip: exynos-combiner: Add set_irq_affinity function for combiner_irq
    ARM: EXYNOS: fix compilation error introduced due to common clock migration
    clk: exynos5250: Fix divider values for sclk_mmc{0,1,2,3}
    clk: exynos4: export clocks required for fimc-is
    clk: samsung: Fix compilation error
    clk: tegra: fix enum tegra114_clk to match binding
    ...

    Linus Torvalds
     

02 May, 2013

3 commits

  • Pull VFS updates from Al Viro,

    Misc cleanups all over the place, mainly wrt /proc interfaces (switch
    create_proc_entry to proc_create(), get rid of the deprecated
    create_proc_read_entry() in favor of using proc_create_data() and
    seq_file etc).

    7kloc removed.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
    don't bother with deferred freeing of fdtables
    proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
    proc: Make the PROC_I() and PDE() macros internal to procfs
    proc: Supply a function to remove a proc entry by PDE
    take cgroup_open() and cpuset_open() to fs/proc/base.c
    ppc: Clean up scanlog
    ppc: Clean up rtas_flash driver somewhat
    hostap: proc: Use remove_proc_subtree()
    drm: proc: Use remove_proc_subtree()
    drm: proc: Use minor->index to label things, not PDE->name
    drm: Constify drm_proc_list[]
    zoran: Don't print proc_dir_entry data in debug
    reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
    proc: Supply an accessor for getting the data from a PDE's parent
    airo: Use remove_proc_subtree()
    rtl8192u: Don't need to save device proc dir PDE
    rtl8187se: Use a dir under /proc/net/r8180/
    proc: Add proc_mkdir_data()
    proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
    proc: Move PDE_NET() to fs/proc/proc_net.c
    ...

    Linus Torvalds
     
  • Supply a function (proc_remove()) to remove a proc entry (and any subtree
    rooted there) by proc_dir_entry pointer rather than by name and (optionally)
    root dir entry pointer. This allows us to eliminate all remaining pde->name
    accesses outside of procfs.

    Signed-off-by: David Howells
    Acked-by: Grant Likely
    cc: linux-acpi@vger.kernel.org
    cc: openipmi-developer@lists.sourceforge.net
    cc: devicetree-discuss@lists.ozlabs.org
    cc: linux-pci@vger.kernel.org
    cc: netdev@vger.kernel.org
    cc: netfilter-devel@vger.kernel.org
    cc: alsa-devel@alsa-project.org
    Signed-off-by: Al Viro

    David Howells
     
  • Pull networking updates from David Miller:
    "Highlights (1721 non-merge commits, this has to be a record of some
    sort):

    1) Add 'random' mode to team driver, from Jiri Pirko and Eric
    Dumazet.

    2) Make it so that any driver that supports configuration of multiple
    MAC addresses can provide the forwarding database add and del
    calls by providing a default implementation and hooking that up if
    the driver doesn't have an explicit set of handlers. From Vlad
    Yasevich.

    3) Support GSO segmentation over tunnels and other encapsulating
    devices such as VXLAN, from Pravin B Shelar.

    4) Support L2 GRE tunnels in the flow dissector, from Michael Dalton.

    5) Implement Tail Loss Probe (TLP) detection in TCP, from Nandita
    Dukkipati.

    6) In the PHY layer, allow supporting wake-on-lan in situations where
    the PHY registers have to be written for it to be configured.

    Use it to support wake-on-lan in mv643xx_eth.

    From Michael Stapelberg.

    7) Significantly improve firewire IPV6 support, from YOSHIFUJI
    Hideaki.

    8) Allow multiple packets to be sent in a single transmission using
    network coding in batman-adv, from Martin Hundebøll.

    9) Add support for T5 cxgb4 chips, from Santosh Rastapur.

    10) Generalize the VXLAN forwarding tables so that there is more
    flexibility in configurating various aspects of the endpoints.
    From David Stevens.

    11) Support RSS and TSO in hardware over GRE tunnels in bxn2x driver,
    from Dmitry Kravkov.

    12) Zero copy support in nfnelink_queue, from Eric Dumazet and Pablo
    Neira Ayuso.

    13) Start adding networking selftests.

    14) In situations of overload on the same AF_PACKET fanout socket, or
    per-cpu packet receive queue, minimize drop by distributing the
    load to other cpus/fanouts. From Willem de Bruijn and Eric
    Dumazet.

    15) Add support for new payload offset BPF instruction, from Daniel
    Borkmann.

    16) Convert several drivers over to mdoule_platform_driver(), from
    Sachin Kamat.

    17) Provide a minimal BPF JIT image disassembler userspace tool, from
    Daniel Borkmann.

    18) Rewrite F-RTO implementation in TCP to match the final
    specification of it in RFC4138 and RFC5682. From Yuchung Cheng.

    19) Provide netlink socket diag of netlink sockets ("Yo dawg, I hear
    you like netlink, so I implemented netlink dumping of netlink
    sockets.") From Andrey Vagin.

    20) Remove ugly passing of rtnetlink attributes into rtnl_doit
    functions, from Thomas Graf.

    21) Allow userspace to be able to see if a configuration change occurs
    in the middle of an address or device list dump, from Nicolas
    Dichtel.

    22) Support RFC3168 ECN protection for ipv6 fragments, from Hannes
    Frederic Sowa.

    23) Increase accuracy of packet length used by packet scheduler, from
    Jason Wang.

    24) Beginning set of changes to make ipv4/ipv6 fragment handling more
    scalable and less susceptible to overload and locking contention,
    from Jesper Dangaard Brouer.

    25) Get rid of using non-type-safe NLMSG_* macros and use nlmsg_*()
    instead. From Hong Zhiguo.

    26) Optimize route usage in IPVS by avoiding reference counting where
    possible, from Julian Anastasov.

    27) Convert IPVS schedulers to RCU, also from Julian Anastasov.

    28) Support cpu fanouts in xt_NFQUEUE netfilter target, from Holger
    Eitzenberger.

    29) Network namespace support for nf_log, ebt_log, xt_LOG, ipt_ULOG,
    nfnetlink_log, and nfnetlink_queue. From Gao feng.

    30) Implement RFC3168 ECN protection, from Hannes Frederic Sowa.

    31) Support several new r8169 chips, from Hayes Wang.

    32) Support tokenized interface identifiers in ipv6, from Daniel
    Borkmann.

    33) Use usbnet_link_change() helper in USB net driver, from Ming Lei.

    34) Add 802.1ad vlan offload support, from Patrick McHardy.

    35) Support mmap() based netlink communication, also from Patrick
    McHardy.

    36) Support HW timestamping in mlx4 driver, from Amir Vadai.

    37) Rationalize AF_PACKET packet timestamping when transmitting, from
    Willem de Bruijn and Daniel Borkmann.

    38) Bring parity to what's provided by /proc/net/packet socket dumping
    and the info provided by netlink socket dumping of AF_PACKET
    sockets. From Nicolas Dichtel.

    39) Fix peeking beyond zero sized SKBs in AF_UNIX, from Benjamin
    Poirier"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1722 commits)
    filter: fix va_list build error
    af_unix: fix a fatal race with bit fields
    bnx2x: Prevent memory leak when cnic is absent
    bnx2x: correct reading of speed capabilities
    net: sctp: attribute printl with __printf for gcc fmt checks
    netlink: kconfig: move mmap i/o into netlink kconfig
    netpoll: convert mutex into a semaphore
    netlink: Fix skb ref counting.
    net_sched: act_ipt forward compat with xtables
    mlx4_en: fix a build error on 32bit arches
    Revert "bnx2x: allow nvram test to run when device is down"
    bridge: avoid OOPS if root port not found
    drivers: net: cpsw: fix kernel warn on cpsw irq enable
    sh_eth: use random MAC address if no valid one supplied
    3c509.c: call SET_NETDEV_DEV for all device types (ISA/ISAPnP/EISA)
    tg3: fix to append hardware time stamping flags
    unix/stream: fix peeking with an offset larger than data in queue
    unix/dgram: fix peeking with an offset larger than data in queue
    unix/dgram: peek beyond 0-sized skbs
    openvswitch: Remove unneeded ovs_netdev_get_ifindex()
    ...

    Linus Torvalds
     

17 Apr, 2013

2 commits


09 Apr, 2013

1 commit

  • Using DT for mdiobus and ethernet-phy requires to know the PHY address, which
    is hard to guess if you don't know it. This patch extends of_mdiobus_register
    to scan mdiobus for PHYs if reg property of the corresponding node is not set.
    This also allows to have phy nodes in SoC DT files where the reg property can
    be overwritten in the board file later. To encourage people to finally set the
    actual phy address, the mdiobus scan is noisier than required.

    Signed-off-by: Sebastian Hesselbarth
    Signed-off-by: David S. Miller

    Sebastian Hesselbarth
     

04 Apr, 2013

2 commits

  • Several functions in of/base.c have the same code duplicated for
    finding and validating a property and value.

    struct property *prop = of_find_property(np, propname, NULL);
    if (!prop)
    return -EINVAL;
    if (!prop->value)
    return -ENODATA;
    if ( > prop->length)
    return -EOVERFLOW;

    This patch adds of_find_property_value_of_size() which performs the
    equivalent of the above code and removes the instances where it was
    duplicated in several functions.

    Reported-by: Rob Herring
    Signed-off-by: Tony Prisk
    Acked-by: Linus Walleij
    Acked-by: Rob Herring

    Tony Prisk
     
  • This patch adds an of_property_read_u32_index() function to allow
    reading a single indexed u32 value from a property containing multiple
    u32 values.

    Signed-off-by: Tony Prisk
    Reviewed-by: Stephen Warren
    Acked-by: Linus Walleij
    Acked-by: Rob Herring

    Tony Prisk
     

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

1 commit

  • 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