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 as published by
    the free software foundation version 2 of the license

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

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

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

    Thomas Gleixner
     

21 May, 2019

2 commits

  • Add SPDX license identifiers to all Make/Kconfig files which:

    - Have no license information of any form

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Add SPDX license identifiers to all files which:

    - Have no license information of any form

    - Have EXPORT_.*_SYMBOL_GPL inside which was used in the
    initial scan/conversion to ignore the file

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

15 Mar, 2018

1 commit

  • Some older PCI attached MEN FPGAs use an Altera PCI Vendor ID instead
    of the MEN one. Add it to the PCI ID table so the driver automatically
    attaches to it.

    Signed-off-by: Johannes Thumshirn
    Reported-by: Ben Turner
    Tested-by: Ben Turner
    Cc: Andreas Geißler
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Greg Kroah-Hartman

    Johannes Thumshirn
     

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
     

06 Sep, 2017

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc driver update for 4.14-rc1.

    Lots of different stuff in here, it's been an active development cycle
    for some reason. Highlights are:

    - updated binder driver, this brings binder up to date with what
    shipped in the Android O release, plus some more changes that
    happened since then that are in the Android development trees.

    - coresight updates and fixes

    - mux driver file renames to be a bit "nicer"

    - intel_th driver updates

    - normal set of hyper-v updates and changes

    - small fpga subsystem and driver updates

    - lots of const code changes all over the driver trees

    - extcon driver updates

    - fmc driver subsystem upadates

    - w1 subsystem minor reworks and new features and drivers added

    - spmi driver updates

    Plus a smattering of other minor driver updates and fixes.

    All of these have been in linux-next with no reported issues for a
    while"

    * tag 'char-misc-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (244 commits)
    ANDROID: binder: don't queue async transactions to thread.
    ANDROID: binder: don't enqueue death notifications to thread todo.
    ANDROID: binder: Don't BUG_ON(!spin_is_locked()).
    ANDROID: binder: Add BINDER_GET_NODE_DEBUG_INFO ioctl
    ANDROID: binder: push new transactions to waiting threads.
    ANDROID: binder: remove proc waitqueue
    android: binder: Add page usage in binder stats
    android: binder: fixup crash introduced by moving buffer hdr
    drivers: w1: add hwmon temp support for w1_therm
    drivers: w1: refactor w1_slave_show to make the temp reading functionality separate
    drivers: w1: add hwmon support structures
    eeprom: idt_89hpesx: Support both ACPI and OF probing
    mcb: Fix an error handling path in 'chameleon_parse_cells()'
    MCB: add support for SC31 to mcb-lpc
    mux: make device_type const
    char: virtio: constify attribute_group structures.
    Documentation/ABI: document the nvmem sysfs files
    lkdtm: fix spelling mistake: "incremeted" -> "incremented"
    perf: cs-etm: Fix ETMv4 CONFIGR entry in perf.data file
    nvmem: include linux/err.h from header
    ...

    Linus Torvalds
     

01 Sep, 2017

