03 Apr, 2020

2 commits


29 Oct, 2019

1 commit

  • We should close fd before the return of run_test.

    Fixes: 3f2ed8134834 ("tools: PCI: Add a userspace tool to test PCI endpoint")
    Signed-off-by: Hewenliang
    Signed-off-by: Lorenzo Pieralisi
    Acked-by: Kishon Vijay Abraham I

    Hewenliang
     

16 Jul, 2019

1 commit

  • Pull PCI updates from Bjorn Helgaas:
    "Enumeration changes:

    - Evaluate PCI Boot Configuration _DSM to learn if firmware wants us
    to preserve its resource assignments (Benjamin Herrenschmidt)

    - Simplify resource distribution (Nicholas Johnson)

    - Decode 32 GT/s link speed (Gustavo Pimentel)

    Virtualization:

    - Fix incorrect caching of VF config space size (Alex Williamson)

    - Fix VF driver probing sysfs knobs (Alex Williamson)

    Peer-to-peer DMA:

    - Fix dma_virt_ops check (Logan Gunthorpe)

    Altera host bridge driver:

    - Allow building as module (Ley Foon Tan)

    Armada 8K host bridge driver:

    - add PHYs support (Miquel Raynal)

    DesignWare host bridge driver:

    - Export APIs to support removable loadable module (Vidya Sagar)

    - Enable Relaxed Ordering erratum workaround only on Tegra20 &
    Tegra30 (Vidya Sagar)

    Hyper-V host bridge driver:

    - Fix use-after-free in eject (Dexuan Cui)

    Mobiveil host bridge driver:

    - Clean up and fix many issues, including non-identify mapped
    windows, 64-bit windows, multi-MSI, class code, INTx clearing (Hou
    Zhiqiang)

    Qualcomm host bridge driver:

    - Use clk bulk API for 2.4.0 controllers (Bjorn Andersson)

    - Add QCS404 support (Bjorn Andersson)

    - Assert PERST for at least 100ms (Niklas Cassel)

    R-Car host bridge driver:

    - Add r8a774a1 DT support (Biju Das)

    Tegra host bridge driver:

    - Add support for Gen2, opportunistic UpdateFC and ACK (PCIe protocol
    details) AER, GPIO-based PERST# (Manikanta Maddireddy)

    - Fix many issues, including power-on failure cases, interrupt
    masking in suspend, UPHY settings, AFI dynamic clock gating,
    pending DLL transactions (Manikanta Maddireddy)

    Xilinx host bridge driver:

    - Fix NWL Multi-MSI programming (Bharat Kumar Gogada)

    Endpoint support:

    - Fix 64bit BAR support (Alan Mikhak)

    - Fix pcitest build issues (Alan Mikhak, Andy Shevchenko)

    Bug fixes:

    - Fix NVIDIA GPU multi-function power dependencies (Abhishek Sahu)

    - Fix NVIDIA GPU HDA enablement issue (Lukas Wunner)

    - Ignore lockdep for sysfs "remove" (Marek Vasut)

    Misc:

    - Convert docs to reST (Changbin Du, Mauro Carvalho Chehab)"

    * tag 'pci-v5.3-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (107 commits)
    PCI: Enable NVIDIA HDA controllers
    tools: PCI: Fix installation when `make tools/pci_install`
    PCI: dwc: pci-dra7xx: Fix compilation when !CONFIG_GPIOLIB
    PCI: Fix typos and whitespace errors
    PCI: mobiveil: Fix INTx interrupt clearing in mobiveil_pcie_isr()
    PCI: mobiveil: Fix infinite-loop in the INTx handling function
    PCI: mobiveil: Move PCIe PIO enablement out of inbound window routine
    PCI: mobiveil: Add upper 32-bit PCI base address setup in inbound window
    PCI: mobiveil: Add upper 32-bit CPU base address setup in outbound window
    PCI: mobiveil: Mask out hardcoded bits in inbound/outbound windows setup
    PCI: mobiveil: Clear the control fields before updating it
    PCI: mobiveil: Add configured inbound windows counter
    PCI: mobiveil: Fix the valid check for inbound and outbound windows
    PCI: mobiveil: Clean-up program_{ib/ob}_windows()
    PCI: mobiveil: Remove an unnecessary return value check
    PCI: mobiveil: Fix error return values
    PCI: mobiveil: Refactor the MEM/IO outbound window initialization
    PCI: mobiveil: Make some register updates more readable
    PCI: mobiveil: Reformat the code for readability
    dt-bindings: PCI: mobiveil: Change gpio_slave and apb_csr to optional
    ...

    Linus Torvalds
     

10 Jul, 2019

