31 Dec, 2019

1 commit

  • [ Upstream commit 9f4c2b516b4f031e3cd0e45957f4150b3c1a083d ]

    Subtracting the offset delta from four-byte alignment lead to wrapping
    of the requested length where `count` is less than `off`. Generalise the
    length handling to enable and optimise aligned access sizes for all
    offset and size combinations. The new formula produces the following
    results for given offset and count values:

    offset count | length
    --------------+-------
    0 1 | 1
    0 2 | 2
    0 3 | 2
    0 4 | 4
    0 5 | 4
    1 1 | 1
    1 2 | 1
    1 3 | 1
    1 4 | 1
    1 5 | 1
    2 1 | 1
    2 2 | 2
    2 3 | 2
    2 4 | 2
    2 5 | 2
    3 1 | 1
    3 2 | 1
    3 3 | 1
    3 4 | 1
    3 5 | 1

    We might need something like this for the cfam chardevs as well, for
    example we don't currently implement any alignment restrictions /
    handling in the hardware master driver.

    Signed-off-by: Andrew Jeffery
    Signed-off-by: Joel Stanley
    Link: https://lore.kernel.org/r/20191108051945.7109-6-joel@jms.id.au
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Sasha Levin

    Andrew Jeffery
     

29 Aug, 2019

1 commit

  • The scom driver currently fails out of operations if certain system
    errors are flagged in the status register; system checkstop, special
    attention, or recoverable error. These errors won't impact the ability
    of the scom engine to perform operations, so the driver should continue
    under these conditions.
    Also, don't do a PIB reset for these conditions, since it won't help.

    Fixes: 6b293258cded ("fsi: scom: Major overhaul")
    Signed-off-by: Eddie James
    Cc: stable
    Acked-by: Jeremy Kerr
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Joel Stanley
    Link: https://lore.kernel.org/r/20190827041249.13381-1-jk@ozlabs.org
    Signed-off-by: Greg Kroah-Hartman

    Eddie James
     

04 Jul, 2019

1 commit

  • SBE fifo operations should be allowed while the SBE is in any of the
    "IPL" states. Operations should succeed in this state.

    Fixes: 9f4a8a2d7f9d fsi/sbefifo: Add driver for the SBE FIFO
    Reviewed-by: Joel Stanley
    Tested-by: Alistair Popple
    Signed-off-by: Eddie James
    Link: https://lore.kernel.org/r/1561575415-3282-1-git-send-email-eajames@linux.ibm.com
    Signed-off-by: Greg Kroah-Hartman

    Eddie James
     

03 Jul, 2019

3 commits

  • …i into char-misc-next

    Joel writes:

    FSI changes for 5.3

    - Add MAINTAINERS entry. There is now a git tree and a mailing
    list/patchwork for collecting FSI patches

    - Bug fix for error driver registration error paths

    - Correction for the OCC hwmon driver to meet the spec

    * tag 'fsi-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi:
    fsi/core: Fix error paths on CFAM init
    OCC: FSI and hwmon: Add sequence numbering
    MAINTAINERS: Add FSI subsystem

    Greg Kroah-Hartman
     
  • Change d1dcd67825 re-worked the struct fsi_slave initialisation in
    fsi_slave_init, but introduced a few inconsitencies: the slave->dev is
    now registered through cdev_device_add, but we may kfree() the device
    out from underneath the cdev registration. We may also leave an IDA
    allocated.

    This change fixes the error paths, so that we kfree() only before the
    device is registered with the core code. We also move the smode write to
    before we start creating proper devices, as it's the most likely to
    fail. We also remove the IDA-allocated minor on error, and properly
    clean up the of_node.

    Fixes: d1dcd6782576 ("fsi: Add cfam char devices")
    Reported-by: Lei YU
    Tested-by: John Wang
    Signed-off-by: Jeremy Kerr
    Signed-off-by: Joel Stanley

    Jeremy Kerr
     
  • Sequence numbering of the commands submitted to the OCC is required by
    the OCC interface specification. Add sequence numbering and check for
    the correct sequence number on the response.

    Signed-off-by: Eddie James
    Acked-by: Guenter Roeck
    Reviewed-by: Lei YU
    Signed-off-by: Joel Stanley

    Eddie James
     

23 Jun, 2019

1 commit


20 Jun, 2019

1 commit

  • This patch corrects the SPDX License Identifier style
    in header file related to Drivers for FRU Support Interface.
    For C header files Documentation/process/license-rules.rst
    mandates C-like comments (opposed to C source files where
    C++ style should be used)

    Changes made by using a script provided by Joe Perches here:
    https://lkml.org/lkml/2019/2/7/46

    Suggested-by: Joe Perches
    Signed-off-by: Nishad Kamdar
    Signed-off-by: Greg Kroah-Hartman

    Nishad Kamdar
     

