Commit graph

887984 commits

Author SHA1 Message Date
Stanley Chu
5d74e18edd scsi: ufs-mediatek: configure and enable clk-gating
Enable clk-gating with customized delayed timer value in MediaTek Chipsets.

Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Bean Huo <beanhuo@micron.com>
Cc: Can Guo <cang@codeaurora.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/1577683950-1702-7-git-send-email-stanley.chu@mediatek.com
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:45 -05:00
Stanley Chu
8588c6b032 scsi: ufs-mediatek: configure customized auto-hibern8 timer
Configure customized auto-hibern8 timer in MediaTek Chipsets.

Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Bean Huo <beanhuo@micron.com>
Cc: Can Guo <cang@codeaurora.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/1577683950-1702-6-git-send-email-stanley.chu@mediatek.com
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:45 -05:00
Stanley Chu
ba7af5ec51 scsi: ufs: export ufshcd_auto_hibern8_update for vendor usage
Export ufshcd_auto_hibern8_update to allow vendors to use common interface
to customize auto-hibernate timer.

Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Bean Huo <beanhuo@micron.com>
Cc: Can Guo <cang@codeaurora.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/1577683950-1702-5-git-send-email-stanley.chu@mediatek.com
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:45 -05:00
Stanley Chu
97347214bc scsi: ufs-mediatek: introduce reference clock control
Introduce reference clock control in MediaTek Chipset in order to disable
it if it is not necessary by UFS device to save system power.

Currently reference clock can be disabled during system suspend, runtime
suspend and clock-gating after link enters hibernate state.

Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Bean Huo <beanhuo@micron.com>
Cc: Can Guo <cang@codeaurora.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/1577683950-1702-4-git-send-email-stanley.chu@mediatek.com
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:45 -05:00
Stanley Chu
b0d077ed38 scsi: ufs-mediatek: add device reset implementation
Add device reset vops implementation in MediaTek UFS driver.

Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Bean Huo <beanhuo@micron.com>
Cc: Can Guo <cang@codeaurora.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/1577683950-1702-3-git-send-email-stanley.chu@mediatek.com
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:44 -05:00
Stanley Chu
fef093ff7e scsi: soc: mediatek: add header for SiP service interface
Add a common header for the SiP service interface in MediaTek Chipsets.

Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Bean Huo <beanhuo@micron.com>
Cc: Can Guo <cang@codeaurora.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/1577683950-1702-2-git-send-email-stanley.chu@mediatek.com
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:44 -05:00
Nishad Kamdar
6ee090ea04 scsi: ufs: sysfs: Use the correct style for SPDX License Identifier
This patch corrects the SPDX License Identifier style in header file
related to UFS Host Controller. It assigns explicit block comment to the
SPDX License Identifier.

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

Link: https://lore.kernel.org/r/5ca6287665fe52d8f40062e0eab8561d2b7a5b40.1577511720.git.nishadkamdar@gmail.com
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:44 -05:00
Nishad Kamdar
fae35c14c4 scsi: mylex: Use the correct style for SPDX License Identifier
This patch corrects the SPDX License Identifier style in header files
related to Mylex DAC960/DAC1100 PCI RAID Controllers. It assigns explicit
block comment to the SPDX License Identifier.

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