1 commit

  • The commit c9a707875053 ("tools pci: Do not delete pcitest.sh in 'make clean'")
    fixed a `make tools clean` issue and simultaneously brought a regression
    to the installation process:

    for script in .../tools/pci/pcitest.sh; do \
    install $script .../usr/usr/bin; \
    done
    install: cannot stat '.../tools/pci/pcitest.sh': No such file or directory

    Update the install commands to fix the remaining issue.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Lorenzo Pieralisi
    Acked-by: Kishon Vijay Abraham I
    Cc: Jean-Jacques Hiblot
    Cc: Kishon Vijay Abraham I
    Cc: Lorenzo Pieralisi
    Cc: Arnaldo Carvalho de Melo

    Andy Shevchenko
     

05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 of
    the license as published by the free software foundation this
    program is distributed in the hope that it will be useful but
    without any warranty without even the implied warranty of
    merchantability or fitness for a particular purpose see the gnu
    general public license for more details you should have received a
    copy of the gnu general public license along with this program if
    not see http www gnu org licenses

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 8 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Reviewed-by: Alexios Zavras
    Reviewed-by: Armijn Hemel
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190530000437.144869442@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

30 May, 2019

2 commits

  • Fix the following compiler warning in pcitest:

    pcitest.c: In function main:
    pcitest.c:214:4: warning: too many arguments for
    format [-Wformat-extra-args]
    "usage: %s [options]\n"

    Fixes: fbca0b284bd0 ("tools: PCI: Add 'h' in optstring of getopt()")
    Signed-off-by: Alan Mikhak
    Signed-off-by: Lorenzo Pieralisi
    Reviewed-by: Paul Walmsley

    Alan Mikhak
     
  • pcitest is currently broken due to the following compiler error
    and related warning. Fix by changing the run_test() function
    signature to return an integer result.

    pcitest.c: In function run_test:
    pcitest.c:143:9: warning: return with a value, in function
    returning void
    return (ret < 0) ? ret : 1 - ret; /* return 0 if test succeeded */

    pcitest.c: In function main:
    pcitest.c:232:9: error: void value not ignored as it ought to be
    return run_test(test);

    Fixes: fef31ecaaf2c ("tools: PCI: Fix compilation warnings")
    Signed-off-by: Alan Mikhak
    Signed-off-by: Lorenzo Pieralisi
    Reviewed-by: Paul Walmsley

    Alan Mikhak
     

18 May, 2019

