1
0
Fork 0
Commit Graph

157359 Commits (44dc1b1fab787d265b9b3064bd564c87b6b86397)

Author SHA1 Message Date
Linus Torvalds bfed6d0ffc s390 update with improvements and bug fixes for 5.1-rc2
- Fix early free of the channel program in vfio
 
  - On AP device removal make sure that all messages are flushed
    with the driver still attached that queued the message
 
  - Limit brk randomization to 32MB to reduce the chance that the
    heap of ld.so is placed after the main stack
 
  - Add a rolling average for the steal time of a CPU, this will be
    needed for KVM to decide when to do busy waiting
 
  - Fix a warning in the CPU-MF code
 
  - Add a notification handler for AP configuration change to react
    faster to new AP devices
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQEcBAABCAAGBQJcnIq7AAoJEDjwexyKj9rgddUH/3VQP6BMvq2fwAsLqx8JeYgT
 082xzP2nHli3tO6m8fFHmtqrSg5KTEDfuQVafqp92LeEMKUNWQI6kRu7rXeAVBct
 M6hx21mqkm9VNjAlAjSq8IAUXP2K6/K0BMD5mYInYYYVRvJm3on4sHnkEj0kvXbm
 OGxwnNBd9UnH5g6ti2vW4cyDvs0aqj1eDbSudy5KedumQz5J2XdFPn4f4Ej6p2+t
 nuvlZFDnZ2Z4rliE3RFCuKExZR+YFZgS1urm6pcklncfvbJRsqFJ+nvhurskDUI3
 4gOp1Yv1tvGNv/cNVEtnz8g/Kg8/sI7evjQBtxhtEsV/W0sbZPnjCt+28Cf1DN4=
 =4nL7
 -----END PGP SIGNATURE-----

Merge tag 's390-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Martin Schwidefsky:
 "Improvements and bug fixes for 5.1-rc2:

   - Fix early free of the channel program in vfio

   - On AP device removal make sure that all messages are flushed with
     the driver still attached that queued the message

   - Limit brk randomization to 32MB to reduce the chance that the heap
     of ld.so is placed after the main stack

   - Add a rolling average for the steal time of a CPU, this will be
     needed for KVM to decide when to do busy waiting

   - Fix a warning in the CPU-MF code

   - Add a notification handler for AP configuration change to react
     faster to new AP devices"

* tag 's390-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/cpumf: Fix warning from check_processor_id
  zcrypt: handle AP Info notification from CHSC SEI command
  vfio: ccw: only free cp on final interrupt
  s390/vtime: steal time exponential moving average
  s390/zcrypt: revisit ap device remove procedure
  s390: limit brk randomization to 32MB
2019-03-28 08:35:32 -07:00
Linus Torvalds 97c41a6bdc ARM: SoC fixes for v5.1
A couple of minor fixes only for now
 
 - Incorrect DMA channels on Renesas R-Car
 - Broadcom bcm2835 error handling fixes
 - Kconfig dependency fixes for bcm2835 and davinci
 - CPU idle wakeup fix for i.MX6
 - MMC regression on Tegra186
 - Incorrect phy settings on one imx board
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJcmQBWAAoJEGCrR//JCVInXwQP/isXeyDBtT1xlJMUBU8CnIuz
 pDp1vZyEsGkLlErI9T299+sZL4XIfz1eHXiJmnQZvGMefumvim5zEvdo469Jk/Da
 9Fu/1yo4Dy6pIIkoUFp4LeQVZoEVtWHrhH9IIIWuN7XlnLWeBxVPggp64gKIVXry
 iqRa7h7hM15dsYhmeri5fLkR9J3kMLfIkZCT1m6ysYGc0LBj5a9kcf+8B5Tebo+8
 ffwiMSo3mNhsepPB1sFRDUNLzCsa3PiA/qycJlg5UTap2YkwmZ93ANHv6DbDztza
 Vgw7uFsZ04a6rZFa0jZs9On3GjxB1iLO1b8PM3dNHa2yBjprK5VYhUNh5tcIlPUL
 l5IPzJTnD6qEI/8H+kjbAyl53TYQh+YjRKnN6Khvbuec7BgMlBvLTNwZNJHGV9oo
 2feTKhdpnHt2FhE/p+5MtXf5n+a//xY99HtKLu9EBGAG1rwMq0gahjfXVnBB+XSz
 71m/anA2C9A/zNstNOlthziomenTLSQoE7RmKty7kIB6j/rzY9yOTlCcKnSgKnOD
 TU2MyIgEzvcxOmp+5wJBL4XncWX/9MjQ53GV+23NoRwIIFP9G7A4cVUykniPbugk
 9H7bJv78O+sI/rr4vEBf3Og8yQcuLMULp0Tos7gD2b4QZ1hWWSMmKKWHQK1In4+n
 3tUmvx7HfdWxHKkRMc0U
 =nCso
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC fixes from Arnd Bergmann:
 "A couple of minor fixes only for now

   - fix for incorrect DMA channels on Renesas R-Car

   - Broadcom bcm2835 error handling fixes

   - Kconfig dependency fixes for bcm2835 and davinci

   - CPU idle wakeup fix for i.MX6

   - MMC regression on Tegra186

   - fix incorrect phy settings on one imx board"

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  arm64: tegra: Disable CQE Support for SDMMC4 on Tegra186
  ARM: dts: nomadik: Fix polarity of SPI CS
  ARM: davinci: fix build failure with allnoconfig
  ARM: imx_v4_v5_defconfig: enable PWM driver
  ARM: imx_v6_v7_defconfig: continue compiling the pwm driver
  ARM: dts: imx6dl-yapp4: Use correct pseudo PHY address for the switch
  ARM: dts: imx6qdl: Fix typo in imx6qdl-icore-rqs.dtsi
  ARM: dts: imx6ull: Use the correct style for SPDX License Identifier
  ARM: dts: pfla02: increase phy reset duration
  ARM: imx6q: cpuidle: fix bug that CPU might not wake up at expected time
  ARM: imx51: fix a leaked reference by adding missing of_node_put
  ARM: dts: imx6dl-yapp4: Use rgmii-id phy mode on the cpu port
  arm64: bcm2835: Add missing dependency on MFD_CORE.
  ARM: dts: bcm283x: Fix hdmi hpd gpio pull
  soc: bcm: bcm2835-pm: Fix error paths of initialization.
  soc: bcm: bcm2835-pm: Fix PM_IMAGE_PERI power domain support.
  arm64: dts: renesas: r8a774c0: Fix SCIF5 DMA channels
  arm64: dts: renesas: r8a77990: Fix SCIF5 DMA channels
2019-03-28 08:23:45 -07:00
Thomas Richter b6ffdf27f3 s390/cpumf: Fix warning from check_processor_id
Function __hw_perf_event_init() used a CPU variable without
ensuring CPU preemption has been disabled. This caused the
following warning in the kernel log:

  [ 7.277085] BUG: using smp_processor_id() in preemptible
                 [00000000] code: cf-csdiag/1892
  [ 7.277111] caller is cf_diag_event_init+0x13a/0x338
  [ 7.277122] CPU: 10 PID: 1892 Comm: cf-csdiag Not tainted
                 5.0.0-20190318.rc0.git0.9e1a11e0f602.300.fc29.s390x+debug #1
  [ 7.277131] Hardware name: IBM 2964 NC9 712 (LPAR)
  [ 7.277139] Call Trace:
  [ 7.277150] ([<000000000011385a>] show_stack+0x82/0xd0)
  [ 7.277161]  [<0000000000b7a71a>] dump_stack+0x92/0xd0
  [ 7.277174]  [<00000000007b7e9c>] check_preemption_disabled+0xe4/0x100
  [ 7.277183]  [<00000000001228aa>] cf_diag_event_init+0x13a/0x338
  [ 7.277195]  [<00000000002cf3aa>] perf_try_init_event+0x72/0xf0
  [ 7.277204]  [<00000000002d0bba>] perf_event_alloc+0x6fa/0xce0
  [ 7.277214]  [<00000000002dc4a8>] __s390x_sys_perf_event_open+0x398/0xd50
  [ 7.277224]  [<0000000000b9e8f0>] system_call+0xdc/0x2d8
  [ 7.277233] 2 locks held by cf-csdiag/1892:
  [ 7.277241]  #0: 00000000976f5510 (&sig->cred_guard_mutex){+.+.},
                  at: __s390x_sys_perf_event_open+0xd2e/0xd50
  [ 7.277257]  #1: 00000000363b11bd (&pmus_srcu){....},
                  at: perf_event_alloc+0x52e/0xce0

