31 Aug, 2016

40 commits

  • This patch removes module_init()/module_exit() from driver code by using
    module_misc_device() macro. All modules in this patch has a print
    statement which is removed when module_misc_device() macro is used.
    If undesirable this patch can be dropped entirely, this is the only
    purpose of making this as a separate patch.

    Signed-off-by: PrasannaKumar Muralidharan
    Signed-off-by: Greg Kroah-Hartman

    PrasannaKumar Muralidharan
     
  • Many modules call misc_register and misc_deregister in its module init
    and exit methods without any additional code. This ends up being
    boilerplate. This patch adds helper macro module_misc_device(), that
    replaces module_init()/ module_exit() with template functions.

    This patch also converts drivers to use new macro.

    Change since v1:
    Add device.h include in miscdevice.h as module_driver macro was not
    available from other include files in some architectures.

    Signed-off-by: PrasannaKumar Muralidharan
    Signed-off-by: Greg Kroah-Hartman

    PrasannaKumar Muralidharan
     
  • Patches merged to the IIO BMP085 driver makes it fully compliant
    with all features found in this old misc driver. Retire this old
    driver in favor of the new one in the proper subsystem.

    Cc: Jonathan Cameron
    Cc: Marek Belisko
    Acked-by: H. Nikolaus Schaller
    Signed-off-by: Linus Walleij
    Acked-by: Arnd Bergmann
    Signed-off-by: Greg Kroah-Hartman

    Linus Walleij
     
  • ver_linux.awk renamed to ver_linux.

    Signed-off-by: Alexander Kapshuk
    Signed-off-by: Greg Kroah-Hartman

    Alexander Kapshuk
     
  • The shell implementation removed. To be replaced with an all-awk implementation via consecutive patch.

    Signed-off-by: Alexander Kapshuk
    Signed-off-by: Greg Kroah-Hartman

    Alexander Kapshuk
     
  • The algorithm that extracts the version number of the utility being
    queried, and prints the name of the utility and its version number is
    currently implemented in awk. The code is used throughout the script,
    making its use repetative. The proposed implementation confines the
    algorithm in question to a function, which makes the script easier to
    read overall, as well as considerably reduces the number of lines of
    code. Every attempt has been made to retain the look and the format
    generated by the current implementation.

    Signed-off-by: Alexander Kapshuk
    Signed-off-by: Greg Kroah-Hartman

    Alexander Kapshuk
     
  • Fix 'timeout_us' parameter description.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Greg Kroah-Hartman

    Wei Yongjun
     
  • Correct pointer notations to include whitespace between
    variable type and "*" character. Inserted blank line
    after variable declatations at two locations.
    Rearranged comparison within an if statment to have the
    constant on the right-hand side.

    Signed-off-by: Ben Werbowyj
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Ben Werbowyj
     
  • Assignment of variable count removed from within an if statment.
    This was done at two locations in the file.

    Signed-off-by: Ben Werbowyj
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Ben Werbowyj
     
  • Inserted whitespace between command and open parenthesis
    at two locations. Removed new line between open brace and
    command/declaration at two locations.

    Signed-off-by: Ben Werbowyj
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Ben Werbowyj
     
  • We had to say goodbye when Hans passed away recently. Hans was a
    free-software enthusiast and an active contributor. He was the main author
    and maintainer of the UIO subsystem and contributed in various ways to the
    Linux kernel as a professional and hobbyist. He is greatly missed.

    Signed-off-by: Benedikt Spranger
    Signed-off-by: Greg Kroah-Hartman

    Benedikt Spranger
     
  • This patch introduces a fake VME bridge driver. This driver currently
    emulates a subset of the VME bridge functionality. This allows some VME
    subsystem development and even some VME device driver development to be
    carried out in the absence of a proper VME bus.

    Signed-off-by: Martyn Welch
    Signed-off-by: Greg Kroah-Hartman

    Martyn Welch
     
  • The Kconfig currently controlling compilation of this code is:

    drivers/vme/Kconfig:menuconfig VME_BUS
    drivers/vme/Kconfig: bool "VME bridge support"

    ...meaning that it currently is not being built as a module by anyone.

    Lets remove the modular code that is essentially orphaned, so that
    when reading the driver there is no doubt it is builtin-only.

    We replace module.h and moduleparam.h (unused) with init.h and also
    export.h ; the latter since this file does export some syms.

    Since this is a struct bus_type and not a platform_driver, we don't
    have any ".suppress_bind_attrs" to be concerned about when we
    drop the ".remove" code from this file.

    Since module_init was not in use by this code, the init ordering
    remains unchanged with this commit.

    Cc: Manohar Vanga
    Signed-off-by: Paul Gortmaker
    Acked-by: Martyn Welch
    Signed-off-by: Greg Kroah-Hartman

    Paul Gortmaker
     
  • These drivers have a PCI device ID table but the PCI module
    alias information is not created so module autoloading won't work.

    Signed-off-by: Alessio Igor Bogani
    Acked-by: Martyn Welch
    Signed-off-by: Greg Kroah-Hartman

    Alessio Igor Bogani
     
  • The vme_register_driver() api changed in commit 5d6abf379d73 ("staging:
    vme: make match() driver specific to improve non-VME64x support") but the
    documentation wasn't updated. Update the documentation to match the API.

    Signed-off-by: Martyn Welch
    Signed-off-by: Greg Kroah-Hartman

    Martyn Welch
     
  • Make the location monitor callback function prototype more useful by
    changing the argument from an integer to a void pointer.

    All VME bridge drivers were simply passing the location monitor index
    (e.g. 0-3) as the argument to these callbacks. It is much more useful
    to pass back a pointer to data that the callback-registering driver
    cares about.

    There appear to be no in-kernel callers of vme_lm_attach (or
    vme_lme_request for that matter), so this change only affects the VME
    subsystem and bridge drivers.

    This has been tested with Tsi148 hardware, but the CA91Cx42 changes
    have only been compiled.

    Signed-off-by: Aaron Sierra
    Acked-by: Martyn Welch
    Signed-off-by: Greg Kroah-Hartman

    Aaron Sierra
     
  • Use memdup_user to duplicate a memory region from user-space to
    kernel-space, instead of open coding using kmalloc & copy_from_user.

    Signed-off-by: Muhammad Falak R Wani
    Signed-off-by: Greg Kroah-Hartman

    Muhammad Falak R Wani
     
  • The MEN Chameleon specification states that a chameleon FPGA can include a
    bridge descriptor, which then opens up a new bus behind this bridge. MCB
    included subdevice handling code in the core, but no support for bus
    descriptors in the parser, due to a lack of hardware access.

    As this is technically dead code, but it gets executed on a device add,
    I've decided to remove it.

    Signed-off-by: Johannes Thumshirn
    Signed-off-by: Greg Kroah-Hartman

    Johannes Thumshirn
     
  • The to_mcb_{bus,device,driver}() macros lacked type safety, so convert them to
    inline functions to enforce compile time type checking.

    Signed-off-by: Johannes Thumshirn
    Signed-off-by: Greg Kroah-Hartman

    Johannes Thumshirn
     
  • Added support for the bar descriptor. This type is used for FPGAs
    connect to the LPC or to a non PCI bus.

    The Bar descriptor could have a maximum of 6 BARs. Each of the
    devices within the FPGA could be mapped to a different BAR.
    The BAR descriptor is comparable to the PCI header.

    Signed-off-by: Andreas Werner
    [ free bar descriptor in the non-error case ]
    Signed-off-by: Johannes Thumshirn
    Signed-off-by: Greg Kroah-Hartman

    Andreas Werner
     
  • Add support for MCB bases FPGAs connected to the LPC or
    non PCI Bus.

    This driver currently supports the SC24 board. The FPGA
    is connected to the LPC bus and is identified using the BIOS
    DMI string.

    Signed-off-by: Andreas Werner
    Signed-off-by: Johannes Thumshirn
    Signed-off-by: Greg Kroah-Hartman

    Andreas Werner
     
  • The variable i contains a total number of resources (including
    IORESOURCE_IRQ). However, we want the dmem_region_start to point
    after the last resource of type IORESOURCE_MEM. The original behaviour
    leads (very likely) to skipping several UIO mapping regions and makes
    them useless. Fix this by computing dmem_region_start from the uiomem
    which points to the last used UIO mapping.

    Fixes: 0a0c3b5a24bd ("Add new uio device for dynamic memory allocation")

    Signed-off-by: Jan Viktorin
    Signed-off-by: Greg Kroah-Hartman

    Jan Viktorin
     
  • With this patch we add start/stop filtering as specified on
    the perf cmd line. When the IP matches the start address
    trace generation gets triggered. The stop condition is
    achieved when the IP matches the stop address.

    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier
     
  • This patch adds the capability to specify address ranges from
    the perf cmd line using the --filter option. If the IP
    falls within the range(s) program flow traces are generated.

    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier
     
  • The include/exclude function of a tracer is applicable to address
    range and start/stop filters. To avoid duplication and reuse code
    moving the include/exclude configuration to a function of its own.

    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier
     
  • Introducing a new function to do address range configuration
    generic enough to work for any address range and any comparator.

    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier
     
  • The default filter configuration was hard to read and included
    some redundancy. This patch attempts to stream line configuration
    and improve readability.

    No change of functionality is included.

    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier
     
  • Splitting the steps involved in the configuration of a tracer.
    The first part is generic and can be reused for both sysFS and
    Perf methods.

    The second part pertains to the configuration of filters
    themselves where the source of the information used to
    configure the filters will vary depending on the access
    methods.

    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier
     
  • This patch implements the required API needed to access
    and retrieve range and start/stop filters from the perf core.

    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier
     
  • Both ETMv3 and ETMv4 drivers are declaring an 'enum etm_addr_type',
    creating reduncancy.

    This patch removes the enumeration from the driver files and adds
    it to a common header.

    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier
     
  • With this commit [1] address range filter information is now found
    in the struct hw_perf_event::addr_filters. As such pass the event
    itself to the coresight_source::enable/disable() functions so that
    both event attribute and filter can be accessible for configuration.

    [1] 'commit 375637bc5249 ("perf/core: Introduce address range filtering")'

    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier
     
  • The ETM registers are classified into 2 categories: trace and management.
    The core power domain contains most of the trace unit logic including
    all(except TRCOSLAR and TRCOSLSR) the trace registers. The debug power
    domain contains the external debugger interface including all management
    registers.

    This patch adds coresight unit specific function coresight_simple_func
    which can be used for ETM trace registers by providing a ETM specific
    read function which does smp cross call to ensure the trace core is
    powered up before the register is accessed.

    Cc: Mathieu Poirier
    Signed-off-by: Sudeep Holla
    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Sudeep Holla
     
  • The Coresight ETMv4 architecture provides a way to request to keep the
    power to the trace unit. This might help to collect the traces without
    the need to disable the CPU power management(entering/exiting deeper
    idle states).

    Trace PowerDown Control Register provides powerup request bit which when
    set requests the system to retain power to the trace unit and emulate
    the powerdown request.

    Typically, a trace unit drives a signal to the power controller to
    request that the trace unit core power domain is powered up. However,
    if the trace unit and the CPU are in the same power domain then the
    implementation might combine the trace unit power up status with a
    signal from the CPU.

    This patch requests to retain power to the trace unit when active and
    to remove when inactive. Note this change will only request but the
    behaviour depends on the implementation. However, it matches the
    exact behaviour expected when the external debugger is connected with
    respect to CPU power states.

    Cc: Mathieu Poirier
    Signed-off-by: Sudeep Holla
    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Sudeep Holla
     
  • The kfree() function tests whether its argument is NULL and then
    returns immediately. Thus the test around the call is not needed.

    This issue was detected by using the Coccinelle software.

    Signed-off-by: Markus Elfring
    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Markus Elfring
     
  • Remove duplicated include.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Wei Yongjun
     
  • Each coresight device prepares a description for coresight_register()
    in struct coresight_desc. Once we register the device, the description is
    useless and can be freed. The coresight_desc is small enough (48bytes on
    64bit)i to be allocated on the stack. Hence use an automatic variable to
    avoid a needless dynamic allocation and wasting the memory(which will only
    be free'd when the device is destroyed).

    Cc: Mathieu Poirier
    Cc: Pratik Patel
    Signed-off-by: Suzuki K Poulose
    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     
  • of_node_put needs to be called when the device node which is got
    from of_parse_phandle has finished using.

    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Mathieu Poirier
    Signed-off-by: Peter Chen
    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Peter Chen
     
  • Signed-off-by: Olivier Schonken
    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Olivier Schonken
     
  • It is mandatory to enable a coresight block's power domain before
    trying to access management registers. Otherwise the transaction
    simply stalls, leading to a system hang.

    Signed-off-by: Mathieu Poirier
    Reviewed-by: Sudeep Holla
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier
     
  • Depending on when CoreSight device are discovered it is possible
    that some IP block may be referencing devices that have not been
    added to the bus yet. The end result is missing nodes in the
    CoreSight topology even when the devices are present and properly
    initialised.

    This patch solves the problem by asking the driver core to
    try initialising the device at a later time when the children
    of a CoreSight node are missing.

    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier