1. 09 Aug, 2017 1 commit
  2. 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>
      ecfc1599
  3. 14 Jun, 2017 2 commits
  4. 12 Jun, 2017 1 commit
  5. 27 Apr, 2017 3 commits
  6. 29 Mar, 2017 1 commit
  7. 28 Mar, 2017 4 commits
  8. 02 Mar, 2017 1 commit
  9. 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>
      8b0e1953
  10. 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:
       acpi_get_table_with_size()
       early_acpi_os_unmap_memory()
      The following APIs should be used instead of:
       acpi_get_table()
       acpi_put_table()
      
      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>
      6b11d1d6
  11. 19 Dec, 2016 15 commits
  12. 18 Nov, 2016 2 commits
  13. 14 Nov, 2016 1 commit
    • Hoan Tran's avatar
      mailbox: PCC: Fix lockdep warning when request PCC channel · 6ca595a7
      Hoan Tran authored
      This patch fixes the lockdep warning below
      
      DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags))
      ------------[ cut here ]------------
      WARNING: CPU: 1 PID: 1 at linux-next/kernel/locking/lockdep.c:2876 lockdep_trace_alloc+0xe0/0xf0
       Modules linked in:
      
       CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.8.0-11756-g86c5152 #46
      ...
       Call trace:
       Exception stack(0xffff8007da837890 to 0xffff8007da8379c0)
       7880:                                   ffff8007da834000 0001000000000000
       78a0: ffff8007da837a70 ffff0000081111a0 00000000600000c5 000000000000003d
       78c0: 9374bc6a7f3c7832 0000000000381878 ffff000009db7ab8 000000000000002f
       78e0: ffff00000811aabc ffff000008be2548 ffff8007da837990 ffff00000811adf8
       7900: ffff8007da834000 00000000024080c0 00000000000000c0 ffff000009021000
       7920: 0000000000000000 0000000000000000 ffff000008c8f7c8 ffff8007da579810
       7940: 000000000000002f ffff8007da858000 0000000000000000 0000000000000001
       7960: 0000000000000001 0000000000000000 ffff00000811a468 0000000000000002
       7980: 656c62617369645f 0000000000038187 00000000000000ee ffff8007da837850
       79a0: ffff000009db50c0 ffff000009db569d 0000000000000006 ffff000089db568f
       [<ffff0000081111a0>] lockdep_trace_alloc+0xe0/0xf0
       [<ffff0000081f4950>] __kmalloc_track_caller+0x50/0x250
       [<ffff00000857c088>] devres_alloc_node+0x28/0x60
       [<ffff0000081220e0>] devm_request_threaded_irq+0x50/0xe0
       [<ffff0000087e6220>] pcc_mbox_request_channel+0x110/0x170
       [<ffff0000084b2660>] acpi_cppc_processor_probe+0x264/0x414
       [<ffff0000084ae9f4>] __acpi_processor_start+0x28/0xa0
       [<ffff0000084aeab0>] acpi_processor_start+0x44/0x54
       [<ffff00000857897c>] driver_probe_device+0x1fc/0x2b0
       [<ffff000008578ae4>] __driver_attach+0xb4/0xc0
       [<ffff00000857683c>] bus_for_each_dev+0x5c/0xa0
       [<ffff000008578110>] driver_attach+0x20/0x30
       [<ffff000008577c20>] bus_add_driver+0x110/0x230
       [<ffff000008579320>] driver_register+0x60/0x100
       [<ffff000008d478b8>] acpi_processor_driver_init+0x2c/0xb0
       [<ffff000008083168>] do_one_initcall+0x38/0x130
       [<ffff000008d20d6c>] kernel_init_freeable+0x210/0x2b4
       [<ffff000008945d90>] kernel_init+0x10/0x110
       [<ffff000008082e80>] ret_from_fork+0x10/0x50
      
      It's because the spinlock inside pcc_mbox_request_channel() is
      kept too long. This patch releases spinlock before request_irq()
      and free_irq() to fix this issue  as spinlock is only needed to
      protect the channel data.
      Signed-off-by: default avatarHoan Tran <hotran@apm.com>
      Reviewed-by: default avatarPrashanth Prakash <pprakash@codeaurora.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6ca595a7
  14. 07 Sep, 2016 1 commit
  15. 30 Aug, 2016 1 commit
  16. 29 Aug, 2016 3 commits
  17. 28 Jul, 2016 1 commit