2 commits

  • If 'chameleon_get_bar()' fails, we will return 0, which mean success.
    We should return the corresponding error code instead.

    Remove the useless initialisation of 'ret' which was hiding the issue.
    (if 'ret' is not set, gcc generates a warning ("warning: ‘ret’ may be used
    uninitialized in this function"))

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

    Christophe JAILLET
     
  • This patch adds the resources and DMI ID's for the MEN SC31,
    which uses a different address region to map the LPC bus than
    the one used for the existing SC24.

    Signed-off-by: Michael Moese
    [jth add stable tag]
    Cc: (v4.9+)
    Signed-off-by: Johannes Thumshirn
    Signed-off-by: Greg Kroah-Hartman

    Michael Moese
     

29 Aug, 2017

1 commit


15 Nov, 2016

1 commit


27 Sep, 2016

2 commits

  • When performing DMA operations on a MCB device, the device needed
    for using the DMA API is "mcb_device->bus_carrier".
    This is rather lengthy, so a shortcut is introduced to struct mcb_device
    in order to ensure the MCB device driver uses the correct device for DMA
    operations.

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

    Michael Moese
     
  • In order to successfully perform DMA operations on PCI devices,
    it is necessary to enble PCI bus mastering, so enable it by default.

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

    Michael Moese
     

31 Aug, 2016

3 commits

  • 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
     
  • 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
     

14 Jun, 2016

2 commits

  • Acquire a reference to the carrier's kernel module in bus code, so
    it can't be removed from the kernel while it still has a bus and thus
    possibly devices attached to it.

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

    Johannes Thumshirn
     
  • mcb_probe() does not aqcuire a reference to the probed device but drops one
    when removing the device. As it is actually using the device, it should grab
    a reference via get_device().

    This could lead to a panic found with a rmmod/modprobe stress test

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

    Johannes Thumshirn
     

04 May, 2016

6 commits

  • The num_cells variable is only used in the dev_dbg print,
    but we can directly use the ret variable which also includes the same
    value.

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

    Andreas Werner
     
  • The bar number is found in reg2 within the gdd. Therefore
    we need to change the assigment from reg1 to reg2 which
    is the correct location.

    Signed-off-by: Andreas Werner
    Fixes: '3764e82e5' drivers: Introduce MEN Chameleon Bus
    Cc: stable@vger.kernel.org # v3.15+
    Signed-off-by: Johannes Thumshirn
    Signed-off-by: Greg Kroah-Hartman

    Andreas Werner
     
  • Replaced ioremap with devm_ioremap and request_mem_region with
    devm_request_mem_region. This makes the code much more cleaner.

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

    Andreas Werner
     
  • The mcb_bus structure previously was released in mcb_release_bus. This lead to
    the following warning on module unload:

    ------------[ cut here ]------------
    WARNING: CPU: 1 PID: 2032 at drivers/base/core.c:251 device_release+0x73/0x90
    Device 'mcb:0' does not have a release() function, it is broken and must be fixed.
    Modules linked in: men_z135_uart mcb_pci(-) mcb
    CPU: 1 PID: 2032 Comm: rmmod Not tainted 4.6.0-rc4+ #3
    Hardware name: N/A N/A/COMe-mBTi10, BIOS MVV1R921 X64 10/14/2015
    00000286 00000286 c0117de4 c12d6f16 c0117e2c c18be0d3 c0117dfc c104f6e1
    000000fb f5ccbe08 f5ccbe00 f5c64600 c0117e18 c104f728 00000009 00000000
    c0117e10 c18db674 c0117e2c c0117e3c c13ce5c3 c18be0d3 000000fb c18db674
    Call Trace:
    [] dump_stack+0x47/0x61
    [] __warn+0xc1/0xe0
    [] warn_slowpath_fmt+0x28/0x30
    [] device_release+0x73/0x90
    [] kobject_release+0x34/0x80
    [] ? kobject_del+0x2d/0x40
    [] kobject_put+0x25/0x50
    [] put_device+0xf/0x20
    [] klist_devices_put+0xb/0x10
    [] klist_next+0x73/0xf0
    [] ? unbind_store+0x100/0x100
    [] ? mcb_bus_add_devices+0x30/0x30 [mcb]
    [] bus_for_each_dev+0x51/0x80
    [] mcb_release_bus+0x19/0x40 [mcb]
    [] ? mcb_bus_add_devices+0x30/0x30 [mcb]
    [] mcb_pci_remove+0x13/0x20 [mcb_pci]
    [] pci_device_remove+0x28/0xb0
    [] __device_release_driver+0x7b/0x110
    [] driver_detach+0x87/0x90
    [] bus_remove_driver+0x3b/0x80
    [] driver_unregister+0x20/0x50
    [] pci_unregister_driver+0x13/0x60
    [] mcb_pci_driver_exit+0xd/0xf [mcb_pci]
    [] SyS_delete_module+0x138/0x200
    [] ? ____fput+0x8/0x10
    [] ? task_work_run+0x74/0x90
    [] do_fast_syscall_32+0x69/0x120
    [] sysenter_past_esp+0x40/0x6a
    ---[ end trace 1ed34c2aa3019875 ]---

    Release a mcb_bus' memory on the device's release callback, to avoid above
    warning.

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

    Johannes Thumshirn
     
  • Export information about the bus stored in the FPGA's header to userspace via
    sysfs, instead of hiding it in pr_debug()s from everyone.

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

    Johannes Thumshirn
     
  • The mcb bus' device member wasn't correctly initialized and thus wasn't placed
    correctly into the driver model.

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

    Johannes Thumshirn
     

29 Oct, 2015

2 commits


05 Oct, 2015

1 commit

  • If a MCB PCI Carrier device is IO mapped insted of memory-mapped,
    the memory of the PCI device is still not unmapped.

    Also the patch adds deallocation of the bus
    if chameleon_parse_cells() fails.

    Found by Linux Driver Verification project (linuxtesting.org).

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

    Alexey Khoroshilov
     

03 Apr, 2015

1 commit


04 Feb, 2015

1 commit

  • If a MCB PCI Carrier device is IO mapped insted of memory-mapped (which is
    currently unsupported by the upstream driver) the probe function bails out
    with -ENOTSUPP.

    In this case the memory of the PCI device was not unmapped.
    Also rename error label to reflect what will happen at the destination (suggested
    by Julia Lawall .

    Signed-off-by: Johannes Thumshirn
    Reported-by: kbuild test robot
    Signed-off-by: Greg Kroah-Hartman

    Johannes Thumshirn
     

10 Jan, 2015

1 commit

  • Currently it is not possible to have a kernel with built-in MCB attached
    devices. This results out of the fact that mcb-pci requests PCI BAR 0, then
    parses the chameleon table and calls the driver's probe function before
    releasing BAR 0 again. When building the kernel with modules this is not a
    problem (and therefore it wasn't detected by my tests yet).

    A solution is to only remap the 1st 0x200 bytes of a Chameleon PCI device.
    0x200 bytes is the maximum size of a Chameleon v2 Table.

    Also this patch stops disabling the PCI device on successful registration of MCB
    devices.

    Signed-off-by: Johannes Thumshirn
    Suggested-by: Bjorn Helgaas
    Reviewed-by: Bjorn Helgaas
    Signed-off-by: Greg Kroah-Hartman

    Johannes Thumshirn
     

28 May, 2014

1 commit


17 Apr, 2014

1 commit


10 Mar, 2014

1 commit


09 Mar, 2014

1 commit

  • Coverage builds found this build fail in ARM ebsa110_defconfig:

    drivers/mcb/mcb-parse.c: In function 'chameleon_parse_cells':
    drivers/mcb/mcb-parse.c:105:2: error: implicit declaration of function 'memcpy_fromio' [-Werror=implicit-function-declaration]
    cc1: some warnings being treated as errors
    make[2]: *** [drivers/mcb/mcb-parse.o] Error 1

    A simple bisect will output this:

    3764e82e5150d87b205c10cd78a9c9ab86fbfa51 is the first bad commit
    commit 3764e82e5150d87b205c10cd78a9c9ab86fbfa51
    Author: Johannes Thumshirn
    Date: Wed Feb 26 17:29:05 2014 +0100

    drivers: Introduce MEN Chameleon Bus

    The above commit used "default m" which is wrong. New drivers
    should never be globally enabled with "default y/m". Whether
    this driver makes sense to build on ARM is an independent issue.

    Here we delete the "default m" line, which is the equivalent of
    "default n".

    Cc: Johannes Thumshirn
    Cc: Greg Kroah-Hartman
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Greg Kroah-Hartman

    Paul Gortmaker
     

01 Mar, 2014

2 commits