The variable is now accessed in proper context. Use
get_cpu_var()/put_cpu_var() pair to disable
preemption during access.
As the hardware authorization settings apply to all CPUs, it
does not matter which CPU is used to check the authorization setting.

Remove the event->count assignment. It is not needed as function
perf_event_alloc() allocates memory for the event with kzalloc() and
thus count is already set to zero.

Fixes: fe5908bccc ("s390/cpum_cf_diag: Add support for s390 counter facility diagnostic trace")

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2019-03-28 09:28:42 +01:00
Linus Torvalds 1a9df9e29c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
 "Fixes here and there, a couple new device IDs, as usual:

   1) Fix BQL race in dpaa2-eth driver, from Ioana Ciornei.

   2) Fix 64-bit division in iwlwifi, from Arnd Bergmann.

   3) Fix documentation for some eBPF helpers, from Quentin Monnet.

   4) Some UAPI bpf header sync with tools, also from Quentin Monnet.

   5) Set descriptor ownership bit at the right time for jumbo frames in
      stmmac driver, from Aaro Koskinen.

   6) Set IFF_UP properly in tun driver, from Eric Dumazet.

   7) Fix load/store doubleword instruction generation in powerpc eBPF
      JIT, from Naveen N. Rao.

   8) nla_nest_start() return value checks all over, from Kangjie Lu.

   9) Fix asoc_id handling in SCTP after the SCTP_*_ASSOC changes this
      merge window. From Marcelo Ricardo Leitner and Xin Long.

  10) Fix memory corruption with large MTUs in stmmac, from Aaro
      Koskinen.

  11) Do not use ipv4 header for ipv6 flows in TCP and DCCP, from Eric
      Dumazet.

  12) Fix topology subscription cancellation in tipc, from Erik Hugne.

  13) Memory leak in genetlink error path, from Yue Haibing.

  14) Valid control actions properly in packet scheduler, from Davide
      Caratti.

  15) Even if we get EEXIST, we still need to rehash if a shrink was
      delayed. From Herbert Xu.

  16) Fix interrupt mask handling in interrupt handler of r8169, from
      Heiner Kallweit.

  17) Fix leak in ehea driver, from Wen Yang"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (168 commits)
  dpaa2-eth: fix race condition with bql frame accounting
  chelsio: use BUG() instead of BUG_ON(1)
  net: devlink: skip info_get op call if it is not defined in dumpit
  net: phy: bcm54xx: Encode link speed and activity into LEDs
  tipc: change to check tipc_own_id to return in tipc_net_stop
  net: usb: aqc111: Extend HWID table by QNAP device
  net: sched: Kconfig: update reference link for PIE
  net: dsa: qca8k: extend slave-bus implementations
  net: dsa: qca8k: remove leftover phy accessors
  dt-bindings: net: dsa: qca8k: support internal mdio-bus
  dt-bindings: net: dsa: qca8k: fix example
  net: phy: don't clear BMCR in genphy_soft_reset
  bpf, libbpf: clarify bump in libbpf version info
  bpf, libbpf: fix version info and add it to shared object
  rxrpc: avoid clang -Wuninitialized warning
  tipc: tipc clang warning
  net: sched: fix cleanup NULL pointer exception in act_mirr
  r8169: fix cable re-plugging issue
  net: ethernet: ti: fix possible object reference leak
  net: ibm: fix possible object reference leak
  ...
2019-03-27 12:22:57 -07:00
Jonathan Hunter 9395874219 arm64: tegra: Disable CQE Support for SDMMC4 on Tegra186
Enabling CQE support on Tegra186 Jetson TX2 has introduced a regression
that is causing accesses to the file-system on the eMMC to fail. Errors
such as the following have been observed ...

 mmc2: running CQE recovery
 mmc2: mmc_select_hs400 failed, error -110
 print_req_error: I/O error, dev mmcblk2, sector 8 flags 80700
 mmc2: cqhci: CQE failed to exit halt state

For now disable CQE support for Tegra186 until this issue is resolved.