Link: https://lore.kernel.org/r/88332ad390f985bdebb9f2adaf2d499b0a639753.1577511720.git.nishadkamdar@gmail.com
Suggested-by: Joe Perches <joe@perches.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:44 -05:00
Bart Van Assche
0dd0dec167 scsi: ufs: Remove the SCSI timeout handler
The UFS SCSI timeout handler was needed to compensate that
ufshcd_queuecommand() could return SCSI_MLQUEUE_HOST_BUSY for a long
time. Commit a276c19e3e98 ("scsi: ufs: Avoid busy-waiting by eliminating
tag conflicts") fixed this so the timeout handler is no longer necessary.

See also commit f550c65b54 ("scsi: ufs: implement scsi host timeout handler").

Cc: Bean Huo <beanhuo@micron.com>
Cc: Can Guo <cang@codeaurora.org>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Stanley Chu <stanley.chu@mediatek.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20191224220248.30138-7-bvanassche@acm.org
Reviewed-by: Can Guo <cang@codeaurora.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:44 -05:00
Bart Van Assche
eacf36f5be scsi: ufs: Fix a race condition in the tracing code
Starting execution of a command before tracing a command may cause the
completion handler to free data while it is being traced. Fix this race by
tracing a command before it is submitted.

Cc: Bean Huo <beanhuo@micron.com>
Cc: Can Guo <cang@codeaurora.org>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Stanley Chu <stanley.chu@mediatek.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20191224220248.30138-5-bvanassche@acm.org
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:44 -05:00
Bart Van Assche
1b21b8f008 scsi: ufs: Make ufshcd_prepare_utp_scsi_cmd_upiu() easier to read
Since the lrbp->cmd expression occurs multiple times, introduce a new local
variable to hold that pointer. This patch does not change any
functionality.

Cc: Bean Huo <beanhuo@micron.com>
Cc: Can Guo <cang@codeaurora.org>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Stanley Chu <stanley.chu@mediatek.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20191224220248.30138-4-bvanassche@acm.org
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:44 -05:00
Bart Van Assche
e4d2add7fd scsi: ufs: Make ufshcd_add_command_trace() easier to read
Since the lrbp->cmd expression occurs multiple times, introduce a new local
variable to hold that pointer. This patch does not change any
functionality.

Cc: Bean Huo <beanhuo@micron.com>
Cc: Can Guo <cang@codeaurora.org>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Stanley Chu <stanley.chu@mediatek.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20191224220248.30138-3-bvanassche@acm.org
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Can Guo <cang@codeaurora.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:44 -05:00
Bart Van Assche
68c9fcfd4a scsi: ufs: Fix indentation in ufshcd_query_attr_retry()
Remove a space that occurs after a tab.

Cc: Bean Huo <beanhuo@micron.com>
Cc: Can Guo <cang@codeaurora.org>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Stanley Chu <stanley.chu@mediatek.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20191224220248.30138-2-bvanassche@acm.org
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Can Guo <cang@codeaurora.org>
Reviewed-by: Alim Akhar <alim.akhtar@samsung.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:44 -05:00
Stanley Chu
7c486d91f3 scsi: ufs: use ufshcd_vops_dbg_register_dump for vendor specific dumps
We already have ufshcd_vops_dbg_register_dump() thus all
"hba->vops->dbg_register_dump" references can be replaced by it.

Link: https://lore.kernel.org/r/1577192466-20762-3-git-send-email-stanley.chu@mediatek.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Can Guo <cang@codeaurora.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:35 -05:00
Stanley Chu
03e1d28edd scsi: ufs: unify scsi_block_requests usage
Currently UFS driver has ufshcd_scsi_block_requests() with reference
counter mechanism to avoid possible racing of blocking and unblocking
requests flow. Unify all users in UFS driver to use the same function.

Link: https://lore.kernel.org/r/1577192466-20762-2-git-send-email-stanley.chu@mediatek.com
Reviewed-by: Can Guo <cang@codeaurora.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:57:16 -05:00
Damien Le Moal
dbfc5626d9 scsi: sd_zbc: Rename sd_zbc_check_zones()
Now that the block layer implement zone checks on revalidate,
sd_zbc_check_zones() is reduced getting the zone size and verifying the
device capacity for device with RC_BASIS=0. Be clear about this by renaming
sd_zbc_check_zones() to sd_zbc_check_capacity() and updating the function
description and comments.

Link: https://lore.kernel.org/r/20191220075823.400072-3-damien.lemoal@wdc.com
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:53:31 -05:00
Damien Le Moal
19aaa40723 scsi: sd_zbc: Simplify sd_zbc_check_zones()
Now that the block layer generic zone revalidation code in
blk_revalidate_disk_zones() checks for power of 2 zone size, there is no
need to do it in sd_zbc_check_zones(). Remove this check.

Link: https://lore.kernel.org/r/20191220075823.400072-2-damien.lemoal@wdc.com
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:53:31 -05:00
Bart Van Assche
a9c4ae1086 scsi: qla2xxx: Use get_unaligned_*() instead of open-coding these functions
This patch improves readability and does not change any functionality.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Quinn Tran <qutran@marvell.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Daniel Wagner <dwagner@suse.de>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Link: https://lore.kernel.org/r/20191219005050.40193-1-bvanassche@acm.org
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:53:31 -05:00
Bart Van Assche
3f5f7335e5 scsi: qla2xxx: Fix the endianness of the qla82xx_get_fw_size() return type
Since qla82xx_get_fw_size() returns a number in CPU-endian format, change
its return type from __le32 into u32. This patch does not change any
functionality.

Fixes: 9c2b297572 ("[SCSI] qla2xxx: Support for loading Unified ROM Image (URI) format firmware file.")
Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Quinn Tran <qutran@marvell.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Daniel Wagner <dwagner@suse.de>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Link: https://lore.kernel.org/r/20191219004905.39586-1-bvanassche@acm.org
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:53:30 -05:00
Bart Van Assche
a27747a207 scsi: qla2xxx: Improve readability of the code that handles qla_flt_header
Declare qla_hw_data.flt as a qla_flt_header pointer instead of as a void
pointer. Add a zero-length array at the end of struct qla_flt_header to
make it clear that qla_flt_header and qla_flt_region are contiguous. This
patch removes several casts but does not change any functionality.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Quinn Tran <qutran@marvell.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Daniel Wagner <dwagner@suse.de>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Link: https://lore.kernel.org/r/20191219004706.39039-1-bvanassche@acm.org
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-02 21:53:30 -05:00
Linus Torvalds
fd6988496e Linux 5.5-rc4 2019-12-29 15:29:16 -08:00
Linus Torvalds
a99efa0089 RISC-V updates for v5.5-rc4
One important fix for RISC-V:
 
 - Redirect any incoming syscall with an ID less than -1 to
   sys_ni_syscall, rather than allowing them to fall through into the
   syscall handler.
 
 and two minor build fixes:
 
 - Export __asm_copy_{from,to}_user() from where they are defined.
   This fixes a build error triggered by some randconfigs.
 
 - Export flush_icache_all().  I'd resisted this before, since
   historically we didn't want modules to be able to flush the I$
   directly; but apparently everyone else is doing it now.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEElRDoIDdEz9/svf2Kx4+xDQu9KksFAl4I3wIACgkQx4+xDQu9
 KksKWw/+LzcBZ1/H2IzXqFdnu8nloBv86t60s9ZPTDFDpqFZ5JnxnhB1z9XU3mnS
 q8u4tWMMMEyT3iPByDPIMr3wdEjtPK2kqeMmkpo6o6zkTzcc0zk4Q5h8JcPZjD2q
 RFuNlfboEz5JHdQXNaV4mP+mW4RqxxJDZx11Zspj1g1v2bWOeRDc5bn0GUQGl4Jg
 uaP+5/lnuZ2ad0rXoMT2ycnDmpZ7Btriv2vbjfZFuWTBqElJsynA+7szagWqF1bR
 1cFKbocpECKqvIKlMHdBAxMaqs25YuiU+i5KrKst6k4m1O8SthsK4iXn1CVmC+RL
 R77p0yQRGnrSf/AHWRZfAEjwZlOvDHsAg4U0/nPw4SPutuquzf76pZllBQKXgJqx
 30oJammVveO3rOsNM4tsydpLGgs8M85XBfkmECeiWNhP7+RPsihHKdbXdCrBaESR
 a+bij81L8MfMbGhwAsSUiH3upq0CvsMw8pSPCZWQ2jaxbN5tgcFw3qSkfKC5STDj
 1k8DpeHNnxnR1lC/xSOR89I3gUot4Y4nw5awZP6kngB7sRTG8TRL5eh5mwQKtRFV
 5h4jyh+d0p4fiAVTzr/YjWrYWRs6318La+CRwhIOevKcAuOESVOwyeM9PRlTAxPh
 il59toaL+6KOtAaSacc0gt/+lv/g4Kd8MD/QU1viG/Da6zqkCK4=
 =y3/O
 -----END PGP SIGNATURE-----

Merge tag 'riscv/for-v5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Paul Walmsley:
 "One important fix for RISC-V:

   - Redirect any incoming syscall with an ID less than -1 to
     sys_ni_syscall, rather than allowing them to fall through into the
     syscall handler.

  and two minor build fixes:

   - Export __asm_copy_{from,to}_user() from where they are defined.
     This fixes a build error triggered by some randconfigs.

   - Export flush_icache_all(). I'd resisted this before, since
     historically we didn't want modules to be able to flush the I$
     directly; but apparently everyone else is doing it now"

* tag 'riscv/for-v5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  riscv: export flush_icache_all to modules
  riscv: reject invalid syscalls below -1
  riscv: fix compile failure with EXPORT_SYMBOL() & !MMU
2019-12-29 10:01:27 -08:00
Linus Torvalds
d75663868d File locking fix for v5.5
-----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEES8DXskRxsqGE6vXTAA5oQRlWghUFAl4IsqoTHGpsYXl0b25A
 a2VybmVsLm9yZwAKCRAADmhBGVaCFWSCD/9/iWJiaigNR8TtWeVPHDVCi/JvXXCY
 Wr7djgNwykiMeClUhUGBc2uRg1b5zwDnVFIs9jmDus9fGXMgSYIysyQOjDpxuXiP
 d8jByAAFznTeQCFXBaXmaMUh+74uILG7USi42Lm0v/ySjNAMKdtODclITIiL9Knb
 JeiB/2ZKF6oSHizSd5Rdh+59cgOKAZae/o4jWCmCSVil/Ye/wkUPbLulSyscNlGg
 0PlWMKeGKWKhcr49DeAAcpV0yeErPzvrv1P3eTxoXsozBP+ScfgSpMZT0HFqZw7Y
 yVKyLngxOWKsF1m5Bbx1ChsTfVzW82j8yNICOkSnCxtD8Ii2ZrAEKLWQAD4lnQMV
 6CJOenMxqlbtcpDxtZxXbDotlIZ+ttls3eebPcKPjfzmy01GUgho2VNjx4mxEHQH
 crs5l/l7u/CQfs0/2Eh+IspRbTRCPxt4jdZZu7fPv8idS9idR5NdHUL6VqWTYg/H
 9i7tQasgkOY+tr5AZZMJSL2LjQEc9cygVZ45vvajbD6IzGBDEK+/SQb7FgELZmac
 yI2frQEWr2f8PEiwG9zBquvxF5rbN9/+qXxpE1rScZBCoBywwuGinFC5xpaie7oY
 hjqcMVkyM/eBkt3ozS8nPMqWlnkYv26fS739Mta21QvpsWx77yyGU94ZyTIcn5J7
 emmGavC6iK+Ygg==
 =AIbz
 -----END PGP SIGNATURE-----

Merge tag 'locks-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux

Pull /proc/locks formatting fix from Jeff Layton:
 "This is a trivial fix for a _very_ long standing bug in /proc/locks
  formatting. Ordinarily, I'd wait for the merge window for something
  like this, but it is making it difficult to validate some overlayfs
  fixes.

  I've also gone ahead and marked this for stable"

* tag 'locks-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux:
  locks: print unsigned ino in /proc/locks
2019-12-29 09:50:57 -08:00
Linus Torvalds
cc2f36ec71 One performance fix for large directory searches, and one minor style cleanup noticed by Clang
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCAAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAl4IM0YACgkQiiy9cAdy
 T1H17gwAhs0ThN18BmSGJ0ftl4Va0rpcELMp3ZR7cy9yA5JpgI1/ikd7p+VKxTbx
 bk3WP9YL5aTcoo6icNZZpgaQmgmqaNpYT5W8cezOyp5Lp+1sxD/CfH4Wpdnssmn1
 S42+XpEtEg+Jw6Sg3wadyWbwmkOjJaDm8mZ266T3gaGjkOKHHEvzVi5YN8iWwW3+
 bkvByKOzCWUigGQIRHzc5Ubbpp652sz07xAKuja5irz29BLobkGUtfD0uXyj7o4g
 dajCzJR8j99bdpeMX2igr28Z002CiZpJRrafdjvoOB9nhoJliIr/PLfdeLZtQUTc
 vHvKH6URVnFOFxb21MdfKKy7NKH6KtyZyJdtg95SuOLFr0Myfl9i9EjJ3suPONnD
 VUb2MDMVpZ2wyJDHZbXWG84XQoW8hJEcADEkzzBwVIMcvyVMr6gOh107WZTlWmgM
 /n+78mU95u9ueA/RCVFXC040J5eEGTO0R/uno4oSMLEBCLdSwm5l/vU38n7FRmP2
 I5JEsee4
 =cuQx
 -----END PGP SIGNATURE-----

Merge tag '5.5-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:
 "One performance fix for large directory searches, and one minor style
  cleanup noticed by Clang"

* tag '5.5-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Optimize readdir on reparse points
  cifs: Adjust indentation in smb2_open_file
2019-12-29 09:48:47 -08:00
Amir Goldstein
98ca480a8f locks: print unsigned ino in /proc/locks
An ino is unsigned, so display it as such in /proc/locks.

Cc: stable@vger.kernel.org
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
2019-12-29 09:00:58 -05:00
Olof Johansson
1833e327a5 riscv: export flush_icache_all to modules
This is needed by LKDTM (crash dump test module), it calls
flush_icache_range(), which on RISC-V turns into flush_icache_all(). On
other architectures, the actual implementation is exported, so follow
that precedence and export it here too.

Fixes build of CONFIG_LKDTM that fails with:
ERROR: "flush_icache_all" [drivers/misc/lkdtm/lkdtm.ko] undefined!

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
2019-12-27 21:51:01 -08:00
David Abdurachmanov
556f47ac60 riscv: reject invalid syscalls below -1
Running "stress-ng --enosys 4 -t 20 -v" showed a large number of kernel oops
with "Unable to handle kernel paging request at virtual address" message. This
happens when enosys stressor starts testing random non-valid syscalls.

I forgot to redirect any syscall below -1 to sys_ni_syscall.

With the patch kernel oops messages are gone while running stress-ng enosys
stressor.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
Fixes: 5340627e3f ("riscv: add support for SECCOMP and SECCOMP_FILTER")
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
2019-12-27 21:50:57 -08:00
Luc Van Oostenryck
4d47ce158e riscv: fix compile failure with EXPORT_SYMBOL() & !MMU
When support for !MMU was added, the declaration of
__asm_copy_to_user() & __asm_copy_from_user() were #ifdefed
out hence their EXPORT_SYMBOL() give an error message like:
  .../riscv_ksyms.c:13:15: error: '__asm_copy_to_user' undeclared here
  .../riscv_ksyms.c:14:15: error: '__asm_copy_from_user' undeclared here

Since these symbols are not defined with !MMU it's wrong to export them.
Same for __clear_user() (even though this one is also declared in
include/asm-generic/uaccess.h and thus doesn't give an error message).

Fix this by doing the EXPORT_SYMBOL() directly where these symbols
are defined: inside lib/uaccess.S itself.

Fixes: 6bd33e1ece ("riscv: fix compile failure with EXPORT_SYMBOL() & !MMU")
Reported-by: kbuild test robot <lkp@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
2019-12-27 21:44:36 -08:00
Linus Torvalds
bf8d1cd438 SCSI fixes on 20191227
Four fixes and one spelling update, all in drivers: 2 in lpfc and the
 rest in mp3sas, cxgbi and target.
 
 Signed-off-by: James E.J. Bottomley <jejb@linux.ibm.com>
 -----BEGIN PGP SIGNATURE-----
 
 iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCXgaIWSYcamFtZXMuYm90
 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishb2SAP45hS5T
 owI8lIt+jMBnYG3k/66EleVdqMOcvtm9ewDN2gD/eW1LBz6uPzPn07gLB3V4TTTZ
 rI8lfohhWJwRAHjvL8A=
 =nxXW
 -----END PGP SIGNATURE-----

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Four fixes and one spelling update, all in drivers: two in lpfc and
  the rest in mp3sas, cxgbi and target"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: target/iblock: Fix protection error with blocks greater than 512B
  scsi: libcxgbi: fix NULL pointer dereference in cxgbi_device_destroy()
  scsi: lpfc: fix spelling mistakes of asynchronous
  scsi: lpfc: fix build failure with DEBUGFS disabled
  scsi: mpt3sas: Fix double free in attach error handling
2019-12-27 17:28:41 -08:00
Linus Torvalds
48a8dd1719 drm fixes for 5.5-rc4
i915:
 - power management rc6 fix
 - framebuffer tracking fix
 - display power management ratelimit fix
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJeBmRZAAoJEAx081l5xIa++4AP/jxhA7ttHZ5yxMEJ4C34nOR7
 SsrlF+utMXmtGBwqQ7NPM7rjg3fiz1O10n3kXcI5zuGkWU9B4wY5tioqu9lU0MHu
 xQ2qoZH+z3ryKMkJGzKrRnlEKJk0LXQi/SjuuXSsVE6uwbzvtym4v6VFfXpBouQf
 pR88u355xEB8Eij2Abi6yfHPW+GJjcvSz67K8/MYpMn9BUGcCliAGyij62UAl/FQ
 tPXHHr0sdd6AAe6h7g7QqT40ELRiZI4rmjaIx35Kpe4K5v11+A8EHvHUzgHayDFW
 FzNPr9s/fPD/3iAQMv7vKUp519jQy0tjMW6ad8uu0u9Qm341Qpm/NzSYQYpaKpi5
 bNNAi6qQmruxk7vYnNNjIqm1zkIOCLPmb+psM9YEq3+To3ERrAKxfITOjA2Ae6bL
 CBSSCUSQosWRfoIXSdeGUr0Urazs+wHJazIfSeGy/QrPYaYDw1jU2DQnFKMJuRMg
 LmROAmX08hrG7/BBivMQeM5FftZOapyOZxzU1KBK94mKDwJWwFQO3Z4rk/rN1VKT
 /ks5HO2FjTmeK+ffTsKG2INtvnpbawYoqVSVIR924JqcXBQSkyECneMTp3fS6zit
 GbwSjvY0dsTaX1wejFg1waMu+N9CFccILduuv3B7Oa5hV1rDib1gJuBfw8VdTtLZ
 t4EHAUwZyugUml3g7new
 =pliy
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2019-12-28' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Post-xmas food coma recovery fixes. Only three fixes for i915 since I
  expect most people are holidaying.

  i915:
   - power management rc6 fix
   - framebuffer tracking fix
   - display power management ratelimit fix"

* tag 'drm-fixes-2019-12-28' of git://anongit.freedesktop.org/drm/drm:
  drm/i915: Hold reference to intel_frontbuffer as we track activity
  drm/i915/gt: Ratelimit display power w/a
  drm/i915/pmu: Ensure monotonic rc6
2019-12-27 13:21:06 -08:00
Linus Torvalds
f4b3974602 linux-kselftest-5.5-rc4
This Kselftest update for Linux 5.5-rc4 consists of:
 
 -- rseq build failures fixes related to glibc 2.30 compatibility
    from Mathieu Desnoyers
 -- Kunit fixes and cleanups from SeongJae Park
 -- Fixes to filesystems/epoll, firmware, and livepatch build failures
    and skip handling.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPZKym/RZuOCGeA/kCwJExA0NQxwFAl4FIkMACgkQCwJExA0N
 QxxWpxAAyGLaRzfRP10f9JyfwTch4GiuNfY2IYbV/Jy/uqDUYt6do5pkSMxUlryI
 hV8KSjyrhVRmO4PW9ufsiDx9LjOB7Axw8/6CA+iR9JaBbSboSRzSzrRRS2nlo081
 WrwJCjIzWh4igIcV+CCRkZuCm7fO6FouxciLdMXtJs6gnJrmKcbi8YHFbT1+jdQ3
 /sJP+wLHCcWLjXG9DZ1yTt183YB0uD2RUMixLkaLIwaoLBaJUK+/uN7rKtVH+ARE
 6l/s1m4ZF+mLHH6X6S6NmXrOAOqkNNT416RbhDVP12HBD0XBGH0mh1JUOYs0bUpD
 M+WVeqjU8O7xKCrerj0WCxZsY5yt1UkwS4DfpPeJAkPt1XKbRo6WuXYDvfAfAz26
 d7OLPqI+fLh8uj87cu7UyYeguPlfz3Ce+uLmQAgozaY62dfCiQdBmcpmhEMsNUEf
 A31vZAY0ysIBDjDT2VoCdCJDxtbYILQKgC7g6+sX+Q7R7zkcce4RZpPck/PJuS9l
 So+CPD9DNofKNClCIW8EPnnWxniEoUE8j4cetGGTvidPr7oXTqbm46KCTAptOeUT
 jwCqIdmh87gpbiIE+YMKhJCwJ3fPKWH7UOL8IJwbBB1x3jsigP3cGleKU7+lYe1/
 PgmeMBiYuSCv/ssWhfIav+qEgVJStDtSR3l1ivArHfGOAtquuRo=
 =ZztB
 -----END PGP SIGNATURE-----

Merge tag 'linux-kselftest-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull Kselftest fixes from Shuah Khan:

 - rseq build failures fixes related to glibc 2.30 compatibility from
   Mathieu Desnoyers

 - Kunit fixes and cleanups from SeongJae Park

 - Fixes to filesystems/epoll, firmware, and livepatch build failures
   and skip handling.

* tag 'linux-kselftest-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  rseq/selftests: Clarify rseq_prepare_unload() helper requirements
  rseq/selftests: Fix: Namespace gettid() for compatibility with glibc 2.30
  rseq/selftests: Turn off timeout setting
  kunit/kunit_tool_test: Test '--build_dir' option run
  kunit: Rename 'kunitconfig' to '.kunitconfig'
  kunit: Place 'test.log' under the 'build_dir'
  kunit: Create default config in '--build_dir'
  kunit: Remove duplicated defconfig creation
  docs/kunit/start: Use in-tree 'kunit_defconfig'
  selftests: livepatch: Fix it to do root uid check and skip
  selftests: firmware: Fix it to do root uid check and skip
  selftests: filesystems/epoll: fix build error
2019-12-27 11:30:26 -08:00
Linus Torvalds
1413c36132 Power management fixes for 5.5-rc4
Fix compile test of the Tegra devfreq driver (Arnd Bergmann)
 and remove redundant Kconfig dependencies from multiple devfreq
 drivers (Leonard Crestez).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAl4F2N4SHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRx7YcP/3TL0NX9bglMT/tZr9fulDuu1O5DFC2+
 HuMqvwh7anx6Cf4YXksTuqGPeyQdxjx5xGnDm/FEKFV34nbBWwLfiRumG0UaaL24
 g1kFYQDde79NI0oQ1vD0174Wwl5nutPE7QIyjl2ucrng7UjTaMhWccj7kprW8PMw
 s+3EaHLuwU5LfECJ5CwjkhRW9rVugjEurfW7dButvPGsbxL1RTjreoU20IxDAbSm
 DGc2qRvTpCIZI2fQQEc/fRttL51kfKpl1GZE2RGD3x9qorb6QGxyIbHnmMnUm7a1
 8EHgVH4a5oRst1bnibLbSDCxGSuiTTX9HqgTsMYqdtDS2HuvTFhIpWZDy6QUZYNg
 5EWeDRDeGNtI3Ctgh0/vdapiWvf02028VcQUQOZ+IIohzh1WIXBhI1OOvbd51UrJ
 CmsQ8xjRIP0GHZfe5S+e0epCt6rLh4MsXNl9xc6UP4LtP7Yg0x3W0FiANe6ZJw2I
 FxXKeRdv2DoYdV+vI9+WMXpdOb2A4kzkQ7hsbQ9sJboDSE32xbMcKFHLOgs2rYNd
 hpELZwX4lZZfiHvLtUxc8omIFWLac+jnh/UsFJOcGqa2yA2/4ckrjMFMyIvgwRJz
 Fo9xyzvWYGwDK/e70jfNbssd5RfmrX6QMI/283b1sYRK6BwRfgmU3oEWDwB35Esc
 qv7in/zly5rZ
 =EFpO
 -----END PGP SIGNATURE-----

Merge tag 'pm-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "Fix compile test of the Tegra devfreq driver (Arnd Bergmann) and
  remove redundant Kconfig dependencies from multiple devfreq drivers
  (Leonard Crestez)"

* tag 'pm-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / devfreq: tegra: Add COMMON_CLK dependency
  PM / devfreq: Drop explicit selection of PM_OPP
2019-12-27 11:26:54 -08:00
Linus Torvalds
534121d289 io_uring-5.5-20191226
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAl4E+aYQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgprKmEAC6tcPlb2BB+7fOuj44uAdE+RInqMxbfD3w
 Tj9KpF47e02DUvBTtwDJDHJ9QT4PlJhd66M1xrp3IMUV13PKQt9OFfc6TH38Jz/9
 mhHDGNj1s+GVLRH22PQtFjyMgzHA6+UF4NxHLDJ62c2CtrCVswFRUiWrSR8LgvDp
 EkVELGEpi080ffton9nhyy3ylOCcpCu1xX1mOCg5EhcqzFQnZMlFaj9PDFrNhQzT
 e8fdl/nGoKtxZ/x6V8Oso02r/K1XievV4dfrAtOZg4jiqp/3G2eiqoGGcYnShSDU
 qulKLGsuHK51Lay8AGEaw3haeMn1PKCNe+xv0uCubHdf2iMyBdpjCLsLpTlhmtF/
 DkfP13H8k3/nUP9Y8FHt9+Ld56qpdqi/77ngCF84Ed4MFXKYkwyFFyHLMaBCw5zk
 Z07qISAbj3UeRPug+8iBKpzNBUXvXqqOGHp2h0faXz+C0yG0l7HOkhZ3m+dDD6vN
 6ABrMrS/ZuWdiW4PiJUejW81rlRKJaCgmTXMjjQCpgFeUqj6flB4sALp3amY9v7r
 CZVL67wBZ4u4YeKW0q8j4Lh3DrT5M7IGPP2uT9tw0FiamgYByC2rV/SAecxbh8f5
 NQJbL4uyJwcusOorRvaKOWU9KQaz5Q6dx9auHnmLC3A0WsEFxjgtVwG3iqw8zOeF
 8E7Lk3kPcA==
 =L2kR
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-5.5-20191226' of git://git.kernel.dk/linux-block

Pull io_uring fixes from Jens Axboe:

 - Removal of now unused busy wqe list (Hillf)

 - Add cond_resched() to io-wq work processing (Hillf)

 - And then the series that I hinted at from last week, which removes
   the sqe from the io_kiocb and keeps all sqe handling on the prep
   side. This guarantees that an opcode can't do the wrong thing and
   read the sqe more than once. This is unchanged from last week, no
   issues have been observed with this in testing. Hence I really think
   we should fold this into 5.5.

* tag 'io_uring-5.5-20191226' of git://git.kernel.dk/linux-block:
  io-wq: add cond_resched() to worker thread
  io-wq: remove unused busy list from io_sqe
  io_uring: pass in 'sqe' to the prep handlers
  io_uring: standardize the prep methods
  io_uring: read 'count' for IORING_OP_TIMEOUT in prep handler
  io_uring: move all prep state for IORING_OP_{SEND,RECV}_MGS to prep handler
  io_uring: move all prep state for IORING_OP_CONNECT to prep handler
  io_uring: add and use struct io_rw for read/writes
  io_uring: use u64_to_user_ptr() consistently
2019-12-27 11:17:08 -08:00
Linus Torvalds
0f710a5572 libata-5.5-20191226
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAl4E+S0QHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgptfiEAC8w1WnAkB4SkSzcex7TjxRcmBHHAB6rWbb
 Myf0GiAj6rvC+8KW91SOgxIF2xTlvgwEcY4v0mIHCy0Lb2SSeEg74X9OmhAGVTNI
 WXeHWeV7zDVUU5DePKt/3Mkt3qIalTUzhmxM3erJmgj3LuJQWOXDpW/YGKVwULJG
 V7PnEcVrlolZ+WLfEY1NvZ9+gwgp6GkG7vuN7QYCFqpVnLxxtxVA7qx4azNGzt8M
 1KFtL8S7yUpAw3z3J/77DDigi//VSLabdyLnBOLQ5KJJpO/Qjr8+5GGWSmAQFQYQ
 t6et4DtLqIuJOq3y8kx5aUwLHdLfwWDIGE1AoY+kHToYbGcCTAe7HXLUJMgjwfEe
 +nLgtrRD1OhOe5zON1C3MI2tbqBJjdKYabUHCWzUWz1IO8d4JN4bOv1KkquaeFep
 te/GjQ/86kvX12uF87lrlcaslJu5TBLnD7vd+pj+1AOdFEjNX+WY0NljZRIWtbHA
 2N5V8WhpW08jL4Hr/86oq1uNNc6cfBd5d16JiDbLnxJoulfhQGr0oV8T+lq9s4l8
 txJy8oDlhE5CU80a/8UhsZTasfa3Vg37xL71uZtCz7dWEfkq4ZPGKJHoa9DGUd9l
 tXa+04bxg+sAwyFH+RWmxulQEdvF4+4H4lEbHah+UuMUukgYo1i86ao+R6DTiVx+
 AVsawlrW+Q==
 =IO44
 -----END PGP SIGNATURE-----

Merge tag 'libata-5.5-20191226' of git://git.kernel.dk/linux-block

Pull libata fixes from Jens Axboe:
 "Two things in here:

   - First half of a series that fixes ahci_brcm, also marked for
     stable. The other part of the series is going into 5.6 (Florian)

   - sata_nv regression fix that is also marked for stable (Sascha)"

* tag 'libata-5.5-20191226' of git://git.kernel.dk/linux-block:
  ata: ahci_brcm: Add missing clock management during recovery
  ata: ahci_brcm: BCM7425 AHCI requires AHCI_HFLAG_DELAY_ENGINE
  ata: ahci_brcm: Fix AHCI resources management
  ata: libahci_platform: Export again ahci_platform_<en/dis>able_phys()
  libata: Fix retrieving of active qcs
2019-12-27 11:13:18 -08:00
Linus Torvalds
8ae40a6951 block-5.5-20191226
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAl4E+LMQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgphgqD/9Rr9dc6b056lob20nIASy0dknIBdmj8Bbv
 UQ4Iq4Cfm4QNxneLMa7rZXoIsCKQ7YnbZlGXn3wggOGNMCjJTyHZ9HVecoXzRdi3
 xS+NLlQbHG8ABi9l/oErEpGYU6VVcZOe3zEphPEVYBABEYLHMT9zQ9xtyGW59T9F
 Kt8MY6698VZ1DuYQeaU4Mh/3OGrdsSdpW3PNmhcRyTEBgqHml4uanVO4cxOFsPuv
 2v5NF9cRB3KOMxIxs/NKF3ZM9Qywj2qtXXuMcqTMl/2QsrArPRL+1RxUgHcoIreD
 PZSmpyf7rH2XzWFX9SZB95Fq56UoA3FR8V0Fsafnc2ZE+uR50WPR/jbeSK5SOrn2
 o4YsvPvUHvlYS6hw0cMtDwycjYvKKCjk05fZ/4pqqfmqWdGb594JxXtQS7afC8ry
 d5dqTo1hvIv9YTbCpCd2ppJlQTxneI1DefKxtDWX8+iGiWgzfynAAqixivCIRHk7
 AtafrikBz97UNCf0xUi78RPeE/mgaPNWEJH0zYxAJvWsA53GyXHUrUhwyAydx68h
 5DItSClOAwBD/rQChq+IhPKkNQ72ud6jW84WskmFeEtREAAuNxiP9lOg44qyrG5P
 VQU+oektuLa+mF80BIXxAP+CfogsxcwKcTuQZQ51l286HAelePwnSsntuL+KJr0a
 RSD7M/XaeQ==
 =UOAX
 -----END PGP SIGNATURE-----

Merge tag 'block-5.5-20191226' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Only thing here are the changes from Arnd from last week, which now
  have the appropriate header include to ensure they actually compile if
  COMPAT is enabled"

* tag 'block-5.5-20191226' of git://git.kernel.dk/linux-block:
  compat_ioctl: block: handle Persistent Reservations
  compat_ioctl: block: handle add zone open, close and finish ioctl
  compat_ioctl: block: handle BLKGETZONESZ/BLKGETNRZONES
  compat_ioctl: block: handle BLKREPORTZONE/BLKRESETZONE
  pktcdvd: fix regression on 64-bit architectures
2019-12-27 11:09:04 -08:00
Linus Torvalds
a305bd7c9c A set of fixes for the v5.5 series:
- Fix the build for the Xtensa driver.
 
 - Make sure to set up the parent device for mpc8xxx.
 
 - Clarify the look-up error message.
 
 - Fix the usage of the line direction in the mockup device.
 
 - Fix a type warning on the Aspeed driver.
 
 - Remove the pointless __exit annotation on the xgs-iproc which
   is causing a compilation problem.
 
 - Fix up emultation of open drain outputs .get_direction()
 
 - Fix the IRQ callbacks on the PCA953xx to use bitops and
   work properly.
 
 - Fix the Kconfig on the Tegra driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAl4D6rAACgkQQRCzN7AZ
 XXNEnQ/9Gb19jq7YEEIh3oGhZoMErlD/+ZIyP82ejggVbhi4aRnGJHeaZSNPFJKK
 5mvncpJdgONdGym6MNT4pDVLGRqyHe2FgTAEhjpBBVqS9unnTU9obem6EoY+ur5a
 EFt2LjTz9Yntg3mkjFJJwtdozAYSr+8SpAepsxzuUnjFpeUzaEMaTmMxmKsUcPbD
 X2KO8rTxPHUAn/9TqfP2ywNQh3tLTU9O2coPS4O7VnWiG+AvqTTnubWrsIktNrB/
 On30lEfxjQkzUZtHdSmvNg79BAhd436rcGB686dleiJEmp9MvtvVLxE01Ehf3bZl
 IX0tndAxUhnUDOyI6vrW9AdL/S9nG3VM03Z/YPx8e4UHlMSU6OyPqKZOPXTjTIJr
 jpuXqz+LqhqeZdAO7HBdQm1yUZhv9W2Hw46hchZJyabDBoQ4UG/y1E7sMe2TlpaK
 2xFjagtNpAQbSVMsA1Bzh6z2J1LWo/8J+xuQv28gBpjT9rMTYBRIkIXJKyuWN2tF
 QXHW9tejiRY560IhRVVj4ckswvZiizT5ZGQPxwS/Piw9+41ELFRjcONyOqMO6aGl
 TxtUqvZauWpVcLMvoRCjweTWBdJDXgJXzFl7vw+3znmgLctrIuLDe+7MuNBZlHI7
 +VFteHW/rv/WucepM5BhAgWTM/G08xm8o2/zuS2xKSjQKF71NeM=
 =eZNi
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
 "A set of fixes for the v5.5 series:

   - Fix the build for the Xtensa driver.

   - Make sure to set up the parent device for mpc8xxx.

   - Clarify the look-up error message.

   - Fix the usage of the line direction in the mockup device.

   - Fix a type warning on the Aspeed driver.

   - Remove the pointless __exit annotation on the xgs-iproc which is
     causing a compilation problem.

   - Fix up emultation of open drain outputs .get_direction()

   - Fix the IRQ callbacks on the PCA953xx to use bitops and work
     properly.

   - Fix the Kconfig on the Tegra driver"

* tag 'gpio-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: tegra186: Allow building on Tegra194-only configurations
  gpio: pca953x: Switch to bitops in IRQ callbacks
  gpiolib: fix up emulated open drain outputs
  MAINTAINERS: Append missed file to the database
  gpio: xgs-iproc: remove __exit annotation for iproc_gpio_remove
  gpio: aspeed: avoid return type warning
  gpio: mockup: Fix usage of new GPIO_LINE_DIRECTION
  gpio: Fix error message on out-of-range GPIO in lookup table
  gpio: mpc8xxx: Add platform device to gpiochip->parent
  gpio: xtensa: fix driver build
2019-12-27 11:02:48 -08:00
Dave Airlie
e31d941c7d i915 power and frontbuffer tracking fixes
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFWWmW3ewYy4RJOWc05gHnSar7m8FAl4A8NsACgkQ05gHnSar
 7m/P+g//TFaN4Ax6joGIo5Zqf6F9KVey8R9M9NhuHFG1NE/f0GjNejMFwnvi+Fgu
 LOWcFgveARcZ0FljxqHkPCBglg1uuMd6vDaBoQhxI6w+AYbrQg+tcyfb5xs4UOzY
 H8gjD79u7D0qc4sK80/6Mira8I4iCZ3OtL4MajCSNv+wPfmIP9oA1l70cx/GW+Xr
 jtVlNumt3DtPD+7AIqcoyfx9Z6jy7RAzTJ32F334ZfCePxxDwU4i4fDmVGOxTBD7
 DyXHmSpkP+L8CxqymwxQ2e0/Q8ocfhHygZCVXrd89fShEpwJdF2SoHzjHC6f9kOQ
 82AEjO3edQEC4vmpc8/YgMlEN6J6cdUO36slik5pqSUDGhgIlxLR7a1IJo+s5j18
 n3KC/Byy4MsS9wdmmxIsICCv0BxVUpykf8pwTvimmx8X/9xIfcB3ycjcoc1zWSkg
 5NozoZpu4J6S+hdB0kVK/jJmpicX29sF9pu1ATJZMOID9uMkNLCiKTnTVO0g4LpH
 zkkYqhnKWC9cWiLA9cq0PJEeFgwjEaM2L73i9TRg676MMQJglPLH71Zij5PWMusH
 dj2ljfqUBvY7kzbqi4LQs7rrWN/V4lW2hswvMsU/yhzZAHHiibwAAz2vrcL4StHT
 z40/VvWy7VpsOOrgr1dBgLiCQ6vnH//MbBN2thHqoC3+h3lTe3k=
 =m4fa
 -----END PGP SIGNATURE-----

Merge tag 'drm-intel-fixes-2019-12-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes

i915 power and frontbuffer tracking fixes

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87r20vdlrs.fsf@intel.com
2019-12-27 13:13:30 +10:00
Florian Fainelli
bf0e5013bc ata: ahci_brcm: Add missing clock management during recovery
The downstream implementation of ahci_brcm.c did contain clock
management recovery, but until recently, did that outside of the
libahci_platform helpers and this was unintentionally stripped out while
forward porting the patch upstream.

Add the missing clock management during recovery and sleep for 10
milliseconds per the design team recommendations to ensure the SATA PHY
controller and AFE have been fully quiesced.

Fixes: eb73390ae2 ("ata: ahci_brcm: Recover from failures to identify devices")
Cc: stable@vger.kernel.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-12-25 20:47:24 -07:00
Florian Fainelli
1a3d78cb6e ata: ahci_brcm: BCM7425 AHCI requires AHCI_HFLAG_DELAY_ENGINE
Set AHCI_HFLAG_DELAY_ENGINE for the BCM7425 AHCI controller thus making
it conforming to the 'strict' AHCI implementation which this controller
is based on.

This solves long link establishment with specific hard drives (e.g.:
Seagate ST1000VM002-9ZL1 SC12) that would otherwise have to complete the
error recovery handling before finally establishing a succesful SATA
link at the desired speed.

We re-order the hpriv->flags assignment to also remove the NONCQ quirk
since we can set the flag directly.

Fixes: 9586114cf1e9 ("ata: ahci_brcmstb: add support MIPS-based platforms")
Fixes: 423be77daabe ("ata: ahci_brcmstb: add quirk for broken ncq")
Cc: stable@vger.kernel.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-12-25 20:47:23 -07:00
Florian Fainelli
c0cdf2ac4b ata: ahci_brcm: Fix AHCI resources management
The AHCI resources management within ahci_brcm.c is a little
convoluted, largely because it historically had a dedicated clock that
was managed within this file in the downstream tree. Once brough
upstream though, the clock was left to be managed by libahci_platform.c
which is entirely appropriate.

This patch series ensures that the AHCI resources are fetched and
enabled before any register access is done, thus avoiding bus errors on
platforms which clock gate the controller by default.

As a result we need to re-arrange the suspend() and resume() functions
in order to avoid accessing registers after the clocks have been turned
off respectively before the clocks have been turned on. Finally, we can
refactor brcm_ahci_get_portmask() in order to fetch the number of ports
from hpriv->mmio which is now accessible without jumping through hoops
like we used to do.

The commit pointed in the Fixes tag is both old and new enough not to
require major headaches for backporting of this patch.

Fixes: eba68f8297 ("ata: ahci_brcmstb: rename to support across Broadcom SoC's")
Cc: stable@vger.kernel.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-12-25 20:47:21 -07:00
Florian Fainelli
84b032dbfd ata: libahci_platform: Export again ahci_platform_<en/dis>able_phys()
This reverts commit 6bb86fefa0
("libahci_platform: Staticize ahci_platform_<en/dis>able_phys()") we are
going to need ahci_platform_{enable,disable}_phys() in a subsequent
commit for ahci_brcm.c in order to properly control the PHY
initialization order.

Also make sure the function prototypes are declared in
include/linux/ahci_platform.h as a result.

Cc: stable@vger.kernel.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-12-25 20:47:19 -07:00
Sascha Hauer
8385d756e1 libata: Fix retrieving of active qcs
ata_qc_complete_multiple() is called with a mask of the still active
tags.

mv_sata doesn't have this information directly and instead calculates
the still active tags from the started tags (ap->qc_active) and the
finished tags as (ap->qc_active ^ done_mask)

Since 28361c4036 the hw_tag and tag are no longer the same and the
equation is no longer valid. In ata_exec_internal_sg() ap->qc_active is
initialized as 1ULL << ATA_TAG_INTERNAL, but in hardware tag 0 is
started and this will be in done_mask on completion. ap->qc_active ^
done_mask becomes 0x100000000 ^ 0x1 = 0x100000001 and thus tag 0 used as
the internal tag will never be reported as completed.

This is fixed by introducing ata_qc_get_active() which returns the
active hardware tags and calling it where appropriate.

This is tested on mv_sata, but sata_fsl and sata_nv suffer from the same
problem. There is another case in sata_nv that most likely needs fixing
as well, but this looks a little different, so I wasn't confident enough
to change that.

Fixes: 28361c4036 ("libata: add extra internal command")
Cc: stable@vger.kernel.org
Tested-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Add missing export of ata_qc_get_active(), as per Pali.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-12-25 17:08:33 -07:00
Rafael J. Wysocki
2cb7bfc1ca Update devfreq for 5.5-rc4
Detailed description for this pull request:
 1. Fix the build error of tegra*-devfreq.c when COMPILE_TEST is enableda
 2. Drop unneeded PM_OPP dependency from each driver in Kconfig
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEsSpuqBtbWtRe4rLGnM3fLN7rz1MFAl4AT0YWHGN3MDAuY2hv
 aUBzYW1zdW5nLmNvbQAKCRCczd8s3uvPU47qD/0S0mfIT8r6giD3hoZbH6fcGtSv
 dxDdV7j7M5fVS94wwADL02Nwju2kzZdz/zp9DA9oZEd6Tbupx8bfLbYHT/JdqmJr
 NFve90GMP3Q3hnn5TX4Y0T5xMgdUDZp3njhe9SKk80DgGWDZInydCUGf0QUjwxsK
 O44n6dm2STYIcQ74aJlelVQ0E9l1US/uwfaDAW4nChSF3UmGOhEDdsPIs4NU+MaC
 h79WeRB6sf4x5e3t1HoiFLTLWYMgtwIfxhJKxQ3ql0RWIfacKsPQkrmmUv6ohpqN
 fX/z7lkY7TFEGzOcXIb/vDiZK0O+qUkqQoJ0b+V8IKWqrGKM6DRi4fQ6BDzcFlqX
 VIvgK6KbTQhSdpAUnR1mGRvMDXn/rr10mcwPg7aInx6/8Za9+BCaTJ+5t3/kCoet
 Scc1TWmOXSbvteMEIISLrXWPmvq2ypmR/ot3frlACF9H+4xXfCHcWc0xj/L0x/K3
 iKZhnRG23WtCWOjz7GMQ0/QH1DnSSUFATpDQzX9uPnE0BByjag2Cqu/PG7bm9JLI
 eSRhWzsUIU9+LgTjpwZ4AE5A5EgU3BliNxD6avntmI5iI7iGf+BowAvOwO57hXfB
 XqWcPbNbg+3s5w5ZGSLqYLgc/aI8kARxCWFG3UrNfWWxyKzKNR8Bz9c8a5iAT7NE
 b5liIJxDE729VeJzRg==
 =/ceh
 -----END PGP SIGNATURE-----

Merge tag 'devfreq-fixes-for-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux

Pull devfreq fixes for 5.5-rc4 from Chanwoo Choi:

"1. Fix the build error of tegra*-devfreq.c when COMPILE_TEST is enabled.
 2. Drop unneeded PM_OPP dependency from each driver in Kconfig."

* tag 'devfreq-fixes-for-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux:
  PM / devfreq: tegra: Add COMMON_CLK dependency
  PM / devfreq: Drop explicit selection of PM_OPP
2019-12-25 15:15:55 +01:00
Hillf Danton
fd1c4bc6e9 io-wq: add cond_resched() to worker thread
Reschedule the current IO worker to cut the risk that it is becoming
a cpu hog.

Signed-off-by: Hillf Danton <hdanton@sina.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-12-24 09:14:29 -07:00
Mathieu Desnoyers
2a1f40adfb rseq/selftests: Clarify rseq_prepare_unload() helper requirements
The rseq.h UAPI now documents that the rseq_cs field must be cleared
before reclaiming memory that contains the targeted struct rseq_cs, but
also that the rseq_cs field must be cleared before reclaiming memory of
the code pointed to by the rseq_cs start_ip and post_commit_offset
fields.

While we can expect that use of dlclose(3) will typically unmap
both struct rseq_cs and its associated code at once, nothing would
theoretically prevent a JIT from reclaiming the code without
reclaiming the struct rseq_cs, which would erroneously allow the
kernel to consider new code which is not a rseq critical section
as a rseq critical section following a code reclaim.

Suggested-by: Florian Weimer <fw@deneb.enyo.de>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Florian Weimer <fw@deneb.enyo.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: "Paul E. McKenney" <paulmck@linux.ibm.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Paul Turner <pjt@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2019-12-23 10:52:41 -07:00
Mathieu Desnoyers
8df34c5632 rseq/selftests: Fix: Namespace gettid() for compatibility with glibc 2.30
glibc 2.30 introduces gettid() in public headers, which clashes with
the internal static definition within rseq selftests.

Rename gettid() to rseq_gettid() to eliminate this symbol name clash.

Reported-by: Tommi T. Rantala <tommi.t.rantala@nokia.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Tommi T. Rantala <tommi.t.rantala@nokia.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: "Paul E. McKenney" <paulmck@linux.ibm.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Paul Turner <pjt@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>	# v4.18+
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2019-12-23 10:52:41 -07:00
Mathieu Desnoyers
af9cb29c54 rseq/selftests: Turn off timeout setting
As the rseq selftests can run for a long period of time, disable the
timeout that the general selftests have.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: "Paul E. McKenney" <paulmck@linux.ibm.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Paul Turner <pjt@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2019-12-23 10:52:41 -07:00
SeongJae Park
b1b35201bc kunit/kunit_tool_test: Test '--build_dir' option run
This commit adds kunit tool test for the '--build_dir' option.

Signed-off-by: SeongJae Park <sjpark@amazon.de>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Tested-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2019-12-23 10:52:41 -07:00
SeongJae Park
14ee5cfd45 kunit: Rename 'kunitconfig' to '.kunitconfig'
This commit renames 'kunitconfig' to '.kunitconfig' so that it can be
automatically ignored by git and do not disturb people who want to type
'kernel/' by pressing only the 'k' and then 'tab' key.

Signed-off-by: SeongJae Park <sjpark@amazon.de>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Tested-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2019-12-23 10:52:41 -07:00
SeongJae Park
609952c2af kunit: Place 'test.log' under the 'build_dir'
'kunit' writes the 'test.log' under the kernel source directory even
though a 'build_dir' option is given.  As users who use the option might
expect the outputs to be placed under the specified directory, this
commit modifies the logic to write the log file under the 'build_dir'.

Signed-off-by: SeongJae Park <sjpark@amazon.de>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Tested-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2019-12-23 10:52:41 -07:00