1. 14 Nov, 2017 3 commits
    • Arvind Yadav's avatar
      mailbox/omap: unregister mbox class · 1f90a216
      Arvind Yadav authored
      platform_driver_register() can fail here and we must unregister mbox
      Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
      Acked-by: default avatarSuman Anna <s-anna@ti.com>
      Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
    • Sudeep Holla's avatar
      mailbox: mailbox-test: don't rely on rx_buffer content to signal data ready · e339c80a
      Sudeep Holla authored
      Currently we rely on the first byte of the Rx buffer to check if there's
      any data available to be read. If the first byte of the received buffer
      is zero (i.e. null character), then we fail to signal that data is
      available even when it's available.
      Instead introduce a boolean variable to track the data availability and
      update it in the channel receive callback as ready and clear it when the
      data is read.
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
    • Sudeep Holla's avatar
      mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone · 33cd7123
      Sudeep Holla authored
      Currently the mailbox framework sets txdone_method to TXDONE_BY_POLL if
      the controller sets txdone_by_poll. However some clients can have a
      mechanism to do TXDONE_BY_ACK which they can specify by knows_txdone.
      However, we endup setting both TXDONE_BY_POLL and TXDONE_BY_ACK in that
      case. In such scenario, we may end up with below warnings as the tx
      ticker is run both by mailbox framework and the client.
      WARNING: CPU: 1 PID: 0 at kernel/time/hrtimer.c:805 hrtimer_forward+0x88/0xd8
      CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.12.0-rc5 #242
      Hardware name: ARM LTD ARM Juno Development Platform
      task: ffff8009768ca700 task.stack: ffff8009768f8000
      PC is at hrtimer_forward+0x88/0xd8
      LR is at txdone_hrtimer+0xd4/0xf8
      Call trace:
      This patch fixes the issue by resetting TXDONE_BY_POLL if client has set
      Cc: Alexey Klimov <alexey.klimov@arm.com>
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
  2. 08 Nov, 2017 1 commit
  3. 06 Nov, 2017 1 commit
    • Kees Cook's avatar
      mailbox: Convert timers to use timer_setup() · c6f15047
      Kees Cook authored
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly.
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Jassi Brar <jassisinghbrar@gmail.com>
      Cc: nios2-dev@lists.rocketboards.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
  4. 02 Nov, 2017 1 commit
    • Greg Kroah-Hartman's avatar
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman authored
      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 <5
      All documentation files were explicitly excluded.
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
         For non */uapi/* files that summary was:
         SPDX license identifier                            # files
         GPL-2.0                                              11139
         and resulted in the first patch in this series.
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
         SPDX license identifier                            # files
         GPL-2.0 WITH Linux-syscall-note                        930
         and resulted in the second patch in this series.
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
         SPDX license identifier                            # files
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
         and that resulted in the third patch in this series.
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: default avatarKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: default avatarPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  5. 27 Oct, 2017 5 commits
  6. 31 Aug, 2017 5 commits
  7. 09 Aug, 2017 1 commit
  8. 26 Jul, 2017 1 commit
    • Hoan Tran's avatar
      mailbox: pcc: Fix crash when request PCC channel 0 · ecfc1599
      Hoan Tran authored
      When PCCT is not available, kernel crashes as below when requests PCC
      channel 0. This patch fixes this issue.
      [    0.920454] PCCT header not found.
      [    8.031309] Unable to handle kernel NULL pointer dereference at virtual address 00000010
      [    8.031310] [0000000000000010] user address but active_mm is swapper
      [    8.031312] Internal error: Oops: 96000004 [#1] PREEMPT SMP
      [    8.031313] Modules linked in:
      [    8.031316] CPU: 31 PID: 1 Comm: swapper/0 Tainted: G        W       4.13.0-rc1 #18
      [    8.031317] Hardware name: AppliedMicro(R) 07/20/2017
      [    8.031318] task: ffff809ef3b08000 task.stack: ffff809ef3b10000
      [    8.031322] PC is at pcc_mbox_request_channel+0x8c/0x160
      [    8.031325] LR is at xgene_slimpro_i2c_probe+0x1c0/0x378
      [    8.031326] pc : [<ffff000008899450>] lr : [<ffff000008819dac>] pstate: 00000045
      [    8.031327] sp : ffff809ef3b13bd0
      [    8.031327] x29: ffff809ef3b13bd0 x28: ffff000008ed90a0
      [    8.031329] x27: ffff000009091000 x26: ffff000008e50470
      [    8.031330] x25: ffff000008ed9100 x24: ffff809eefd9ac30
      [    8.031332] x23: 0000000000000000 x22: ffff0000090e3e10
      [    8.031333] x21: ffff0000090e3000 x20: 0000000000000000
      [    8.031335] x19: 0000000000000000 x18: 0000000000087ffc
      [    8.031336] x17: 2fe48d76a78303f0 x16: 0000000000087ffc
      [    8.031337] x15: ffff000000000000 x14: 0000000000000000
      [    8.031339] x13: 0000000000000000 x12: 0000000000000018
      [    8.031340] x11: 0000000000000018 x10: 0101010101010101
      [    8.031342] x9 : 0000000000000000 x8 : 7f7f7f7f7f7f7f7f
      [    8.031343] x7 : fefefefeff6b646d x6 : 0000008080808080
      [    8.031345] x5 : 0000000000000000 x4 : 0000000000000001
      [    8.031346] x3 : 0000000000000000 x2 : ffff000008819b64
      [    8.031348] x1 : 0000000000000000 x0 : 0000000000000000
      [    8.031393] Call trace:
      [    8.031394] Exception stack(0xffff809ef3b13a00 to 0xffff809ef3b13b30)
      [    8.031395] 3a00: 0000000000000000 0001000000000000 ffff809ef3b13bd0 ffff000008899450
      [    8.031397] 3a20: ffff809f7e1f9a10 ffff000008f60be0 0000000000000001 ffff809ef3b13b7c
      [    8.031398] 3a40: ffff809f7e1f9a10 0000000000000000 ffff000009091000 0000000000000003
      [    8.031399] 3a60: ffff000009091000 0000000000000003 ffff809ef3b13a80 ffff0000084e0794
      [    8.031400] 3a80: ffff809ef3b13a90 ffff00000850bb64 ffff809ef3b13ad0 ffff00000850bf34
      [    8.031402] 3aa0: 0000000000000000 0000000000000000 ffff000008819b64 0000000000000000
      [    8.031403] 3ac0: 0000000000000001 0000000000000000 0000008080808080 fefefefeff6b646d
      [    8.031404] 3ae0: 7f7f7f7f7f7f7f7f 0000000000000000 0101010101010101 0000000000000018
      [    8.031405] 3b00: 0000000000000018 0000000000000000 0000000000000000 ffff000000000000
      [    8.031406] 3b20: 0000000000087ffc 2fe48d76a78303f0
      [    8.031409] [<ffff000008899450>] pcc_mbox_request_channel+0x8c/0x160
      [    8.031410] [<ffff000008819dac>] xgene_slimpro_i2c_probe+0x1c0/0x378
      [    8.031413] [<ffff0000085e84dc>] platform_drv_probe+0x50/0xbc
      [    8.031414] [<ffff0000085e68a4>] driver_probe_device+0x21c/0x2d0
      [    8.031416] [<ffff0000085e6a04>] __driver_attach+0xac/0xb0
      [    8.031417] [<ffff0000085e4a78>] bus_for_each_dev+0x58/0x98
      [    8.031418] [<ffff0000085e61e4>] driver_attach+0x20/0x28
      [    8.031419] [<ffff0000085e5e0c>] bus_add_driver+0x1c8/0x22c
      [    8.031421] [<ffff0000085e7324>] driver_register+0x60/0xf4
      [    8.031422] [<ffff0000085e8420>] __platform_driver_register+0x4c/0x54
      [    8.031425] [<ffff000008e96dd0>] xgene_slimpro_i2c_driver_init+0x18/0x20
      [    8.031426] [<ffff000008083144>] do_one_initcall+0x38/0x124
      [    8.031429] [<ffff000008e50d0c>] kernel_init_freeable+0x190/0x22c
      [    8.031431] [<ffff0000089eac30>] kernel_init+0x10/0xfc
      [    8.031432] [<ffff000008082ec0>] ret_from_fork+0x10/0x50
      [    8.031434] Code: cb030e63 8b030013 b140067f 54fffda8 (f9400a61)
      [    8.031448] ---[ end trace 14eb48a4e1e1f9fb ]---
      Signed-off-by: default avatarHoan Tran <hotran@apm.com>
      Acked-by: default avatarPrashanth Prakash <pprakash@codeaurora.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
  9. 14 Jun, 2017 2 commits
  10. 12 Jun, 2017 1 commit
  11. 27 Apr, 2017 3 commits
  12. 29 Mar, 2017 1 commit
  13. 28 Mar, 2017 4 commits
  14. 02 Mar, 2017 1 commit
  15. 25 Dec, 2016 1 commit
    • Thomas Gleixner's avatar
      ktime: Cleanup ktime_set() usage · 8b0e1953
      Thomas Gleixner authored
      ktime_set(S,N) was required for the timespec storage type and is still
      useful for situations where a Seconds and Nanoseconds part of a time value
      needs to be converted. For anything where the Seconds argument is 0, this
      is pointless and can be replaced with a simple assignment.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
  16. 21 Dec, 2016 1 commit
    • Lv Zheng's avatar
      ACPI / osl: Remove acpi_get_table_with_size()/early_acpi_os_unmap_memory() users · 6b11d1d6
      Lv Zheng authored
      This patch removes the users of the deprectated APIs:
      The following APIs should be used instead of:
      The deprecated APIs are invented to be a replacement of acpi_get_table()
      during the early stage so that the early mapped pointer will not be stored
      in ACPICA core and thus the late stage acpi_get_table() won't return a
      wrong pointer. The mapping size is returned just because it is required by
      early_acpi_os_unmap_memory() to unmap the pointer during early stage.
      But as the mapping size equals to the acpi_table_header.length
      (see acpi_tb_init_table_descriptor() and acpi_tb_validate_table()), when
      such a convenient result is returned, driver code will start to use it
      instead of accessing acpi_table_header to obtain the length.
      Thus this patch cleans up the drivers by replacing returned table size with
      acpi_table_header.length, and should be a no-op.
      Reported-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
  17. 19 Dec, 2016 8 commits