19 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 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 mergchantability or
    fitness for a particular purpose see the gnu general public license
    for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

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

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

    Thomas Gleixner
     

31 May, 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 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

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

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

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 May, 2019

2 commits


03 Dec, 2018

1 commit

  • The OCC is a device embedded on a POWER processor that collects and
    aggregates sensor data from the processor and system. The OCC can
    provide the raw sensor data as well as perform thermal and power
    management on the system.

    This driver provides an atomic communications channel between a service
    processor (e.g. a BMC) and the OCC. The driver is dependent on the FSI
    SBEFIFO driver to get hardware access through the SBE to the OCC SRAM.
    Commands are issued to the SBE to send or fetch data to the SRAM.

    Signed-off-by: Eddie James
    Signed-off-by: Andrew Jeffery
    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Joel Stanley
    Signed-off-by: Guenter Roeck

    Eddie James
     

26 Nov, 2018

2 commits

  • Remove linux/cdev.h which is included more than once

    Signed-off-by: Brajeswar Ghosh
    Signed-off-by: Benjamin Herrenschmidt

    Brajeswar Ghosh
     
  • In randconfig builds without CONFIG_GENERIC_ALLOCATOR, this driver
    fails to link:

    ERROR: "gen_pool_alloc_algo" [drivers/fsi/fsi-master-ast-cf.ko] undefined!
    ERROR: "gen_pool_fixed_alloc" [drivers/fsi/fsi-master-ast-cf.ko] undefined!
    ERROR: "of_gen_pool_get" [drivers/fsi/fsi-master-ast-cf.ko] undefined!
    ERROR: "gen_pool_free" [drivers/fsi/fsi-master-ast-cf.ko] undefined!

    Select the dependency as all other users do.

    Fixes: 6a794a27daca ("fsi: master-ast-cf: Add new FSI master using Aspeed ColdFire")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Benjamin Herrenschmidt

    Arnd Bergmann
     

24 Oct, 2018

1 commit

  • In the iov_iter struct, separate the iterator type from the iterator
    direction and use accessor functions to access them in most places.

    Convert a bunch of places to use switch-statements to access them rather
    then chains of bitwise-AND statements. This makes it easier to add further
    iterator types. Also, this can be more efficient as to implement a switch
    of small contiguous integers, the compiler can use ~50% fewer compare
    instructions than it has to use bitwise-and instructions.

    Further, cease passing the iterator type into the iterator setup function.
    The iterator function can set that itself. Only the direction is required.

    Signed-off-by: David Howells

    David Howells
     

08 Aug, 2018

1 commit

  • Otherwise cronus putmem fails istep and BML fails to upload skiboot

    To do that, we still use our one-page command buffer for small commands
    for speed, and for anything bigger, with a limit of 1MB plus a page,
    we vmalloc a temporary buffer.

    The limit was chosen because Cronus will break up any data transfer
    into 1M chunks (the extra page is for the command header).

    Signed-off-by: Benjamin Herrenschmidt
    Reviewed-by: Andrew Jeffery

    Benjamin Herrenschmidt
     

06 Aug, 2018

1 commit

  • The chardev conversion forgot to copy the fsi_dev,
    silly mistake, compounded by a testing mistake on
    my side, this specific driver wasn't being tested
    properly.

    Fixes: d8f4587655f9 "fsi: scom: Convert to use the new chardev"
    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     

27 Jul, 2018

5 commits

  • The bus scanning process isn't terribly good at parallel attempts
    at rescanning the same bus. Let's have a per-master mutex protecting
    the scanning process.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • This aims to deprecate the "raw" sysfs file used for directly
    accessing the CFAM and instead use a char device like the
    other sub drivers.

    Since it reworks the slave creation code and adds a cfam device
    type, we also use the opportunity to convert the attributes
    to attribute groups and add a couple more.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • This converts FSI scom to use the new fsi-core controlled
    chardev allocator and use a real cdev instead of a miscdev.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • This converts FSI sbefifo to use the new fsi-core controlled
    chardev allocator and use a real cdev instead of a miscdev.

    One side effect is to fix the object lifetime by removing
    the use of devm_kzalloc() for something that contains kobjects,
    and using proper reference counting.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • The various FSI devices (sbefifo, occ, scom, more to come)
    currently use misc devices.

    This is problematic as the minor device space for misc is
    limited and there can be a lot of them. Also it limits our
    ability to move them to a dedicated /dev/fsi directory or
    to be smart about device naming and numbering.

    It also means we have IDAs on every single of these drivers

    This creates a common fsi "device_type" for the optional
    /dev/fsi grouping and a dev_t allocator for all FSI devices.

    "Legacy" devices get to use a backward compatible numbering
    scheme (as long as chip id

    Benjamin Herrenschmidt
     

26 Jul, 2018

2 commits


25 Jul, 2018

1 commit


24 Jul, 2018

1 commit


23 Jul, 2018

3 commits


12 Jul, 2018

10 commits