1 commit

  • …ux/kernel/git/acme/linux into perf/core

    Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

    perf.data:

    Alexey Budankov:

    - Streaming compression of perf ring buffer into PERF_RECORD_COMPRESSED
    user space records, resulting in ~3-5x perf.data file size reduction
    on variety of tested workloads what saves storage space on larger
    server systems where perf.data size can easily reach several tens or
    even hundreds of GiBs, especially when profiling with DWARF-based
    stacks and tracing of context switches.

    perf record:

    Arnaldo Carvalho de Melo

    - Improve -user-regs/intr-regs suggestions to overcome errors.

    perf annotate:

    Jin Yao:

    - Remove hist__account_cycles() from callback, speeding up branch processing
    (perf record -b).

    perf stat:

    - Add a 'percore' event qualifier, e.g.: -e cpu/event=0,umask=0x3,percore=1/,
    that sums up the event counts for both hardware threads in a core.

    We can already do this with --per-core, but it's often useful to do
    this together with other metrics that are collected per hardware thread.

    I.e. now its possible to do this per-event, and have it mixed with other
    events not aggregated by core.

    core libraries:

    Donald Yandt:

    - Check for errors when doing fgets(/proc/version).

    Jiri Olsa:

    - Speed up report for perf compiled with linbunwind.

    tools headers:

    Arnaldo Carvalho de Melo

    - Update memcpy_64.S, x86's kvm.h and pt_regs.h.

    arm64:

    Florian Fainelli:

    - Map Brahma-B53 CPUID to cortex-a53 events.

    - Add Cortex-A57 and Cortex-A72 events.

    csky:

    Mao Han:

    - Add DWARF register mappings for libdw, allowing --call-graph=dwarf to work
    on the C-SKY arch.

    x86:

    Andi Kleen/Kan Liang:

    - Add support for recording and printing XMM registers, available, for
    instance, on Icelake.

    Kan Liang:

    - Add uncore_upi (Intel's "Ultra Path Interconnect" events) JSON support.
    UPI replaced the Intel QuickPath Interconnect (QPI) in Xeon Skylake-SP.

    Intel PT:

    Adrian Hunter

    . Fix instructions sampling rate.

    . Timestamp fixes.

    . Improve exported-sql-viewer GUI, allowing, for instance, to copy'n'paste
    the trees, useful for e-mailing.

    Documentation:

    Thomas Richter:

    - Add description for 'perf --debug stderr=1', which redirects stderr to stdout.

    libtraceevent:

    Tzvetomir Stoyanov:

    - Add man pages for the various APIs.

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     

16 May, 2019

1 commit

  • When running 'make -C tools clean' I noticed that a revision controlled
    file was being deleted:

    $ git diff
    diff --git a/tools/pci/pcitest.sh b/tools/pci/pcitest.sh
    deleted file mode 100644
    index 75ed48ff2990..000000000000
    --- a/tools/pci/pcitest.sh
    +++ /dev/null
    @@ -1,72 +0,0 @@
    -#!/bin/sh
    -# SPDX-License-Identifier: GPL-2.0
    -
    -echo "BAR tests"
    -echo

    So I changed the make variables to fix that, testing it should produce
    the same intended result while not deleting revision controlled files.

    $ make O=/tmp/build/pci -C tools/pci install
    make: Entering directory '/home/acme/git/perf/tools/pci'
    make -f /home/acme/git/perf/tools/build/Makefile.build dir=. obj=pcitest
    install -d -m 755 /usr/bin; \
    for program in /tmp/build/pci/pcitest pcitest.sh; do \
    install $program /usr/bin; \
    done
    install: cannot change permissions of ‘/usr/bin’: Operation not permitted
    install: cannot create regular file '/usr/bin/pcitest': Permission denied
    install: cannot create regular file '/usr/bin/pcitest.sh': Permission denied
    make: *** [Makefile:46: install] Error 1
    make: Leaving directory '/home/acme/git/perf/tools/pci'
    $ ls -la /tmp/build/pci/pcitest
    -rwxrwxr-x. 1 acme acme 27152 May 13 13:52 /tmp/build/pci/pcitest
    $ /tmp/build/pci/pcitest
    can't open PCI Endpoint Test device: No such file or directory
    $

    Cc: Adrian Hunter
    Cc: Gustavo Pimentel
    Cc: Jiri Olsa
    Cc: Kishon Vijay Abraham I
    Cc: Lorenzo Pieralisi
    Cc: Namhyung Kim
    Fixes: 1ce78ce09430 ("tools: PCI: Change pcitest compiling process")
    Link: https://lkml.kernel.org/n/tip-9re6bd7eh9epi3koslkv3ocn@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

11 Apr, 2019

2 commits

  • Handling pcitest.sh along with pcitest (obtained by compiling
    pcitest.c) results in pcitest.sh getting removed inadvertently
    while "make -C tools/pci clean".

    Fix it by handling pcitest.sh independently of pcitest.

    Fixes: 1ce78ce09430 ("tools: PCI: Change pcitest compiling process")
    Reported-by: Adrian Hunter
    Signed-off-by: Kishon Vijay Abraham I
    Signed-off-by: Lorenzo Pieralisi
    Cc: Gustavo Pimentel

    Kishon Vijay Abraham I
     
  • 'h' is a valid option character for the pcitest tool used to print
    the pcitest usage.

    Add 'h' in optstring of getopt() in order to get rid of "pcitest:
    invalid option -- 'h'" warning.

    While at that remove unncessary case '?'.

    Signed-off-by: Kishon Vijay Abraham I
    Signed-off-by: Sekhar Nori
    Signed-off-by: Lorenzo Pieralisi

    Kishon Vijay Abraham I
     

22 Mar, 2019

1 commit


03 Oct, 2018

2 commits

  • Change tool compiling process in order to be build using the same
    mechanism used in other linux tools (e.g. iio, perf, etc). This will
    allow in future the buildroot tool to build and integrate this tool in
    a more expeditious way.

    Update documentation accordingly.

    Signed-off-by: Gustavo Pimentel
    Signed-off-by: Lorenzo Pieralisi
    Reviewed-by: Kishon Vijay Abraham I

    Gustavo Pimentel
     
  • Current compilation produces the following warnings:

    tools/pci/pcitest.c: In function 'run_test':
    tools/pci/pcitest.c:56:9: warning: unused variable 'time'
    [-Wunused-variable]
    double time;
    ^~~~
    tools/pci/pcitest.c:55:25: warning: unused variable 'end'
    [-Wunused-variable]
    struct timespec start, end;
    ^~~
    tools/pci/pcitest.c:55:18: warning: unused variable 'start'
    [-Wunused-variable]
    struct timespec start, end;
    ^~~~~
    tools/pci/pcitest.c:146:1: warning: control reaches end of non-void
    function [-Wreturn-type]
    }
    ^

    Fix them:
    - remove unused variables
    - change function return from int to void, since it's not used

    Signed-off-by: Gustavo Pimentel
    [lorenzo.pieralisi@arm.com: rewrote the commit log]
    Signed-off-by: Lorenzo Pieralisi
    Reviewed-by: Kishon Vijay Abraham I

    Gustavo Pimentel
     

19 Jul, 2018

1 commit

  • Add MSI-X support to pcitest tool.

    Modify pcitest.sh script to accommodate MSI-X interrupt tests.

    Update documentation accordingly.

    Signed-off-by: Gustavo Pimentel
    Signed-off-by: Lorenzo Pieralisi
    Acked-by: Kishon Vijay Abraham I

    Gustavo Pimentel
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

30 Aug, 2017

1 commit


28 Apr, 2017

2 commits