10 Sep, 2020

1 commit

  • The only usage of sbefifo_ids is to assign its address to the id_table
    field in the fsi_driver struct, which is a const pointer, so make it
    const to allow the compiler to put it in read-only memory

    Signed-off-by: Rikard Falkeborn
    Signed-off-by: Joel Stanley

    Rikard Falkeborn
     

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
     

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
     

27 Jul, 2018

1 commit

  • 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
     

23 Jul, 2018

1 commit


12 Jul, 2018

2 commits


18 Jun, 2018

1 commit

  • fsi-sbefifo.c:547:58: warning: incorrect type in argument 2 (different base types)
    fsi-sbefifo.c:547:58: expected restricted __be32 [usertype] *word
    fsi-sbefifo.c:547:58: got unsigned int *
    fsi-sbefifo.c:635:16: warning: incorrect type in assignment (different base types)
    fsi-sbefifo.c:635:16: expected unsigned int [unsigned]
    fsi-sbefifo.c:635:16: got restricted __be32 [usertype]
    fsi-sbefifo.c:636:16: warning: incorrect type in assignment (different base types)
    fsi-sbefifo.c:636:16: expected unsigned int [unsigned]
    fsi-sbefifo.c:636:16: got restricted __be32 [usertype]

    Signed-off-by: Joel Stanley
    Signed-off-by: Benjamin Herrenschmidt

    Joel Stanley
     

14 Jun, 2018

1 commit


12 Jun, 2018

1 commit

  • This driver provides an in-kernel and a user API for accessing
    the command FIFO of the SBE (Self Boot Engine) of the POWER9
    processor, via the FSI bus.

    It provides an in-kernel interface to submit command and receive
    responses, along with a helper to locate and analyse the response
    status block. It's a simple synchronous submit() type API.

    The user interface uses the write/read interface that an earlier
    version of this driver already provided, however it has some
    specific limitations in order to keep the driver simple and
    avoid using up a lot of kernel memory:

    - The user should perform a single write() with the command and
    a single read() to get the response (with a buffer big enough
    to hold the entire response).

    - On a write() the command is simply "stored" into a kernel buffer,
    it is submitted as one operation on the subsequent read(). This
    allows to have the code write directly from the FIFO into the user
    buffer and avoid hogging the SBE between the write() and read()
    syscall as it's critical that the SBE be freed asap to respond
    to the host. An extra write() will simply replace the previously
    written command.

    - A write of a single 4 bytes containing the value 0x52534554
    in big endian will trigger a reset request. No read is necessary,
    the write() call will return when the reset has been acknowledged
    or times out.

    - The command is limited to 4K bytes.

    Signed-off-by: Benjamin Herrenschmidt
    Tested-by: Joel Stanley
    ---

    Benjamin Herrenschmidt