Fixes: dfd3cb6feb arm64: tegra: Add CQE Support for SDMMC4
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2019-03-25 17:12:20 +01:00
Arnd Bergmann 2e8c54db3b i.MX fixes for 5.1:
- Correct phy mode setting of imx6dl-yapp4 board to fix a problem
    caused by commit 5ecdd77c61 ("net: dsa: qca8k: disable delay
    for RGMII mode").
  - Add a missing of_node_put call to fix leaked reference detected by
    coccinelle in imx51 machine code.
  - Fix imx6q cpuidle driver bug which causes that CPU might not wake up
    at expected time.
  - Increase reset duration of Ethernet phy Micrel KSZ9031RNX to fix
    transmission timeouts error seen on imx6qdl-phytec-pfla02 board.
  - Correct SPDX License Identifier style for imx6ull-pinfunc-snvs.h.
  - Fix 'bus-witdh' typos in imx6qdl-icore-rqs.dtsi.
  - Correct pseudo PHY address of switch device for imx6dl-yapp4 board.
  - Update PWM driver options in imx defconfig files due to the change
    on driver part.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJclKQNAAoJEFBXWFqHsHzOSugIAJGMo/4tEOijA6oysBhzwE3A
 xy7nHp92RxAZEImjE14NRNgyS6zTZd51PWn3CQjjtw+x+6OBsk4kI+ftQvxp1irg
 7ag6uvjZ5lPaW04tF6bUbI9vZd9+Fsy1z7D/hTzsPPj7w7iH+2rMgWsNwma/ZZ9r
 UFmSfkgxE1kj8sHsnm3EoryKLeu69gD1p+chsWwe4/zxeo+yDeOQuXc1fc05HN5Y
 JOPvHk8PWPDNHwhu8XX20aPGGZpjxi75uhwGDbIQnVCp/k4fDZyDxKfNKcZSrFbK
 JsDxGRIRYd+TXM/E/UJ1TdXsmP6pUoyMXVJi3+0nk0QqLnQqjkdTP2O9MRt+Qng=
 =jCPr
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes

i.MX fixes for 5.1:
 - Correct phy mode setting of imx6dl-yapp4 board to fix a problem
   caused by commit 5ecdd77c61 ("net: dsa: qca8k: disable delay
   for RGMII mode").
 - Add a missing of_node_put call to fix leaked reference detected by
   coccinelle in imx51 machine code.
 - Fix imx6q cpuidle driver bug which causes that CPU might not wake up
   at expected time.
 - Increase reset duration of Ethernet phy Micrel KSZ9031RNX to fix
   transmission timeouts error seen on imx6qdl-phytec-pfla02 board.
 - Correct SPDX License Identifier style for imx6ull-pinfunc-snvs.h.
 - Fix 'bus-witdh' typos in imx6qdl-icore-rqs.dtsi.
 - Correct pseudo PHY address of switch device for imx6dl-yapp4 board.
 - Update PWM driver options in imx defconfig files due to the change
   on driver part.

* tag 'imx-fixes-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: imx_v4_v5_defconfig: enable PWM driver
  ARM: imx_v6_v7_defconfig: continue compiling the pwm driver
  ARM: dts: imx6dl-yapp4: Use correct pseudo PHY address for the switch
  ARM: dts: imx6qdl: Fix typo in imx6qdl-icore-rqs.dtsi
  ARM: dts: imx6ull: Use the correct style for SPDX License Identifier
  ARM: dts: pfla02: increase phy reset duration
  ARM: imx6q: cpuidle: fix bug that CPU might not wake up at expected time
  ARM: imx51: fix a leaked reference by adding missing of_node_put
  ARM: dts: imx6dl-yapp4: Use rgmii-id phy mode on the cpu port
2019-03-25 17:06:41 +01:00
Arnd Bergmann 0cee41d4d0 This pull request contains Broadcom ARM/ARM64-based SoCs fixes for 5.1,
please pull the following:
 
 - Eric provides fixes for the bcm2835-pm driver: added missing depends
   on MFD_CORE for the ARM64 definition of ARCH_BCM2835, fixing error
   paths on initialization and fixing the PM_IMAGE_PERI power domain
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAlyRTXMACgkQh9CWnEQH
 BwTKOBAAiN0SyRVtCQmomvrIOMTJilmUs+BZrcPnjlIEcxCdUcXn+qxKKgYdtXbR
 KWkrlZypv3LwTbFE9DiBxIT0f3pmBt0c8oeDdiX3uyhUHAaWBasD3+b1XBx8oyYR
 u3wU0A94tVHBvmXHIaDpbPx07Vq2LZ5U8nOGID4A5YTz12v7uzlSY6spdPZz774w
 vMLA/TrXWTvnx+MIF9zHshq/+CuOG9w3Ne86B2rCpTAAX1MxLyGNAu1dkFD/yFEl
 maBcBQJy3G2wgGCgudw3d+LMGMhwP0FKNdspblQ0yxiayPJDkHm+oOfdrF74gW00
 DldAW4nqelDkJJ6KVMuLVlkcTkUf8VXYQX+EJP0K/V3fvfiDf3pr8wK+yp95GvEc
 8/p/HwLWGQjATxUBgJIRORfTUPOTYbJUX3q6n2Wn8EKuTwWSl+mQGrsrGbv31N8I
 6+Mo2eKhxMxmdsfcN3Ox++m9XXqTlds2wXuSYq77lT0kXspq5HuaMu1PsRPsvDFN
 pbAqaKgf7DPoUQBrGFaJJgjB1bj+gG/7r4rTcNXEHxQcAneo20TuGtwjNq2rxVVY
 8fn9eDbSrh/e7wduXf6hhrV/akn2tq5bLYUSqcWmFCpskITbz4wDbAyMtLt8qZty
 WGZBmnP7e3O3qa9wJvOkC4HKmb878+eNNn8Uvl6k/riu34kUmj8=
 =0kxj
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-5.1/soc-fixes' of https://github.com/Broadcom/stblinux into arm/fixes

This pull request contains Broadcom ARM/ARM64-based SoCs fixes for 5.1,
please pull the following:

- Eric provides fixes for the bcm2835-pm driver: added missing depends
  on MFD_CORE for the ARM64 definition of ARCH_BCM2835, fixing error
  paths on initialization and fixing the PM_IMAGE_PERI power domain

* tag 'arm-soc/for-5.1/soc-fixes' of https://github.com/Broadcom/stblinux:
  arm64: bcm2835: Add missing dependency on MFD_CORE.
  soc: bcm: bcm2835-pm: Fix error paths of initialization.
  soc: bcm: bcm2835-pm: Fix PM_IMAGE_PERI power domain support.
2019-03-25 17:05:30 +01:00
Arnd Bergmann 274a8ddcbc This pull request contains Broadcom ARM-based SoCs Device Tree fixes for
5.1, please pull the following:
 
 - Helen fixes the HDMI hot-pug detect GPIO polarity for the Rasperry Pi
   model B revision 2
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAlyRTfsACgkQh9CWnEQH
 BwQbWBAAohl51B5h7cJGWz2F53tP9fDGcDL8CN1D2gIIid/3IPQtxhC7Z+Gdj0SF
 mlSUmibKF1LeIgYYH0y/q5sSiW1Srew5ukkgYLGIiJ49YRysvgbAn0WYue7QMU8G
 jegJBHy5Gz7JJvue+3KFaoZwDLos+IRI9vAeLMcK3PoQey4lfHS2s0NOkAVLxbcc
 bOLdCNSOLDrw+wFM3MgtNqNQPjCg7X4eTJEg5pKwGFwjFdlGQqSNQ6u/SWKg6w64
 eb3CLxzihIgX7s473HD7reK2Q+yhjj1mSWDC0HWTstJ90suMBeW3yQMf7v/IwRE/
 iRLRlbsD0mCq1JMG8TuYmm3eq18PkFAteF2Hm6fMhdR1lE/QNQM2f/W7itYmMqZC
 /kL/bkvthpoDAkCjTNEBtgOri1N9oJWVgC77asUc1gAKz5SwBpkPQSNZzxy5Tuqz
 WNNd9v3lxnS5tnsqs//Iqgt23KTouD3w4MAGVkI4eVpjh1Kz83H+OrgU1fBxoqKl
 rer8h4yS2sYkHfdZsnMZ/H+GBNqme8tVJufzasr03h60mXIFzNOy8RLaexZTslil
 UP3d5e8fZo7u4BeNh7925R/K5pX+HjcmndXoQPflwoZ3SdulICgT8naDfEpoqpLQ
 UTNuhDvlNY1ec7mnZQ5GwcDUwQ77e6KsNqwq2vMtffIMyGc/4j0=
 =XW7G
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-5.1/devicetree-fixes' of https://github.com/Broadcom/stblinux into arm/fixes

This pull request contains Broadcom ARM-based SoCs Device Tree fixes for
5.1, please pull the following:

- Helen fixes the HDMI hot-pug detect GPIO polarity for the Rasperry Pi
  model B revision 2

* tag 'arm-soc/for-5.1/devicetree-fixes' of https://github.com/Broadcom/stblinux:
  ARM: dts: bcm283x: Fix hdmi hpd gpio pull
2019-03-25 17:04:47 +01:00
Linus Walleij fa9463564e ARM: dts: nomadik: Fix polarity of SPI CS
The SPI DT bindings are for historical reasons a pitfall,
the ability to flag a GPIO line as active high/low with
the second cell flags was introduced later so the SPI
subsystem will only accept the bool flag spi-cs-high
to indicate that the line is active high.

It worked by mistake, but the mistake was corrected
in another commit.

The comment in the DTS file was also misleading: this
CS is indeed active high.

Fixes: cffbb02daf ("ARM: dts: nomadik: Augment NHK15 panel setting")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2019-03-25 17:03:34 +01:00
Arnd Bergmann 44cd905041 Renesas ARM Based SoC Fixes for v5.1
R-Car Gen3 E3 (r8a77990) and RZ/G2E (r8a774c0) SoCs:
 * Correct SCIF5 DMA channels
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4nzZofWswv9L/nKF189kaWo3T74FAlyLegEACgkQ189kaWo3
 T76QFBAAlYeKbR0QsA92hciDmlWMMvp26LPXDlI8Ue+vcxi9Weps1t2H2ZcCl0Hc
 vt5EVp5fnM15gpMwDNMVKZan7NKuxPrIqXYO23oR/YW4GUV/H9gwKteAwHEcXVp3
 7kp9OvYkPYAXNoFxK8kh26qVoeBZxckdRchHdNq/A+3dXjuamA+s04OK62S5N+4r
 eEWPZ446IOJZEswN6DCC3uF+92JLW3TrjMoRkqWm+LrKbvFFFgokx8DD+kf3+pES
 ZZzS9yuY+U/BK0mvRs7GbLNoC83b1TMp2AJDZjf0eA6gs+Nxi+2/AwtNgU7kMRlZ
 ucBc9qhg3K8r9UZQw83sWs6wcAsBLsgv9KJjY34KFJdXxHWXNIB2hvAUV1uA++hq
 Vz+wYa+zs7xW2BlSbaw8awa+o1BP01+hjLdsEJg3WJsMM+ayBOB5J3mZ28YHktlE
 Y6YLD+zxp2GsIA6FaMoJfiocZfm0AutRWyF59OHqhwKHenq+LFL3/J0lNsTEeDTm
 pU1tlNoxglxMEHIatV8YQtSngrPDeTjny0MIb2k94XXbB3ljL+bXph8JlG3hb8od
 X5ekBoLWQY+VrB/6Hy2cHQdJSWaZTf/KYF3QyFO8790MJU8rjQ208oYRiTax5U1i
 K2KIquikCDOiFbRgZy3bR1J9wJUdnrx/EI9qzMyjv+hrcWpxJTM=
 =6Y1e
 -----END PGP SIGNATURE-----

Merge tag 'renesas-fixes-for-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/fixes

Renesas ARM Based SoC Fixes for v5.1

R-Car Gen3 E3 (r8a77990) and RZ/G2E (r8a774c0) SoCs:
* Correct SCIF5 DMA channels

* tag 'renesas-fixes-for-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  arm64: dts: renesas: r8a774c0: Fix SCIF5 DMA channels
  arm64: dts: renesas: r8a77990: Fix SCIF5 DMA channels
2019-03-25 17:02:31 +01:00
Sekhar Nori 2dbed152e2 ARM: davinci: fix build failure with allnoconfig
allnoconfig build with just ARCH_DAVINCI enabled
fails because drivers/clk/davinci/* depends on
REGMAP being enabled.

Fix it by selecting REGMAP_MMIO when building in
DaVinci support.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: David Lechner <david@lechnology.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2019-03-25 16:59:30 +01:00
Linus Torvalds 19caf581ba Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner:
 "A set of x86 fixes:

   - Prevent potential NULL pointer dereferences in the HPET and HyperV
     code

   - Exclude the GART aperture from /proc/kcore to prevent kernel
     crashes on access

   - Use the correct macros for Cyrix I/O on Geode processors

   - Remove yet another kernel address printk leak

   - Announce microcode reload completion as requested by quite some
     people. Microcode loading has become popular recently.

   - Some 'Make Clang' happy fixlets

   - A few cleanups for recently added code"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/gart: Exclude GART aperture from kcore
  x86/hw_breakpoints: Make default case in hw_breakpoint_arch_parse() return an error
  x86/mm/pti: Make local symbols static
  x86/cpu/cyrix: Remove {get,set}Cx86_old macros used for Cyrix processors
  x86/cpu/cyrix: Use correct macros for Cyrix calls on Geode processors
  x86/microcode: Announce reload operation's completion
  x86/hyperv: Prevent potential NULL pointer dereference
  x86/hpet: Prevent potential NULL pointer dereference
  x86/lib: Fix indentation issue, remove extra tab
  x86/boot: Restrict header scope to make Clang happy
  x86/mm: Don't leak kernel addresses
  x86/cpufeature: Fix various quality problems in the <asm/cpu_device_hd.h> header
2019-03-24 11:12:27 -07:00
Linus Torvalds e08fef881d Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Thomas Gleixner:
 "A set of fixes for the interrupt subsystem:

   - Remove secondary GIC support on systems w/o device-tree support

   - A set of small fixlets in various irqchip drivers

   - static and fall-through annotations

   - Kernel doc and typo fixes"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq: Mark expected switch case fall-through
  genirq/devres: Remove excess parameter from kernel doc
  irqchip/irq-mvebu-sei: Make mvebu_sei_ap806_caps static
  irqchip/mbigen: Don't clear eventid when freeing an MSI
  irqchip/stm32: Don't set rising configuration registers at init
  irqchip/stm32: Don't clear rising/falling config registers at init
  dt-bindings: irqchip: renesas-irqc: Document r8a774c0 support
  irqchip/mmp: Make mmp_irq_domain_ops static
  irqchip/brcmstb-l2: Make two init functions static
  genirq: Fix typo in comment of IRQD_MOVE_PCNTXT
  irqchip/gic-v3-its: Fix comparison logic in lpi_range_cmp
  irqchip/gic: Drop support for secondary GIC in non-DT systems
  irqchip/imx-irqsteer: Fix of_property_read_u32() error handling
2019-03-24 10:51:23 -07:00
Kairui Song ffc8599aa9 x86/gart: Exclude GART aperture from kcore
On machines where the GART aperture is mapped over physical RAM,
/proc/kcore contains the GART aperture range. Accessing the GART range via
/proc/kcore results in a kernel crash.

vmcore used to have the same issue, until it was fixed with commit
2a3e83c6f9 ("x86/gart: Exclude GART aperture from vmcore")', leveraging
existing hook infrastructure in vmcore to let /proc/vmcore return zeroes
when attempting to read the aperture region, and so it won't read from the
actual memory.

Apply the same workaround for kcore. First implement the same hook
infrastructure for kcore, then reuse the hook functions introduced in the
previous vmcore fix. Just with some minor adjustment, rename some functions
for more general usage, and simplify the hook infrastructure a bit as there
is no module usage yet.

Suggested-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Kairui Song <kasong@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jiri Bohac <jbohac@suse.cz>
Acked-by: Baoquan He <bhe@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Omar Sandoval <osandov@fb.com>
Cc: Dave Young <dyoung@redhat.com>
Link: https://lkml.kernel.org/r/20190308030508.13548-1-kasong@redhat.com
2019-03-23 12:11:49 +01:00
Linus Torvalds a5ed1e96ca powerpc fixes for 5.1 #3
One fix for a boot failure on 32-bit, introduced during the merge window.
 
 A fix for our handling of CLOCK_MONOTONIC in the 64-bit VDSO. Changing the wall
 clock across the Y2038 boundary could cause CLOCK_MONOTONIC to jump forward and
 backward.
 
 Our spectre_v2 reporting was a bit confusing due to a bug I introduced. On some
 systems it was reporting that the count cache was disabled and also that we were
 flushing the count cache on context switch. Only the former is true, and given
 that the count cache is disabled it doesn't make any sense to flush it. No one
 reported it, so presumably the presence of any mitigation is all people check
 for.
 
 Finally a small build fix for zsmalloc on 32-bit.
 
 Thanks to:
   Ben Hutchings, Christophe Leroy, Diana Craciun, Guenter Roeck, Michael Neuling.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJclNlOAAoJEFHr6jzI4aWAzoQQAJ80jKyZj/GSLXKJQpD9p+bO
 XrbXzFF3tc3ctqKNOULEkUs3XlV3UWbSm7WZBBtruZy34s1r4WLrtk38+/41ZSZA
 TdUj7/mZEKfi+RzA2o8dsKjRwNHh2atzYwwPY16Czv53LW6zN1xL0+QLZp7/sZsF
 sy6pAeHiBsvTBrVtldRLmE2nWgaEy9eX2TQ/O9OdU8D0febHF8xSUQQJ9GCS1B8G
 t3hq+Q1fJQhq/81x2AKtChQyWvw4747K4icXXRE+Fgh12I3STuE3q2iAOYjII2k8
 IWhJM5/LR5lwnmubt1ezK/k5iMFaibn4lckEG/q+MR4NN98Z63OHCDoI8dendoif
 6Ok+6d4Ven3c5SGhZSXzPsQow7VTewzcCw41BKApuNts4FR0EtQUIAQYDvqO39d3
 OST9bPuTtNA48Jfjsy07VmBS8LfuMHmnrtRT6xUW0f/2Bt1r4JY6SX9F+HvN8JTU
 KdalG1t4R/sXVJNd/mflF/IhP3xw9Cz75DojvZ6M7GjI+Y9Tg9jsRXu0MdhM4XxS
 fPpQlsOCBJnX5OrRMNbXAZCR/KLeW14V9143OAwsj3h3gLy5QC8kUHp9tEx8ZbM3
 eE425B7DMDnB+w6URc0VQHB2E+wbSc+gtLHBOqmdRfjVy0IjtPI2taZMQiXNBNNN
 V554zrEyJPnxRiZhedrG
 =NixN
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-5.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:
 "One fix for a boot failure on 32-bit, introduced during the merge
  window.

  A fix for our handling of CLOCK_MONOTONIC in the 64-bit VDSO. Changing
  the wall clock across the Y2038 boundary could cause CLOCK_MONOTONIC
  to jump forward and backward.

  Our spectre_v2 reporting was a bit confusing due to a bug I
  introduced. On some systems it was reporting that the count cache was
  disabled and also that we were flushing the count cache on context
  switch. Only the former is true, and given that the count cache is
  disabled it doesn't make any sense to flush it. No one reported it, so
  presumably the presence of any mitigation is all people check for.

  Finally a small build fix for zsmalloc on 32-bit.

  Thanks to: Ben Hutchings, Christophe Leroy, Diana Craciun, Guenter
  Roeck, Michael Neuling"

* tag 'powerpc-5.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/security: Fix spectre_v2 reporting
  powerpc/mm: Only define MAX_PHYSMEM_BITS in SPARSEMEM configurations
  powerpc/6xx: fix setup and use of SPRN_SPRG_PGDIR for hash32
  powerpc/vdso64: Fix CLOCK_MONOTONIC inconsistencies across Y2038
2019-03-22 14:15:11 -07:00
Thomas Gleixner f7798711ad Merge branch 'x86/cpu' into x86/urgent
Merge the forgotten cleanup patch for the new file, so the mess does not
propagate further.
2019-03-22 17:09:59 +01:00
Nathan Chancellor e898e69d6b x86/hw_breakpoints: Make default case in hw_breakpoint_arch_parse() return an error
When building with -Wsometimes-uninitialized, Clang warns:

arch/x86/kernel/hw_breakpoint.c:355:2: warning: variable 'align' is used
uninitialized whenever switch default is taken
[-Wsometimes-uninitialized]

The default cannot be reached because arch_build_bp_info() initializes
hw->len to one of the specified cases. Nevertheless the warning is valid
and returning -EINVAL makes sure that this cannot be broken by future
modifications.

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: clang-built-linux@googlegroups.com
Link: https://github.com/ClangBuiltLinux/linux/issues/392
Link: https://lkml.kernel.org/r/20190307212756.4648-1-natechancellor@gmail.com
2019-03-22 17:08:17 +01:00
Valdis Kletnieks 4fe64a62e0 x86/mm/pti: Make local symbols static
With 'make C=2 W=1', sparse and gcc both complain:

  CHECK   arch/x86/mm/pti.c
arch/x86/mm/pti.c:84:3: warning: symbol 'pti_mode' was not declared. Should it be static?
arch/x86/mm/pti.c:605:6: warning: symbol 'pti_set_kernel_image_nonglobal' was not declared. Should it be static?
  CC      arch/x86/mm/pti.o
arch/x86/mm/pti.c:605:6: warning: no previous prototype for 'pti_set_kernel_image_nonglobal' [-Wmissing-prototypes]
  605 | void pti_set_kernel_image_nonglobal(void)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

pti_set_kernel_image_nonglobal() is only used locally. 'pti_mode' exists in
drivers/hwtracing/intel_th/pti.c as well, but it's a completely unrelated
local (static) symbol.

Make both static.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/r/27680.1552376873@turing-police
2019-03-22 13:31:28 +01:00
Uwe Kleine-König 507aaeeef8 ARM: imx_v4_v5_defconfig: enable PWM driver
While there is no mainline board that makes use of the PWM still enable the
driver for it to increase compile test coverage.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-03-22 09:56:11 +08:00
Uwe Kleine-König 728e096dd7 ARM: imx_v6_v7_defconfig: continue compiling the pwm driver
After the pwm-imx driver was split into two drivers and the Kconfig symbol
changed accordingly, use the new name to continue being able to use the
PWM hardware.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-03-22 09:55:59 +08:00
Michal Vokáč 15b43e497f ARM: dts: imx6dl-yapp4: Use correct pseudo PHY address for the switch
The switch is accessible through pseudo PHY which is located at 0x10.

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Fixes: 87489ec3a7 ("ARM: dts: imx: Add Y Soft IOTA Draco, Hydra and Ursa boards")
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-03-22 09:20:32 +08:00
Masanari Iida 41b37f4c0f ARM: dts: imx6qdl: Fix typo in imx6qdl-icore-rqs.dtsi
This patch fixes a spelling typo.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Fixes: cc42603de3 ("ARM: dts: imx6q-icore-rqs: Add Engicam IMX6 Q7 initial support")
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-03-22 08:42:24 +08:00
Linus Torvalds d92da1fbb7 - Update the kprobe blacklist checking for arm64. This was supposed to
be queued during the merging window but, due to conflicts, it was
   deferred post -rc1
 
 - Extend the Fujitsu erratum 010001 workaround to A64FX v1r0
 
 - Whitelist HiSilicon Taishan v110 CPUs as not susceptible to Meltdown
 
 - Export save_stack_trace_regs()
 
 - Remove obsolete selection of MULTI_IRQ_HANDLER
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAlyTyioACgkQa9axLQDI
 XvEqbQ/+PejrpKcIBzzXhvRfiqV0i/zogI7Qj4ahtTe9R6Q+yH8/jMiNnYXSLLT+
 nIPUMXkRpVCQQbnz/IFWkikMQs0fLExLFAX59xdeV5pPtbHCL0PnwSwpFYBY4UK5
 O4VLQBpHXLfXk0mSTTlg+4SKkCd69NQihuweNYg6k/QF9Mmkl20m/CTzl+/lrieV
 KKr5hICfkfoFJNXozkmO08BbTtGgvYMHovDi5NbO+hd/DIwJZc05J7B2Hl6ub/q8
 MsT+1jTU3+q95dG9Ix8eynHkIvCxYbumWoLQ9hrCE+V30mcGhhUzEjfy5JKtYpmC
 SecQnzfRKZpMFAX+kNJ2PvN/qMRxaDSzMsd3kQQGBlweJl/gENjusZUNvPxLvgCO
 /dWNxKRRDsPqCfC3AsHAq452w+jobocu+boH0FheuF5MMseiTea3T683yKC3UX7D
 N0OzNqRS7ftpehAsKx0ysQCTfvF/lYIYqCyUFDtQQy+xFYBObZpKGjq8sEBGGqMh
 ZpPMdQO96zeMcKc0ePgGfXSzuAsml1PJsVN20ZCoAU4pRUsyD/r45JqpZGsD7veH
 KphDvcgnKpWX+wiHtsuCdGifHBUQcqvQbtt8qNDfxJhAo9Lx9oNwQ5ftExzKt0pn
 iXS35E33UteOVnobZtRyn4dsPRdUkwp8mmTA8CU6K+cILYV8TVg=
 =o3LG
 -----END PGP SIGNATURE-----

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

Pull arm64 fixes from Catalin Marinas:
 "Mostly fixes apart from the kprobe blacklist checking which was
  deferred because of conflicting with a fix merged after I pinned the
  arm64 for-next/core branch (f2b3d8566d "arm64: kprobe: Always
  blacklist the KVM world-switch code").

  Summary:

   - Update the kprobe blacklist checking for arm64. This was supposed
     to be queued during the merging window but, due to conflicts, it
     was deferred post -rc1

   - Extend the Fujitsu erratum 010001 workaround to A64FX v1r0

   - Whitelist HiSilicon Taishan v110 CPUs as not susceptible to
     Meltdown

   - Export save_stack_trace_regs()

   - Remove obsolete selection of MULTI_IRQ_HANDLER"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: remove obsolete selection of MULTI_IRQ_HANDLER
  arm64: kpti: Whitelist HiSilicon Taishan v110 CPUs
  arm64: Add MIDR encoding for HiSilicon Taishan CPUs
  arm64/stacktrace: Export save_stack_trace_regs()
  arm64: apply workaround on A64FX v1r0
  arm64: kprobes: Use arch_populate_kprobe_blacklist()
  arm64: kprobes: Move exception_text check in blacklist
  arm64: kprobes: Remove unneeded RODATA check
  arm64: kprobes: Move extable address check into arch_prepare_kprobe()
2019-03-21 11:48:06 -07:00
Thomas Gleixner 3ce8461f45 irqchip updates for 5.1, take #2
- irqsteer error handling fix
 - GICv3 range coalescing fix
 - stm32 coprocessor coexistence fixes
 - mbigen MSI teardown fix
 - non-DT secondary GIC infrastructure removed
 - various cleanups (brcmstb-l2, mmp)
 - new DT bindings (r8a774c0)
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEn9UcU+C1Yxj9lZw9I9DQutE9ekMFAlyTciIVHG1hcmMuenlu
 Z2llckBhcm0uY29tAAoJECPQ0LrRPXpDHbUP/1ndbJE6O5S24YqbeffNc3dr6hka
 zyYpzY63KtS39TWxrLmZJlXkMecSXlY4QN3FqZd+g81p+E5zUlZ+PklqFYG6pBSj
 6lHsXp4Bo20IAKJTG+4g9K3Am+i3FNoglB2ROPLF4A6pAVvyDWJL0CXCwHG8gLsS
 NbjDIQpcKRFOGO4qdsTNRYjEVaadShz7koLeQQJ8w/Cnraq8u7ETtAq7irmYv/c6
 PX0MUfl12FtqsGZR+xC5th1PYBq5I7E/BsGNnABf9dREpUD4b0IgFV2yPg0r+mMd
 rSU7OZXWv+JLsQuK4FvHdlM1w7d/g5awG67Mt84eScU4LxjVV68MWtsj0WtNpIOp
 sCiQZ9tifBz1C2K/6iXoRLEYbrzUFOyGQX9AZXKoXqCB4eu1ZUKT7zeTtFYxIdPO
 jc9vGT2v7zlKsEpuj5BJEsNSRUJcGZgC7CQvJTxYWLbu7henpPkh6nf/PkbrDKIB
 HtuSygju1YzMH4imvZoVuhB60Bii6ZExVy6a4STYcUJu+Qj8/kyF6sHuZv4YMUnm
 yKGcXxAQE2C2SdYfGl2u0JradMB4kPU1+2uA7uOq/kTxcm30nGJ/YcYYEL/BaXt9
 Clg7WNiTSB6NOrYLhPYOfGa1NwniFTvZWeo9C61o4gslNLukXG885U9swo+NXPYq
 UlJduzmQ0kDJ00ne
 =SBUi
 -----END PGP SIGNATURE-----

Merge tag 'irqchip-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent

Pull irqchip updates for 5.1 from Marc Zyngier:

 - irqsteer error handling fix
 - GICv3 range coalescing fix
 - stm32 coprocessor coexistence fixes
 - mbigen MSI teardown fix
 - non-DT secondary GIC infrastructure removed
 - various cleanups (brcmstb-l2, mmp)
 - new DT bindings (r8a774c0)
2019-03-21 12:30:54 +01:00
Matthew Whitehead 0f4d3aa761 x86/cpu/cyrix: Remove {get,set}Cx86_old macros used for Cyrix processors
The getCx86_old() and setCx86_old() macros have been replaced with
correctly working getCx86() and setCx86(), so remove these unused macros.

Signed-off-by: Matthew Whitehead <tedheadster@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: luto@kernel.org
Link: https://lkml.kernel.org/r/1552596361-8967-3-git-send-email-tedheadster@gmail.com
2019-03-21 12:28:50 +01:00
Matthew Whitehead 18fb053f9b x86/cpu/cyrix: Use correct macros for Cyrix calls on Geode processors
There are comments in processor-cyrix.h advising you to _not_ make calls
using the deprecated macros in this style:

  setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80);

This is because it expands the macro into a non-functioning calling
sequence. The calling order must be:

  outb(CX86_CCR2, 0x22);
  inb(0x23);

From the comments:

 * When using the old macros a line like
 *   setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
 * gets expanded to:
 *  do {
 *    outb((CX86_CCR2), 0x22);
 *    outb((({
 *        outb((CX86_CCR2), 0x22);
 *        inb(0x23);
 *    }) | 0x88), 0x23);
 *  } while (0);

The new macros fix this problem, so use them instead. Tested on an
actual Geode processor.

Signed-off-by: Matthew Whitehead <tedheadster@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: luto@kernel.org
Link: https://lkml.kernel.org/r/1552596361-8967-2-git-send-email-tedheadster@gmail.com
2019-03-21 12:28:50 +01:00
Borislav Petkov 9bd681251b x86/microcode: Announce reload operation's completion
By popular demand, issue a single line to dmesg after the reload
operation completes to let the user know that a reload has at least been
attempted.

Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190313110022.8229-1-bp@alien8.de
2019-03-21 12:24:39 +01:00
Kangjie Lu 534c89c22e x86/hyperv: Prevent potential NULL pointer dereference
The page allocation in hv_cpu_init() can fail, but the code does not
have a check for that.

Add a check and return -ENOMEM when the allocation fails.

[ tglx: Massaged changelog ]

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Acked-by: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: pakki001@umn.edu
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Sasha Levin <sashal@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-hyperv@vger.kernel.org
Link: https://lkml.kernel.org/r/20190314054651.1315-1-kjlu@umn.edu
2019-03-21 12:24:39 +01:00
Aditya Pakki 2e84f116af x86/hpet: Prevent potential NULL pointer dereference
hpet_virt_address may be NULL when ioremap_nocache fail, but the code lacks
a check.

Add a check to prevent NULL pointer dereference.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: kjlu@umn.edu
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Joe Perches <joe@perches.com>
Cc: Nicolai Stange <nstange@suse.de>
Cc: Roland Dreier <roland@purestorage.com>
Link: https://lkml.kernel.org/r/20190319021958.17275-1-pakki001@umn.edu
2019-03-21 12:24:38 +01:00
Colin Ian King 725e29db8c x86/lib: Fix indentation issue, remove extra tab
The increment of buff is indented one level too deeply, clean
this up by removing a tab.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: kernel-janitors@vger.kernel.org
Link: https://lkml.kernel.org/r/20190314230838.18256-1-colin.king@canonical.com
2019-03-21 12:24:38 +01:00
Nick Desaulniers a9c640ac96 x86/boot: Restrict header scope to make Clang happy
The inclusion of <linux/kernel.h> was causing issue as the definition of
__arch_hweight64 from arch/x86/include/asm/arch_hweight.h eventually gets
included. The definition is problematic when compiled with -m16 (all code
in arch/x86/boot/ is) as the "D" inline assembly constraint is rejected
by both compilers when passed an argument of type long long (regardless
of signedness, anything smaller is fine).

Because GCC performs inlining before semantic analysis, and
__arch_hweight64 is dead in this translation unit, GCC does not report
any issues at compile time.  Clang does the semantic analysis in the
front end, before inlining (run in the middle) can determine the code is
dead. I consider this another case of PR33587, which I think we can do
more work to solve.

It turns out that arch/x86/boot/string.c doesn't actually need
linux/kernel.h, simply linux/limits.h and linux/compiler.h.

Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Cc: bp@alien8.de
Cc: niravd@google.com
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Chao Fan <fanc.fnst@cn.fujitsu.com>
Cc: Uros Bizjak <ubizjak@gmail.com>
Link: https://bugs.llvm.org/show_bug.cgi?id=33587
Link: https://github.com/ClangBuiltLinux/linux/issues/347
Link: https://lkml.kernel.org/r/20190314221458.83047-1-ndesaulniers@google.com
2019-03-21 12:24:38 +01:00
Michael Ellerman 92edf8df0f powerpc/security: Fix spectre_v2 reporting
When I updated the spectre_v2 reporting to handle software count cache
flush I got the logic wrong when there's no software count cache
enabled at all.

The result is that on systems with the software count cache flush
disabled we print:

  Mitigation: Indirect branch cache disabled, Software count cache flush

Which correctly indicates that the count cache is disabled, but
incorrectly says the software count cache flush is enabled.

The root of the problem is that we are trying to handle all
combinations of options. But we know now that we only expect to see
the software count cache flush enabled if the other options are false.

So split the two cases, which simplifies the logic and fixes the bug.
We were also missing a space before "(hardware accelerated)".

The result is we see one of:

  Mitigation: Indirect branch serialisation (kernel only)
  Mitigation: Indirect branch cache disabled
  Mitigation: Software count cache flush
  Mitigation: Software count cache flush (hardware accelerated)

Fixes: ee13cb249f ("powerpc/64s: Add support for software count cache flush")
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Michael Neuling <mikey@neuling.org>
Reviewed-by: Diana Craciun <diana.craciun@nxp.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-03-21 21:09:03 +11:00
Nishad Kamdar 3123be1168 ARM: dts: imx6ull: Use the correct style for SPDX License Identifier
This patch corrects the SPDX License Identifier style
in imx6ull-pinfunc-snvs.h.

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

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-03-21 11:02:40 +08:00
Linus Torvalds 54c4901645 ARC updates for 5.1-rc2
- unaligned access support for HS cores
 
  - Removed extra memory barrier around spinlock code
 
  - HSDK platform updates: enable dmac, reset
 
  - some more boot logging updates
 
  - misclleneous minor fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJckWU3AAoJEGnX8d3iisJeh9sP/jAu5RP5lrDbxXsEC9MX5WSB
 8s+Ja77Nx3f6XfEv/Ii+cnYMxTXpdvYMt3YePsP/9oelNzzkoPWb6PmkGdEYcof/
 IXDvtEsCdF7qoi6MEWeADIbUsZSxF9ZDJfCirPptOOWWEi34gApkoyjbSNwipNRv
 ZEUWBlc7nURbEFR4Gly0qB+JFuIJbpw8g7T8qU835jQiJ4f6O4y+Etx5YGc3k1B8
 9WU0Wl8Dog358lqHdcCFsymRlCIqTGZ9h/HAO1QIco2q9BYHzjR1koPks9WlYMBs
 p0q3k2Pquhathb04HFXwQxCfXpaRUw1jJ4WR8hGTKHedywMsvnfiaODZKHxIQiMM
 E451oGfVQO4NcVEVvlWlpkCYlZVYgq9O1YBIAB/KKy5O9TlmcRzKJijLKEw+tpaF
 7djp+n+xVf3jeB77/feH8ryuqjaJklA5Zb+1gPt4lD8zJgzmpQ7cmtHOIVmroB6Q
 VTt35Of7SX131pF3HPdMcbx6Cvjs61pox33miR5k9qbkq07M8zCtFneoX9bJV5k3
 Fu7qFU/M2d/EQwnsavh6nURfePWIcd/c4rayIRFEye8oRX8mvpi5mHhP0wVz0D1R
 1eIWulI4xisNZo3kWOnhgCdLSFFsn+K4YdQu73PGdFqFDjs6ltgsTYolVKSCDQFq
 XTZoIXmArVYvMWkAl3pq
 =fFs9
 -----END PGP SIGNATURE-----

Merge tag 'arc-5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc

Pull ARC updates from Vineet Gupta:

 - unaligned access support for HS cores

 - Removed extra memory barrier around spinlock code

 - HSDK platform updates: enable dmac, reset

 - some more boot logging updates

 - misc minor fixes

* tag 'arc-5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  arch: arc: Kconfig: pedantic formatting
  ARCv2: spinlock: remove the extra smp_mb before lock, after unlock
  ARC: unaligned: relax the check for gcc supporting -mno-unaligned-access
  ARC: boot log: cut down on verbosity
  ARCv2: boot log: refurbish HS core/release identification
  arc: hsdk_defconfig: Enable CONFIG_BLK_DEV_RAM
  ARC: u-boot args: check that magic number is correct
  ARC: perf: bpok condition only exists for ARCompact
  ARCv2: Add explcit unaligned access support (and ability to disable too)
  ARCv2: lib: introduce memcpy optimized for unaligned access
  ARC: [plat-hsdk]: Enable AXI DW DMAC support
  ARC: [plat-hsdk]: Add reset controller handle to manage USB reset
  ARC: DTB: [scripted] fix node name and address spelling
2019-03-20 11:01:52 -07:00
Matthias Kaehlcke e5a5af7718 arm64: remove obsolete selection of MULTI_IRQ_HANDLER
The arm64 config selects MULTI_IRQ_HANDLER, which was renamed to
GENERIC_IRQ_MULTI_HANDLER by commit 4c301f9b6a ("ARM: Convert
to GENERIC_IRQ_MULTI_HANDLER"). The 'new' option is already
selected, so just remove the obsolete entry.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-03-20 17:34:16 +00:00
Ben Hutchings 8bc0868998 powerpc/mm: Only define MAX_PHYSMEM_BITS in SPARSEMEM configurations
MAX_PHYSMEM_BITS only needs to be defined if CONFIG_SPARSEMEM is
enabled, and that was the case before commit 4ffe713b75
("powerpc/mm: Increase the max addressable memory to 2PB").

On 32-bit systems, where CONFIG_SPARSEMEM is not enabled, we now
define it as 46.  That is larger than the real number of physical
address bits, and breaks calculations in zsmalloc:

  mm/zsmalloc.c:130:49: warning: right shift count is negative
    MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS))
                                                   ^~
  ...
  mm/zsmalloc.c:253:21: error: variably modified 'size_class' at file scope
    struct size_class *size_class[ZS_SIZE_CLASSES];
                       ^~~~~~~~~~

Fixes: 4ffe713b75 ("powerpc/mm: Increase the max addressable memory to 2PB")
Cc: stable@vger.kernel.org # v4.20+
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-03-21 00:16:45 +11:00
Marco Felsch 032f85c936 ARM: dts: pfla02: increase phy reset duration
Increase the reset duration to ensure correct phy functionality. The
reset duration is taken from barebox commit 52fdd510de ("ARM: dts:
pfla02: use long enough reset for ethernet phy"):

  Use a longer reset time for ethernet phy Micrel KSZ9031RNX. Otherwise a
  small percentage of modules have 'transmission timeouts' errors like

  barebox@Phytec phyFLEX-i.MX6 Quad Carrier-Board:/ ifup eth0
  warning: No MAC address set. Using random address 7e:94:4d:02:f8:f3
  eth0: 1000Mbps full duplex link detected
  eth0: transmission timeout
  T eth0: transmission timeout
  T eth0: transmission timeout
  T eth0: transmission timeout
  T eth0: transmission timeout

Cc: Stefan Christ <s.christ@phytec.de>
Cc: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Fixes: 3180f95666 ("ARM: dts: Phytec imx6q pfla02 and pbab01 support")
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-03-20 19:37:10 +08:00
Florian Fainelli 9c05d4c33d This pull request brings in a fix for detecting HDMI on the Pi B rev 2.
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlx9u1IACgkQtdYpNtH8
 nuj4GQ/+PD3lP/InAK2+k/Fhas2IA+YjPIC+fbv6lZ1XA/DEXucK0k8RWQCp/vr3
 cvHEB3QBmNyHDUJEKafHrozXzheI08OBWw/XbSarJb++dYz+AK+7bVucqLO8nRpU
 E7J/onHXpubcaWyw3Bt6e28WeOuK8LAZEqDsMtlge2B4ffAeCkQ2QQXd8ypkEIhg
 00L0naqptigKXeDYdm40L/pko4NSNMrV98spLBn+Xe2dB+BcIRv9ZdwtCuZCnAKx
 pxGL0JNdXINRlvj+ySmu5WdkqRDfYF4b2voV7pSE36RTPeLKQAGaAOIEjrBnSYqj
 rQ3FABCNSu6DsEjVewO1KRA83pN0+KyE+GcAmz4xhPMgEbFlgT9tbj3E5a09Go/z
 qtH5HzB/K1kqcZqFBY9P1YFw7/0pRdzVl0J1qD2ACinTC8IghKCpOzcVENWraT1z
 XyVHJdkmH5VwBdkNSPf5V071v20zXVK8uNe+1l7bvaXInGTF/HqFfNXrf1QGnrtX
 38HoNJ3wx8WjCSkJANz6GDpVSC8Z6VWmkW09IoZrzR+gHxqdzUDU0fbCoPuI/oAa
 TxwCEMWOqw0SYuly7Xd+jl4o0elG9lpefEYEHEcN2iku57aP8c1MTBxpo5RUpE2O
 FafXCQgVJSXPmw+rnFN2Ci+4h56f4pATWI/6W/R43JgCxWbl4t4=
 =LnIu
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAlyRTcAACgkQh9CWnEQH
 BwTEaQ/+Plj1UZErYBoIhNiRLhwPh3rvD59H3ruflF8MdZueicyFAtNmJy4B0TBx
 GLKj0xrQ/EORe8MJzHPUc5Itz832w1+HKqbVCS+uDzIgsYbQPeTs11d2Q8WhQj0C
 VtzRd74w3N6UYW+Wq2OHwftzU/7YHUhBT2OFhALUqgfCXRyYZfWbE0HgW1nNWEiJ
 yczaakmU9y6fh6dAp+cdFjZoSRhAKL/9WVOltxsUNbiQHR4SLA1v21U9BHFC0sXf
 rzI725k2bTJsweHy/3QuDwZKBbG4dmcAHhq1f8N8ycjHM5iJ3Y+ASIFJMk3CVuhM
 0tH6lTwQfqzGYvIT9e1l5JYaaVYj34ypFP6hR7hqW7Lr34YU3I6+tn5luhW46Snz
 1xi/zjFqeQyPDa+jlfNJhtUV8uvmDtoX1p6viyySE2AEfmLh2isf0oLE8MEpwH4q
 /sSR6l0itw9D4Pbb9eMqx3Bqpc0UmTy/zQvA/eaHqUOtL117nrxeMme0mA/82Ms/
 TM1dt+RSSzmAvoz/vY0CQCuyyItYQxk89mi2aOQBnbp5PotYBazmoMv57CJf6CVK
 RrGgGmpkKWC8N3h0mwnQ7WP4rk7n7x5i9W0/bhngqx4ZmJI318PmMVJb2YWasQJC
 eYpNr3rBH/BH3kuRFX0FjPkHdzNvYOVhil6VkaCtFoAGIcxrDNQ=
 =n/bC
 -----END PGP SIGNATURE-----

Merge tag 'tags/bcm2835-dt-next-2019-03-04' into devicetree/fixes

This pull request brings in a fix for detecting HDMI on the Pi B rev 2.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2019-03-19 13:14:32 -07:00
Linus Torvalds b7a42146dc A small batch of MIPS fixes for 5.1:
- An interrupt masking fix for Loongson-based Lemote 2F systems (fixing
   a regression from v3.19).
 
 - A relocation fix for configurations in which the devicetree is stored
   in an ELF section (fixing a regression from v4.7).
 
 - Fix jump labels for MIPSr6 kernels where they previously could
   inadvertently place a control transfer instruction in a forbidden slot
   & take unexpected exceptions (fixing MIPSr6 support added in v4.0).
 
 - Extend an existing USB power workaround for the Netgear WNDR3400 to v2
   boards in addition to the v3 ones that already used it.
 
 - Remove the custom MIPS32 definition of __kernel_fsid_t to make it
   consistent with MIPS64 & every other architecture, in particular
   resolving issues for code which tries to print the val field whose
   type previously differed (though had identical memory layout).
 -----BEGIN PGP SIGNATURE-----
 
 iIsEABYIADMWIQRgLjeFAZEXQzy86/s+p5+stXUA3QUCXJARJxUccGF1bC5idXJ0
 b25AbWlwcy5jb20ACgkQPqefrLV1AN0qJAEAg6i9PnkuHZFXjlaUsvBWyVJRrpgR
 Y9vLYXTGJZdb1BwA/i17C6xD7i41Ef2/TtOuPc5fJ6IfEbt74nKJEeBxNTUO
 =V6Ds
 -----END PGP SIGNATURE-----

Merge tag 'mips_fixes_5.1_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS fixes from Paul Burton:
 "A small batch of MIPS fixes for 5.1:

   - An interrupt masking fix for Loongson-based Lemote 2F systems
     (fixing a regression from v3.19)

   - A relocation fix for configurations in which the devicetree is
     stored in an ELF section (fixing a regression from v4.7)

   - Fix jump labels for MIPSr6 kernels where they previously could
     inadvertently place a control transfer instruction in a forbidden
     slot & take unexpected exceptions (fixing MIPSr6 support added in
     v4.0)

   - Extend an existing USB power workaround for the Netgear WNDR3400 to
     v2 boards in addition to the v3 ones that already used it

   - Remove the custom MIPS32 definition of __kernel_fsid_t to make it
     consistent with MIPS64 & every other architecture, in particular
     resolving issues for code which tries to print the val field whose
     type previously differed (though had identical memory layout)"

* tag 'mips_fixes_5.1_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  MIPS: Remove custom MIPS32 __kernel_fsid_t type
  mips: bcm47xx: Enable USB power on Netgear WNDR3400v2
  MIPS: Fix kernel crash for R6 in jump label branch function
  MIPS: Ensure ELF appended dtb is relocated
  mips: loongson64: lemote-2f: Add IRQF_NO_SUSPEND to "cascade" irqaction.
2019-03-19 10:50:15 -07:00
Hanjun Guo 0ecc471a2c arm64: kpti: Whitelist HiSilicon Taishan v110 CPUs
HiSilicon Taishan v110 CPUs didn't implement CSV3 field of the
ID_AA64PFR0_EL1 and are not susceptible to Meltdown, so whitelist
the MIDR in kpti_safe_list[] table.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Reviewed-by: John Garry <john.garry@huawei.com>
Reviewed-by: Zhangshaokun <zhangshaokun@hisilicon.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-03-19 14:55:10 +00:00
Hanjun Guo efd00c722c arm64: Add MIDR encoding for HiSilicon Taishan CPUs
Adding the MIDR encodings for HiSilicon Taishan v110 CPUs,
which is used in Kunpeng ARM64 server SoCs. TSV110 is the
abbreviation of Taishan v110.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Reviewed-by: John Garry <john.garry@huawei.com>
Reviewed-by: Zhangshaokun <zhangshaokun@hisilicon.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-03-19 14:55:10 +00:00
William Cohen c82fd1e6bd arm64/stacktrace: Export save_stack_trace_regs()
The ARM64 implements the save_stack_trace_regs function, but it is
unusable for any diagnostic tooling compiled as a kernel module due
the missing EXPORT_SYMBOL_GPL for the function.  Export
save_stack_trace_regs() to align with other architectures such as
s390, openrisc, and powerpc. This is similar to the ARM64 export of
save_stack_trace_tsk() added in git commit e27c7fa015.

Signed-off-by: William Cohen <wcohen@redhat.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-03-19 14:55:10 +00:00
Mark Rutland 3dbcea54b3 arm64: apply workaround on A64FX v1r0
Fujitsu erratum 010001 applies to A64FX v0r0 and v1r0, and we try to
handle either by masking MIDR with MIDR_FUJITSU_ERRATUM_010001_MASK
before comparing it to MIDR_FUJITSU_ERRATUM_010001.

Unfortunately, MIDR_FUJITSU_ERRATUM_010001 is constructed incorrectly
using MIDR_VARIANT(), which is intended to extract the variant field
from MIDR_EL1, rather than generate the field in-place. This results in
MIDR_FUJITSU_ERRATUM_010001 being all-ones, and we only match A64FX
v0r0.

This patch uses MIDR_CPU_VAR_REV() to generate an in-place mask for the
variant field, ensuring the we match both v0r0 and v1r0.

Fixes: 3e32131abc ("arm64: Add workaround for Fujitsu A64FX erratum 010001")
Reported-by: "Okamoto, Takayuki" <tokamoto@jp.fujitsu.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
[catalin.marinas@arm.com: fixed the patch author]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-03-19 14:54:24 +00:00
Masami Hiramatsu 6a019a92aa arm64: kprobes: Use arch_populate_kprobe_blacklist()
Use arch_populate_kprobe_blacklist() instead of
arch_within_kprobe_blacklist() so that we can see the full
blacklisted symbols under the debugfs.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
[catalin.marinas@arm.com: Add arch_populate_kprobe_blacklist() comment]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-03-19 12:47:44 +00:00
Masami Hiramatsu 6e08af0f10 arm64: kprobes: Move exception_text check in blacklist
Move exception/irqentry text address check in blacklist,
since those are symbol based rejection.

If we prohibit probing on the symbols in exception_text,
those should be blacklisted.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-03-19 12:43:24 +00:00
Masami Hiramatsu b5586163de arm64: kprobes: Remove unneeded RODATA check
Remove unneeded RODATA check from arch_prepare_kprobe().

Since check_kprobe_address_safe() already ensured that
the probe address is in kernel text, we don't need to
check whether the address in RODATA or not. That must
be always false.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-03-19 12:43:09 +00:00
Masami Hiramatsu a872fc8bf0 arm64: kprobes: Move extable address check into arch_prepare_kprobe()
Move extable address check into arch_prepare_kprobe() from
arch_within_kprobe_blacklist().
The blacklist is exposed via debugfs as a list of symbols.
The extable entries are smaller, so must be filtered out
by arch_prepare_kprobe().

Acked-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-03-19 12:42:58 +00:00
Matteo Croce a315172443 x86/mm: Don't leak kernel addresses
Since commit:

  ad67b74d24 ("printk: hash addresses printed with %p")

at boot "____ptrval____" is printed instead of actual addresses:

    found SMP MP-table at [mem 0x000f5cc0-0x000f5ccf] mapped at [(____ptrval____)]

Instead of changing the print to "%px", and leaking a kernel addresses,
just remove the print completely, like in:

  071929dbdd ("arm64: Stop printing the virtual memory layout").

Signed-off-by: Matteo Croce <mcroce@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-03-19 12:10:56 +01:00
Kohji Okuno 91740fc824 ARM: imx6q: cpuidle: fix bug that CPU might not wake up at expected time
In the current cpuidle implementation for i.MX6q, the CPU that sets
'WAIT_UNCLOCKED' and the CPU that returns to 'WAIT_CLOCKED' are always
the same. While the CPU that sets 'WAIT_UNCLOCKED' is in IDLE state of
"WAIT", if the other CPU wakes up and enters IDLE state of "WFI"
istead of "WAIT", this CPU can not wake up at expired time.
 Because, in the case of "WFI", the CPU must be waked up by the local
timer interrupt. But, while 'WAIT_UNCLOCKED' is set, the local timer
is stopped, when all CPUs execute "wfi" instruction. As a result, the
local timer interrupt is not fired.
 In this situation, this CPU will wake up by IRQ different from local
timer. (e.g. broacast timer)

So, this fix changes CPU to return to 'WAIT_CLOCKED'.

Signed-off-by: Kohji Okuno <okuno.kohji@jp.panasonic.com>
Fixes: e5f9dec8ff ("ARM: imx6q: support WAIT mode using cpuidle")
Cc: <stable@vger.kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-03-19 16:48:00 +08:00
Wen Yang 0c17e83fe4 ARM: imx51: fix a leaked reference by adding missing of_node_put
The call to of_get_next_child returns a node pointer with refcount
incremented thus it must be explicitly decremented after the last
usage.

Detected by coccinelle with the following warnings:
./arch/arm/mach-imx/mach-imx51.c:64:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 57, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-03-19 16:48:00 +08:00