Commit graph

1124320 commits

Author SHA1 Message Date
Hawking Zhang
0fd85e89b5 drm/amdgpu/gfx11: switch to amdgpu_gfx_rlc_init_microcode
switch to common helper to initialize rlc firmware
for gfx11

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-09-30 16:59:06 -04:00
Hawking Zhang
04fa38cce6 drm/amdgpu: add helper to init rlc firmware
To initialzie rlc firmware according to rlc
firmware header version

v2: squash in backwards compat fix

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-09-30 16:59:00 -04:00
Hawking Zhang
b33139ee15 drm/amdgpu: add helper to init rlc fw in header v2_4
To initialize rlc firmware in header v2_4

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-09-30 16:58:57 -04:00
Hawking Zhang
c1c3f41ffb drm/amdgpu: add helper to init rlc fw in header v2_3
To initialize rlc firmware in header v2_3

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-09-30 16:58:47 -04:00
Hawking Zhang
bcecb65248 drm/amdgpu: add helper to init rlc fw in header v2_2
To initialize rlc firmware in header v2_2

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-09-30 16:58:40 -04:00
Hawking Zhang
90df151245 drm/amdgpu: add helper to init rlc fw in header v2_1
To initialize rlc firmware in header v2_1

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-09-30 16:58:37 -04:00
Hawking Zhang
2f3f958602 drm/amdgpu: add helper to init rlc fw in header v2_0
To initialize rlc firmware in header v2_0

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-09-30 16:58:35 -04:00
Hawking Zhang
af81a9201e drm/amdgpu: save rlcv/rlcp ucode version in amdgpu_gfx
cache rlcv/rlcvp ucode version info in amdgpu_gfx
structure

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-09-30 16:58:23 -04:00
Rafael J. Wysocki
e996c7e018 Merge branches 'acpi-properties', 'acpi-tables', 'acpi-x86' and 'acpi-soc'
Merge changes related to ACPI data-only tables handling and ACPI device
properties management, x86-specific ACPI code changes and ACPI SoC driver
changes for 6.1-rc1:

 - Clean up the ACPI LPSS (Intel SoC) driver (Andy Shevchenko).

 - Add a quirk for Dell Inspiron 14 2-in-1 for StorageD3Enable (Mario
   Limonciello).

 - Drop unused dev_fmt() and redundant 'HMAT' prefix from the HMAT
  parsing code (Liu Shixin).

 - Make ACPI FPDT parsing code avoid calling acpi_os_map_memory() on
   invalid physical addresses (Hans de Goede).

 - Silence missing-declarations warning related to Apple device
   properties management (Lukas Wunner).

* acpi-properties:
  ACPI: property: Silence missing-declarations warning in apple.c

* acpi-tables:
  ACPI: HMAT: Drop unused dev_fmt() and redundant 'HMAT' prefix
  ACPI: tables: FPDT: Don't call acpi_os_map_memory() on invalid phys address

* acpi-x86:
  ACPI: x86: Add a quirk for Dell Inspiron 14 2-in-1 for StorageD3Enable

* acpi-soc:
  ACPI: LPSS: Deduplicate skipping device in acpi_lpss_create_device()
  ACPI: LPSS: Replace loop with first entry retrieval
2022-09-30 20:52:39 +02:00
Andy Shevchenko
6cc401be16 ACPI: LPSS: Deduplicate skipping device in acpi_lpss_create_device()
Add a new label to deduplicate skipping device code in the
acpi_lpss_create_device(). No functional change intended.

While at it, convert the last conditional to use the classical
pattern, i.e.

	if (err)
		...handle err...

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-09-30 20:51:07 +02:00
Andy Shevchenko
da13b3361b ACPI: LPSS: Replace loop with first entry retrieval
After the commit 6505e452371d ("ACPI: LPSS: Use the helper
acpi_dev_get_memory_resources()") the list is empty or
contains only resource of IORESOURCE_MEM type. Hence, no
need to check for the type, and since we break after the
first found, no need to iterate over full list. That said,
replace loop with first entry retrieval.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-09-30 20:51:07 +02:00
Rafael J. Wysocki
c77f54a9bc Merge branches 'acpi-scan', 'acpi-bus' and 'acpi-platform'
Merge changes related to ACPI device enumeration and ACPI support for
platform devices for 6.1-rc1:

 - Clean up ACPI platform devices support code (Andy Shevchenko, John
   Garry).

 - Clean up ACPI bus management code (Andy Shevchenko, ye xingchen).

 - Add support for multiple DMA windows with different offsets to the
   ACPI device enumeration code and use it on LoongArch (Jianmin Lv).

* acpi-scan:
  LoongArch: Use acpi_arch_dma_setup() and remove ARCH_HAS_PHYS_TO_DMA
  ACPI: scan: Support multiple DMA windows with different offsets

* acpi-bus:
  ACPI: bus: Refactor ACPI matching functions for better readability
  ACPI: bus: Drop kernel doc annotation from acpi_bus_notify()
  ACPI: bus: Remove the unneeded result variable

* acpi-platform:
  ACPI: platform: Use PLATFORM_DEVID_NONE in acpi_create_platform_device()
  ACPI: platform: Sort forbidden_id_list[] in ascending order
  ACPI: platform: Use sizeof(*pointer) instead of sizeof(type)
  ACPI: platform: Remove redundant print on -ENOMEM
  ACPI: platform: Get rid of redundant 'else'
2022-09-30 20:28:22 +02:00
Rafael J. Wysocki
d61991db68 Merge branches 'acpi-resource' and 'acpi-pm'
Merge ACPI resource management and ACPI power management chages for
6.1-rc1:

 - Filter out non-memory resources in is_memory(), add a helper
   function to find all memory type resources of an ACPI device object
   and use that function in 3 places (Heikki Krogerus).

 - Add IRQ override quirks for Asus Vivobook K3402ZA/K3502ZA and ASUS
   model S5402ZA (Tamim Khan, Kellen Renshaw).

 - Fix acpi_dev_state_d0() kerneldoc (Sakari Ailus).

 - Fix up suspend-to-idle support on ASUS Rembrandt laptops (Mario
   Limonciello).

* acpi-resource:
  ACPI: resource: Add ASUS model S5402ZA to quirks
  usb: typec: intel_pmc_mux: Use the helper acpi_dev_get_memory_resources()
  ACPI: resource: Skip IRQ override on Asus Vivobook K3402ZA/K3502ZA
  ACPI: LPSS: Use the helper acpi_dev_get_memory_resources()
  ACPI: APD: Use the helper acpi_dev_get_memory_resources()
  ACPI: resource: Add helper function acpi_dev_get_memory_resources()
  ACPI: resource: Filter out the non memory resources in is_memory()

* acpi-pm:
  ACPI: x86: s2idle: Add another ID to s2idle_dmi_table
  ACPI: x86: s2idle: Fix a NULL pointer dereference
  ACPI: x86: s2idle: Add a quirk for ASUSTeK COMPUTER INC. ROG Flow X13
  ACPI: x86: s2idle: Add a quirk for Lenovo Slim 7 Pro 14ARH7
  ACPI: x86: s2idle: Add a quirk for ASUS ROG Zephyrus G14
  ACPI: x86: s2idle: Add a quirk for ASUS TUF Gaming A17 FA707RE
  ACPI: x86: s2idle: Add module parameter to prefer Microsoft GUID
  ACPI: x86: s2idle: If a new AMD _HID is missing assume Rembrandt
  ACPI: x86: s2idle: Move _HID handling for AMD systems into structures
  ACPI: PM: Fix acpi_dev_state_d0() kerneldoc
2022-09-30 20:17:02 +02:00
Rafael J. Wysocki
80487a37de Merge branch 'acpi-dev'
Merge changes regarding the management of ACPI device objects for
6.1-rc1:

 - Rename ACPI device object reference counting functions (Rafael
   Wysocki).

 - Rearrange ACPI device object initialization code (Rafael Wysocki).

 - Drop parent field from struct acpi_device (Rafael Wysocki).

 - Extend the the int3472-tps68470 driver to support multiple consumers
   of a single TPS68470 along with the requisite framework-level
   support (Daniel Scally).

* acpi-dev:
  platform/x86: int3472: Add board data for Surface Go2 IR camera
  platform/x86: int3472: Support multiple gpio lookups in board data
  platform/x86: int3472: Support multiple clock consumers
  ACPI: bus: Add iterator for dependent devices
  ACPI: scan: Add acpi_dev_get_next_consumer_dev()
  ACPI: property: Use acpi_dev_parent()
  ACPI: Drop redundant acpi_dev_parent() header
  ACPI: PM: Fix NULL argument handling in acpi_device_get/set_power()
  ACPI: Drop parent field from struct acpi_device
  ACPI: scan: Eliminate __acpi_device_add()
  ACPI: scan: Rearrange initialization of ACPI device objects
  ACPI: scan: Rename acpi_bus_get_parent() and rearrange it
  ACPI: Rename acpi_bus_get/put_acpi_device()
2022-09-30 20:05:16 +02:00
Sumeet Pawnikar
82b1ec794d thermal: core: Increase maximum number of trip points
On one of the Chrome system, if we define more than 12 trip points,
probe for thermal sensor fails with
"int3403 thermal: probe of INTC1046:03 failed with error -22"
and throws an error as
"thermal_sys: Error: Incorrect number of thermal trips".

The thermal_zone_device_register() interface needs maximum
number of trip points supported in a zone as an argument.
This number can't exceed THERMAL_MAX_TRIPS, which is currently
set to 12. To address this issue, THERMAL_MAX_TRIPS value
has to be increased.

This interface also has an argument to specify a mask of trips
which are writable. This mask is defined as an int.
This mask sets the ceiling for increasing maximum number of
supported trips. With the current implementation, maximum number
of trips can be supported is 31.

Also, THERMAL_MAX_TRIPS macro is used in one place only.
So, remove THERMAL_MAX_TRIPS macro and compare num_trips
directly with using a macro BITS_PER_TYPE(int)-1.

Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-09-30 19:50:10 +02:00
Orlando Chamberlain
bab715bdaa efi: Correct Macmini DMI match in uefi cert quirk
It turns out Apple doesn't capitalise the "mini" in "Macmini" in DMI, which
is inconsistent with other model line names.

Correct the capitalisation of Macmini in the quirk for skipping loading
platform certs on T2 Macs.

Currently users get:

------------[ cut here ]------------
[Firmware Bug]: Page fault caused by firmware at PA: 0xffffa30640054000
WARNING: CPU: 1 PID: 8 at arch/x86/platform/efi/quirks.c:735 efi_crash_gracefully_on_page_fault+0x55/0xe0
Modules linked in:
CPU: 1 PID: 8 Comm: kworker/u12:0 Not tainted 5.18.14-arch1-2-t2 #1 4535eb3fc40fd08edab32a509fbf4c9bc52d111e
Hardware name: Apple Inc. Macmini8,1/Mac-7BA5B2DFE22DDD8C, BIOS 1731.120.10.0.0 (iBridge: 19.16.15071.0.0,0) 04/24/2022
Workqueue: efi_rts_wq efi_call_rts
...
---[ end trace 0000000000000000 ]---
efi: Froze efi_rts_wq and disabled EFI Runtime Services
integrity: Couldn't get size: 0x8000000000000015
integrity: MODSIGN: Couldn't get UEFI db list
efi: EFI Runtime Services are disabled!
integrity: Couldn't get size: 0x8000000000000015
integrity: Couldn't get UEFI dbx list

Fixes: 155ca952c7 ("efi: Do not import certificates from UEFI Secure Boot for T2 Macs")
Cc: stable@vger.kernel.org
Cc: Aditya Garg <gargaditya08@live.com>
Tested-by: Samuel Jiang <chyishian.jiang@gmail.com>
Signed-off-by: Orlando Chamberlain <redecorating@protonmail.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2022-09-30 13:47:27 -04:00
Linus Torvalds
70575e7783 virtio: fixes
Some last minute fixes. virtio-blk is the most important one
 since it was actually seen in the field, but the rest
 of them are small and clearly safe, everything here has
 been in next for a while.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmM3EacPHG1zdEByZWRo
 YXQuY29tAAoJECgfDbjSjVRpTp8H/2y+TqLMuHC/ErfEC9a9H4QUgi3wgTtya9jp
 8UF3pzYp8kN+35gcWn+3PaZQ6fKZ8bjkHfB54j+9HI4dFrcOVVT+3NtpoM7p+6NK
 lFAbsk2R/WnhSw9nRmVQg6ldLWYzWX3r3SJ9l44nOtFFfVHdr/ODLgA8l6cciQZv
 K7Bm3qUsLZe/C7JvlpE9LStyjNclvCM1gUs4Gg+gj7smjovE7DYQEUIoVIZp5Gqj
 DH3lLqoQdVQ+tIWFHLdW1Adc4YUoOVq8QzCFXISAx4L4AXlQLE4ztFULjB+62ncE
 IlU3EcbVaHJiRgTSytZhe/dVzrkI8n9rtFLqg3HCtT/RJ/gj+gg=
 =BTGf
 -----END PGP SIGNATURE-----

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull virtio fixes from Michael Tsirkin:
 "Some last minute fixes.

  The virtio-blk one is the most important one since it was actually
  seen in the field, but the rest of them are small and clearly safe,
  everything here has been in next for a while"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  vdpa/mlx5: Fix MQ to support non power of two num queues
  vduse: prevent uninitialized memory accesses
  virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq()
  virtio_test: fixup for vq reset
  virtio-crypto: fix memory-leak
  vdpa/ifcvf: fix the calculation of queuepair
2022-09-30 09:41:34 -07:00
Linus Torvalds
7bc6e90d7a block-6.0-2022-09-29
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmM2W7wQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgplm+EACplcKQA0fDsHOAyhqi6Ms7VK38kYAItlK2
 ztSeIQONBUtEuzSD6HA6W5+3gPPWRwXhNrIRMQp6rbKY8WS7jtTP/XqNISxjtvPx
 SMCDnDj8ANE8ykgLxiNECh87Q8D04wu3mY7Rs45aIowvXYxv8ALxGZ3QjFL/vDPT
 BHY8+EBwHbLRcpmI+J/eg1Qa9EfAixCTo+rimAucGe4qHVHmPawEjGY2hgmIcrdo
 k/WTelymDVkbrlRRcERWTFxjRkmS/f6lMQlEj3sPPsFkl2ka/l6BT135FOCJI/v4
 AEOpGjSoLTr0E3b4BCzu0MlU9WsTflinSgWKqJt2J4jyhuWjyCALv4ZrEIetKOZI
 NO+iEiTs2oO/dlGB3x0YFEieDACFRC6/leBAYgJIsG01jRBnQfU9/evxr25pK7kd
 iax+y0f/ilL0/aWR61YhJ67OH+aPLcgwJ1TUHD9N9BCcvq85rk46bcvmRf+ar9JZ
 4srCnybHN9yhkPkxeZKuTiNqJ3xZSesglNxxDMOfU9iWY1CjQX/aOoBuydJkJz4m
 gH8tyfEcvJxdhuLI3mvo7Mv2WUAyS2ohG4k1EAFZbPUa0pAHkyM9b1ZvSnbHWa6Z
 k6yKWmv8WLFKD2VY28HrsMHYBBVDCcJNsDzLqydaKFTU2g8YEQdk3h70Ga3tbhwS
 k23Pfs5bcw==
 =SZZ1
 -----END PGP SIGNATURE-----

Merge tag 'block-6.0-2022-09-29' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:
 "A single NVMe pull request via Christoph with a few fixes that should
  go into the 6.0 release:

   - Fix IOC_PR_CLEAR and IOC_PR_RELEASE ioctls for nvme devices
     (Michael Kelley)

   - Disable Write Zeroes on Phison E3C/E4C (Tina Hsu)"

* tag 'block-6.0-2022-09-29' of git://git.kernel.dk/linux:
  nvme-pci: disable Write Zeroes on Phison E3C/E4C
  nvme: Fix IOC_PR_CLEAR and IOC_PR_RELEASE ioctls for nvme devices
2022-09-30 09:33:33 -07:00
Linus Torvalds
a0debc4c7a io_uring-6.0-2022-09-29
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmM2W6oQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgproBD/9qkKpoPdXWr/dAsHUXMYclF6zG6ds3HKSi
 wK6Uo4T/HvEmTcHC5sQ51UhNGMSXgGW7d3ijkcG3Uz2jjpemCALIErT6nW4fGb8u
 p0WX3qn5TIgzvRJUD5/nnSMN5RMJ2U/HExx9fve2xI/92WosdgeyugazX62RgKNr
 qxB7UMf6hHpl/9Yb/bTe7g+jpRyRnSTACT0gz+L11dhxtU6Bu8SBg+PVgsybsxYn
 v/DaJPpbSKNzQ0/nSmMDL8GuNwbU6LFXQ/6wkGyT6uXhJAOo7+ae1nHu4e6REQXa
 3xJC9zmSHGihyi85Mn33vcMolUcaWV5Tcz5Sllr4euUpJSZgKpsSZPgI7X7ZFC7A
 2RGhn9Xbv/MlLPlxEL19dcRf8uutjXaRMIS5AfLU3xT0R/b3F4P2Bv0RTiEt71dT
 quicp4XCcZpMMezI9M0QckWZ9LSCnR3F3e5Ucw55VBwD+UfHKVIgnW1NhzKAO9s0
 5VDPFUo9Nwf8l0+qPBwd9AxJvrkzbi6YmyM4a2dVuC5dJesEvtSpMKn4o2taSdP4
 pTQoQYwt5PdOKkwC5L9UsiHttSGb4Dp0SQoShCYoI+oSlIHeQrdJhKgX1JF0fmrf
 55xWVDVCgLP6+YnziCty57Albmq04OS+okBUjpuswrZ68yVqFS5QzfztaErBtbIi
 ESj8eFCVrw==
 =ZmK2
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-6.0-2022-09-29' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:
 "Two fixes that should go into 6.0:

   - Tweak the single issuer logic to register the task at creation,
     rather than at first submit. SINGLE_ISSUER was added for 6.0, and
     after some discussion on this, we decided to make it a bit stricter
     while it's still possible to do so (Dylan).

   - Stefan from Samba had some doubts on the level triggered poll that
     was added for this release. Rather than attempt to mess around with
     it now, just do the quick one-liner to disable it for release and
     we have time to discuss and change it for 6.1 instead (me)"

* tag 'io_uring-6.0-2022-09-29' of git://git.kernel.dk/linux:
  io_uring/poll: disable level triggered poll
  io_uring: register single issuer task at creation
2022-09-30 09:28:39 -07:00
Linus Torvalds
d649d2c49b pstore revert for v6.0-rc8
- Revert crypto acomp migration (Guilherme G. Piccoli)
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEpcP2jyKd1g9yPm4TiXL039xtwCYFAmM3CssWHGtlZXNjb29r
 QGNocm9taXVtLm9yZwAKCRCJcvTf3G3AJl75D/42DaeB92odK/3XG9cI1Frp4YS0
 vcTIecUeheNrTf4okUjeL0kQjUJgDQLWYNxZU6O3ljNM3lItDegV14Ij4tiPJlNK
 pOg8e+ddnWmhTB6c1BrLwVIjPDUnJmhqd1L2G6D/1djlcQU2TzN/amjBE4PQYrC4
 Kyqn8nmrVt5CgCvkV4PPDuIiyeGx808bFu+rK13J6BZYDH4mTZWqky25+wFuresn
 HNBQ0Xh7otaeeIMdbdohaitANlr7xHpUOLDuHnQaZ9Od1wJdFqNFpQ0sYDwvsqhY
 aTyNAAkZig9xMp10Sr6lCDfT/ZHkHDtSNOqn30iwPrFX83QVbbnaQhRsN7EK8Caz
 v7dx2HDjP5MxkYetT+3qPW4waScc5/s7dJNXoK/3E3oWrKoFRwx2CrmZUEuHmjHC
 S1M/kG+MoizxGAWbtvB93XbxXJlULdgmv1VKQyBjZRZ9JVBP7AnQmstljKjK0yn2
 o/pgTFRduiTj7+N9iU7h7GxHNLXJm0YHwCZw1QhORc1dg14jbMkNEu6GN6ZNfuvg
 ADYs2tRN7YA7oGjACaCNAEuGxjY5/quvPAdYHdwankXBj8S8O2/BCxa02mbrPevC
 7p32nwzRtUz4G+bjJr4N/RGO1q/Qzn5IcZnzOxGUVn5TC729JxkfRUFrb/m0l0PP
 PgfmGgNjSQ4KDaYIMQ==
 =KoAn
 -----END PGP SIGNATURE-----

Merge tag 'pstore-v6.0-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull pstore revert from Kees Cook:
 "A misbehavior with some compression backends in pstore was just
  discovered due to the recent crypto acomp migration.

  Since we're so close to release, it seems better to just simply revert
  it, and we can figure out what's going on without leaving it broken
  for a release.

   - Revert crypto acomp migration (Guilherme G. Piccoli)"

* tag 'pstore-v6.0-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  Revert "pstore: migrate to crypto acomp interface"
2022-09-30 08:54:14 -07:00
Linus Torvalds
89e10b860c gpio fixes for v6.0
- fix the check for pwm support on non-A8K platforms in gpio-mvebu
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmM2uJEACgkQEacuoBRx
 13Jf9Q/+IHbeTT/EeYrurElRe/MOCKT69+QmPgrzDwhE/PeLf6Jan6h02HaB58kb
 mU6ruxMXSWmOypt8OMz/sepiR2qr263GhK/4sT5gvRLI44orx5ql8kzcMDpYZYib
 qWvnNZzyyWnF3x+SQYVWJ0GlNWQi6dZOzj5OMBLHZB2UxDbt3r8gpiqep3EHAzlR
 STiySnRYahWmbD0+/qfNtC1lUlfeuGIWDqROUaXW/wfPuOsNeo/aZtoArgqqCAYu
 5bGGY47ENbTv5t1Tc2+Eh4GvMfEDLttqgNToTXmTg1BfCBlv6rhG68+yGJS7DCoj
 ZLg+GMvspKeY7w7HiGcRbkor9fMZ5bay7wTYSuuBQEUTOG3LrLJvl+mKxK7t8VTm
 kOr2YwX9QrtZo8XCGQ5WuD9CIeXAk1weP996GxTh5PNLrHPYca9hfzCBJadK0ay0
 YgBdaVE3vt1I4Rl9NI1W2ySeNFS0pkf3JQFwhOrclDJ+HwP7GgTxwQlBue1oDVYw
 KCo17sabstTBbT56qODRTxSoXFRdgXmDj1z+emkf+/qcaeJPtDVOVZ9BJWcH6rJ+
 5gGdv8/lhBpaVBp4pB2XdD6Mf0/BvsZNyte0ytYqHiQuTH4HlNrA2dv3CBXmEnJO
 z81Vmjch4kYt6q5ZXVeJH/lfRImKwnzVzWzQZTyUlLNj+1UtS5E=
 =zdzJ
 -----END PGP SIGNATURE-----

Merge tag 'gpio-fixes-for-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:
 "One more fix for the upcoming release:

   - fix the check for pwm support on non-A8K platforms in gpio-mvebu"

* tag 'gpio-fixes-for-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: mvebu: Fix check for pwm support on non-A8K platforms
2022-09-30 08:30:10 -07:00
Guilherme G. Piccoli
40158dbf7e Revert "pstore: migrate to crypto acomp interface"
This reverts commit e4f0a7ec58.

When using this new interface, both efi_pstore and ramoops
backends are unable to properly decompress dmesg if using
zstd, lz4 and lzo algorithms (and maybe more). It does succeed
with deflate though.

The message observed in the kernel log is:

[2.328828] pstore: crypto_acomp_decompress failed, ret = -22!

The pstore infrastructure is able to collect the dmesg with
both backends tested, but since decompression fails it's
unreadable. With this revert everything is back to normal.

Fixes: e4f0a7ec58 ("pstore: migrate to crypto acomp interface")
Cc: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220929215515.276486-1-gpiccoli@igalia.com
2022-09-30 08:16:06 -07:00
Linus Torvalds
5a77386984 drm fixes for 6.0 final
amdgpu:
 - GC 11.x fixes
 - SMU 13.x fixes
 - DCN 3.1.4 fixes
 - DCN 3.2.x fixes
 - GC 9.x fix
 - Fence fix
 - SR-IOV supend/resume fix
 - PSR regression fix
 
 i915:
 - Restrict forced preemption to the active context
 - Restrict perf_limit_reasons to the supported platforms - gen11+
 
 bridge:
 - analogix: Revert earlier suspend fix
 - lt8912b: Fix corrupt display output
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmM2NBYACgkQDHTzWXnE
 hr4lXQ//XtTakjVrp+EVX5IAff65APGUOymQJtmwpLfzMzeqgsT9FtqqR5H6ntCr
 G4z21GUtVd9PLgzwpcyetTnpevr2wc2qofKWcUhtkOCJdKLsfaH+pCSKiyshqByd
 eXfeFBdRMTiwKtNteoWynnns7FbbEUSNLi6XOvv+TzX5441+qSuwmYcfZjet+/Bs
 NS3BIwXwceRIf9ZJUvirEHSaLG+abS9UiLhljI9F714INIBMyVEiqyl6LT20O6k+
 NuPzOcD6AQVPjlDezCKrX4aeZ3wG2QudOuXg/3e7L6XtRs24Grp6kg7HGQX6yYuo
 xrmjOmnNEHsv8RSem+enmYCh8F42WRI5XZsOuLHE0sH2vXfDIxrmpibrZDCUdOYO
 AmagoYwTjRXqqjanq10kGHRNuStrhytU2wQ55RiaNoWDSEuImAqrYUJb9at+KnTW
 AtiMDeZMSZFMpy0mPjwk0iJZ2NRoLtvoT9ffGT+aMQsADgGR2Zf1r44jXBnlsljl
 G1KT40wig8q9lGVza97ZAi4lSPdCwWeCEg8JQxHPeVf+1kS5iKC1231TW77UEXiG
 Lhz+yeDNuTpPtH/bLwO6AMaIAXyx8FiXhwuq0dSn5R9dCUKdZh5Zlo/Ja5syOm/s
 jXkLSkoIecvlTaqTPGsxR4Ua282o9d+eCvEiQx935sAzpDyCSUs=
 =dSSO
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2022-09-30-1' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Last set of fixes for 6.0 hopefully - minor bridge fixes, i915 fixes,
  and a bunch of amdgpu fixes for new IP blocks, along with a couple of
  regression fixes. Should be all set for merge window next week.

  amdgpu:
   - GC 11.x fixes
   - SMU 13.x fixes
   - DCN 3.1.4 fixes
   - DCN 3.2.x fixes
   - GC 9.x fix
   - Fence fix
   - SR-IOV supend/resume fix
   - PSR regression fix

  i915:
   - Restrict forced preemption to the active context
   - Restrict perf_limit_reasons to the supported platforms - gen11+

  bridge:
   - analogix: Revert earlier suspend fix
   - lt8912b: Fix corrupt display output"

* tag 'drm-fixes-2022-09-30-1' of git://anongit.freedesktop.org/drm/drm: (26 commits)
  drm/amd/display: Prevent OTG shutdown during PSR SU
  drm/i915/gt: Perf_limit_reasons are only available for Gen11+
  drm/amdgpu: Add amdgpu suspend-resume code path under SRIOV
  drm/amdgpu: Remove fence_process in count_emitted
  drm/amdgpu: Correct the position in patch_cond_exec
  drm/amd/display: fill in clock values when DPM is not enabled
  drm/amd/display: Avoid unnecessary pixel rate divider programming
  drm/amd/display: Remove assert for odm transition case
  drm/amd/display: Fix typo in get_pixel_rate_div
  drm/amd/display: Fix audio on display after unplugging another
  drm/amd/display: Add explicit FIFO disable for DP blank
  drm/amd/display: Wrap OTG disable workaround with FIFO control
  drm/amd/display: Do DIO FIFO enable after DP video stream enable
  drm/amd/display: Update DCN32 to use new SR latencies
  drm/amd/display: Avoid avoid unnecessary pixel rate divider programming
  drm/amdkfd: fix dropped interrupt in kfd_int_process_v11
  drm/amdgpu: pass queue size and is_aql_queue to MES
  drm/amdkfd: fix MQD init for GFX11 in init_mqd
  drm/amd/pm: use adverse selection for dpm features unsupported by driver
  drm/amd/pm: enable gfxoff feature for SMU 13.0.0
  ...
2022-09-30 08:12:04 -07:00
Tiezhu Yang
8e6ec6ce02 MIPS: Simplify __bswapdi2() and __bswapsi2()
Use macro definitions ___constant_swab64 and ___constant_swab32
to simplify __bswapdi2() and __bswapsi2().

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2022-09-30 16:50:00 +02:00
Tiezhu Yang
0668951705 MIPS: Silence missing prototype warning
Silence the following two warnings when make W=1:

  CC      arch/mips/lib/bswapsi.o
arch/mips/lib/bswapsi.c:5:22: warning: no previous prototype for '__bswapsi2' [-Wmissing-prototypes]
 unsigned int notrace __bswapsi2(unsigned int u)
                      ^~~~~~~~~~
  CC      arch/mips/lib/bswapdi.o
arch/mips/lib/bswapdi.c:5:28: warning: no previous prototype for '__bswapdi2' [-Wmissing-prototypes]
 unsigned long long notrace __bswapdi2(unsigned long long u)
                            ^~~~~~~~~~
  AR      arch/mips/lib/built-in.a

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2022-09-30 16:49:49 +02:00
Lukas Bulwahn
84aff0b690 mips: update config files
Clean up config files by:
  - removing configs that were deleted in the past
  - removing configs not in tree and without recently pending patches
  - adding new configs that are replacements for old configs in the file

For some detailed information, see Link.

Link: https://lore.kernel.org/kernel-janitors/20220929090645.1389-1-lukas.bulwahn@gmail.com/

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2022-09-30 16:45:06 +02:00
Sean Christopherson
394265079b KVM: selftests: Compare insn opcodes directly in fix_hypercall_test
Directly compare the expected versus observed hypercall instructions when
verifying that KVM patched in the native hypercall (FIX_HYPERCALL_INSN
quirk enabled).  gcc rightly complains that doing a 4-byte memcpy() with
an "unsigned char" as the source generates an out-of-bounds accesses.

Alternatively, "exp" and "obs" could be declared as 3-byte arrays, but
there's no known reason to copy locally instead of comparing directly.

In function ‘assert_hypercall_insn’,
    inlined from ‘guest_main’ at x86_64/fix_hypercall_test.c:91:2:
x86_64/fix_hypercall_test.c:63:9: error: array subscript ‘unsigned int[0]’
 is partly outside array bounds of ‘unsigned char[1]’ [-Werror=array-bounds]
   63 |         memcpy(&exp, exp_insn, sizeof(exp));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x86_64/fix_hypercall_test.c: In function ‘guest_main’:
x86_64/fix_hypercall_test.c:42:22: note: object ‘vmx_hypercall_insn’ of size 1
   42 | extern unsigned char vmx_hypercall_insn;
      |                      ^~~~~~~~~~~~~~~~~~
x86_64/fix_hypercall_test.c:25:22: note: object ‘svm_hypercall_insn’ of size 1
   25 | extern unsigned char svm_hypercall_insn;
      |                      ^~~~~~~~~~~~~~~~~~
In function ‘assert_hypercall_insn’,
    inlined from ‘guest_main’ at x86_64/fix_hypercall_test.c:91:2:
x86_64/fix_hypercall_test.c:64:9: error: array subscript ‘unsigned int[0]’
 is partly outside array bounds of ‘unsigned char[1]’ [-Werror=array-bounds]
   64 |         memcpy(&obs, obs_insn, sizeof(obs));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x86_64/fix_hypercall_test.c: In function ‘guest_main’:
x86_64/fix_hypercall_test.c:25:22: note: object ‘svm_hypercall_insn’ of size 1
   25 | extern unsigned char svm_hypercall_insn;
      |                      ^~~~~~~~~~~~~~~~~~
x86_64/fix_hypercall_test.c:42:22: note: object ‘vmx_hypercall_insn’ of size 1
   42 | extern unsigned char vmx_hypercall_insn;
      |                      ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [../lib.mk:135: tools/testing/selftests/kvm/x86_64/fix_hypercall_test] Error 1

Fixes: 6c2fa8b20d ("selftests: KVM: Test KVM_X86_QUIRK_FIX_HYPERCALL_INSN")
Cc: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Message-Id: <20220928233652.783504-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-30 06:38:02 -04:00
Sean Christopherson
6b6f71484b KVM: selftests: Implement memcmp(), memcpy(), and memset() for guest use
Implement memcmp(), memcpy(), and memset() to override the compiler's
built-in versions in order to guarantee that the compiler won't generate
out-of-line calls to external functions via the PLT.  This allows the
helpers to be safely used in guest code, as KVM selftests don't support
dynamic loading of guest code.

Steal the implementations from the kernel's generic versions, sans the
optimizations in memcmp() for unaligned accesses.

Put the utilities in a separate compilation unit and build with
-ffreestanding to fudge around a gcc "feature" where it will optimize
memset(), memcpy(), etc... by generating a recursive call.  I.e. the
compiler optimizes itself into infinite recursion.  Alternatively, the
individual functions could be tagged with
optimize("no-tree-loop-distribute-patterns"), but using "optimize" for
anything but debug is discouraged, and Linus NAK'd the use of the flag
in the kernel proper[*].

https://lore.kernel.org/lkml/CAHk-=wik-oXnUpfZ6Hw37uLykc-_P0Apyn2XuX-odh-3Nzop8w@mail.gmail.com

Cc: Andrew Jones <andrew.jones@linux.dev>
Cc: Anup Patel <anup@brainfault.org>
Cc: Atish Patra <atishp@atishpatra.org>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Janosch Frank <frankja@linux.ibm.com>
Cc: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220928233652.783504-2-seanjc@google.com>
Reviewed-by: Andrew Jones <andrew.jones@linux.dev>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-30 06:38:02 -04:00
Jim Mattson
aae2e72229 KVM: x86: Hide IA32_PLATFORM_DCA_CAP[31:0] from the guest
The only thing reported by CPUID.9 is the value of
IA32_PLATFORM_DCA_CAP[31:0] in EAX. This MSR doesn't even exist in the
guest, since CPUID.1:ECX.DCA[bit 18] is clear in the guest.

Clear CPUID.9 in KVM_GET_SUPPORTED_CPUID.

Fixes: 24c82e576b ("KVM: Sanitize cpuid")
Signed-off-by: Jim Mattson <jmattson@google.com>
Message-Id: <20220922231854.249383-1-jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-30 06:38:01 -04:00
David Matlack
09636efd1b KVM: selftests: Gracefully handle empty stack traces
Bail out of test_dump_stack() if the stack trace is empty rather than
invoking addr2line with zero addresses. The problem with the latter is
that addr2line will block waiting for addresses to be passed in via
stdin, e.g. if running a selftest from an interactive terminal.

Opportunistically fix up the comment that mentions skipping 3 frames
since only 2 are skipped in the code.

Cc: Vipin Sharma <vipinsh@google.com>
Cc: Sean Christopherson <seanjc@google.com>
Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20220922231724.3560211-1-dmatlack@google.com>
[Small tweak to keep backtrace() call close to if(). - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-30 06:38:00 -04:00
Emanuele Giuseppe Esposito
6336a810db KVM: selftests: replace assertion with warning in access_tracking_perf_test
Page_idle uses {ptep/pmdp}_clear_young_notify which in turn calls
the mmu notifier callback ->clear_young(), which purposefully
does not flush the TLB.

When running the test in a nested guest, point 1. of the test
doc header is violated, because KVM TLB is unbounded by size
and since no flush is forced, KVM does not update the sptes
accessed/idle bits resulting in guest assertion failure.

More precisely, only the first ACCESS_WRITE in run_test() actually
makes visible changes, because sptes are created and the accessed
bit is set to 1 (or idle bit is 0). Then the first mark_memory_idle()
passes since access bit is still one, and sets all pages as idle
(or not accessed). When the next write is performed, the update
is not flushed therefore idle is still 1 and next mark_memory_idle()
fails.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20220926082923.299554-1-eesposit@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-30 06:38:00 -04:00
Kees Cook
607e57c6c6 hardening: Remove Clang's enable flag for -ftrivial-auto-var-init=zero
Now that Clang's -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
option is no longer required, remove it from the command line. Clang 16
and later will warn when it is used, which will cause Kconfig to think
it can't use -ftrivial-auto-var-init=zero at all. Check for whether it
is required and only use it when so.

Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: linux-kbuild@vger.kernel.org
Cc: llvm@lists.linux.dev
Cc: stable@vger.kernel.org
Fixes: f02003c860 ("hardening: Avoid harmless Clang option under CONFIG_INIT_STACK_ALL_ZERO")
Signed-off-by: Kees Cook <keescook@chromium.org>
2022-09-29 23:05:00 -07:00
Bart Van Assche
17006e86a7 sparc: Unbreak the build
Fix the following build errors:

arch/sparc/mm/srmmu.c: In function ‘smp_flush_page_for_dma’:
arch/sparc/mm/srmmu.c:1639:13: error: cast between incompatible function types from ‘void (*)(long unsigned int)’ to ‘void (*)(long unsigned int,  long unsigned int,  long unsigned int,  long unsigned int,  long unsigned int)’ [-Werror=cast-function-type]
 1639 |         xc1((smpfunc_t) local_ops->page_for_dma, page);
      |             ^
arch/sparc/mm/srmmu.c: In function ‘smp_flush_cache_mm’:
arch/sparc/mm/srmmu.c:1662:29: error: cast between incompatible function types from ‘void (*)(struct mm_struct *)’ to ‘void (*)(long unsigned int,  long unsigned int,  long unsigned int,  long unsigned int,  long unsigned int)’ [-Werror=cast-function-type]
 1662 |                         xc1((smpfunc_t) local_ops->cache_mm, (unsigned long) mm);
      |
[ ... ]

Compile-tested only.

Fixes: 552a23a0e5 ("Makefile: Enable -Wcast-function-type")
Cc: stable@vger.kernel.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220830205854.1918026-1-bvanassche@acm.org
2022-09-29 19:21:10 -07:00
Lukas Bulwahn
9f4beead61 binfmt: remove taso from linux_binprm struct
With commit 987f20a9dc ("a.out: Remove the a.out implementation"), the
use of the special taso flag for alpha architectures in the linux_binprm
struct is gone.

Remove the definition of taso in the linux_binprm struct.

No functional change.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220929203903.9475-1-lukas.bulwahn@gmail.com
2022-09-29 16:38:05 -07:00
Dave Airlie
6643b3836f - Restrict forced preemption to the active context (Chris)
- Restrict perf_limit_reasons to the supported platforms - gen11+ (Ashutosh)
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEbSBwaO7dZQkcLOKj+mJfZA7rE8oFAmM1wIQACgkQ+mJfZA7r
 E8pyNgf/c137/kVem6XuCQ+vEAPMPRrWrQp5ghbJok37N7Pch1bYlYOGpeVGBbKk
 apyNymZh5TAJJrcI8BiAGkdJctumhI8w46NPuxzC4CcIi0DLenjbr4svQPk8GFvT
 uv+9yIQ6W6fJ8Zz/5A0gsgimDYJ0iVIWv1xtvEtcUFtpiuQmEa3XwZpVCNU7/E5W
 qFlJJ1jQprF/ZWArX2BxwsLb32IMOUuo2V35gPIqln7xHHEZRMtel1pRnUooho3j
 uCzar4j1bbF9kp15hIlKXgkTtSKrPsvhJAQuW6wUnRPj9rQGNvVUu/JRnbITzdvx
 OrDBpRLEpYv7nRfQpXvJ/GFvd2D9qA==
 =iXn3
 -----END PGP SIGNATURE-----

Merge tag 'drm-intel-fixes-2022-09-29' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes

- Restrict forced preemption to the active context (Chris)
- Restrict perf_limit_reasons to the supported platforms - gen11+ (Ashutosh)

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

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/YzXAkH1a32pYJD33@intel.com
2022-09-30 09:28:58 +10:00
Dave Airlie
91462afa42 Merge tag 'amd-drm-fixes-6.0-2022-09-29' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-6.0-2022-09-29:

amdgpu:
- GC 11.x fixes
- SMU 13.x fixes
- DCN 3.1.4 fixes
- DCN 3.2.x fixes
- GC 9.x fix
- Fence fix
- SR-IOV supend/resume fix
- PSR regression fix

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220929144003.8363-1-alexander.deucher@amd.com
2022-09-30 09:03:03 +10:00
Dave Airlie
153a97b4e3 Short summary of fixes pull:
* bridge/analogix: Revert earlier suspend fix
  * bridge/lt8912b: Fix corrupt display output
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmM1rvQACgkQaA3BHVML
 eiNyWgf/YfZNvMy18CHm1F74gNN0CbihChqNtTesMYnCt/E4hwe3YfJDf/NyJHfj
 ziigcHYCyEJ+R9TVLE9ynty/3tKycINZVDYo0H484GnMlpKGBQvlgCfTTWoymwTg
 gZkdGxeo9JXLC6PXPTii+Y+UEucqe33trjJ+qEUQg2Kjsy/yrhaD7UFKnhk6UJR6
 4qbO+ierRXFglwW/nQB5UOXyyWaL2Offh3iM2UaKsusJz5sveQSq/FkP9Rh0K0ti
 nHz4vydldjxjnfvAHrPJKzT0BaqhI9IOFZeOYgX1ml8Bwq7zmaI+Z9IkOtyf9wsP
 UOLP6wQQqvt8hba6/hOzWsCJeol/6g==
 =OLW2
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2022-09-29' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

Short summary of fixes pull:

 * bridge/analogix: Revert earlier suspend fix
 * bridge/lt8912b: Fix corrupt display output

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

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/YzWvHhaqHhYirn4L@linux-uq9g
2022-09-30 08:50:34 +10:00
Linus Torvalds
987a926c1d fix for breakage in dump_user_range()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQqUNBr3gm4hGXdBJlZ7Krx/gZQ6wUCYzXkrwAKCRBZ7Krx/gZQ
 6+BcAP4+OfgZO6qStFjroURhZ8o3qfCJpYde/fGN5S/F/5UMdAD6A+4yozxXLdMZ
 wb2oB0XhxHv33vFdFfEeodquTnn+MAQ=
 =1Mnt
 -----END PGP SIGNATURE-----

Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull coredump fix from Al Viro:
 "Fix for breakage in dump_user_range()"

* tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  [coredump] don't use __kernel_write() on kmap_local_page()
2022-09-29 14:37:45 -07:00
David Hildenbrand
69d517e6e2 checkpatch: warn on usage of VM_BUG_ON() and other BUG variants
checkpatch does not point out that VM_BUG_ON() and friends should be
avoided, however, Linus notes:

    VM_BUG_ON() has the exact same semantics as BUG_ON. It is literally
    no different, the only difference is "we can make the code smaller
    because these are less important". [1]

So let's warn on VM_BUG_ON() and other BUG variants as well. While at it,
make it clearer that the kernel really shouldn't be crashed.

As there are some subsystem BUG macros that actually don't end up crashing
the kernel -- for example, KVM_BUG_ON() -- exclude these manually.

[1] https://lore.kernel.org/r/CAHk-=wg40EAZofO16Eviaj7mfqDhZ2gVEbvfsMf6gYzspRjYvw@mail.gmail.com

Signed-off-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20220923113426.52871-3-david@redhat.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-09-29 13:20:53 -06:00
David Hildenbrand
1cfd9d7e43 coding-style.rst: document BUG() and WARN() rules ("do not crash the kernel")
Linus notes [1] that the introduction of new code that uses VM_BUG_ON()
is just as bad as BUG_ON(), because it will crash the kernel on
distributions that enable CONFIG_DEBUG_VM (like Fedora):

    VM_BUG_ON() has the exact same semantics as BUG_ON. It is literally
    no different, the only difference is "we can make the code smaller
    because these are less important". [2]

This resulted in a more generic discussion about usage of BUG() and
friends. While there might be corner cases that still deserve a BUG_ON(),
most BUG_ON() cases should simply use WARN_ON_ONCE() and implement a
recovery path if reasonable:

    The only possible case where BUG_ON can validly be used is "I have
    some fundamental data corruption and cannot possibly return an
    error". [2]

As a very good approximation is the general rule:

    "absolutely no new BUG_ON() calls _ever_" [2]

... not even if something really shouldn't ever happen and is merely for
documenting that an invariant always has to hold. However, there are sill
exceptions where BUG_ON() may be used:

    If you have a "this is major internal corruption, there's no way we can
    continue", then BUG_ON() is appropriate. [3]

There is only one good BUG_ON():

    Now, that said, there is one very valid sub-form of BUG_ON():
    BUILD_BUG_ON() is absolutely 100% fine. [2]

While WARN will also crash the machine with panic_on_warn set, that's
exactly to be expected:

    So we have two very different cases: the "virtual machine with good
    logging where a dead machine is fine" - use 'panic_on_warn'. And
    the actual real hardware with real drivers, running real loads by
    users. [4]

The basic idea is that warnings will similarly get reported by users
and be found during testing. However, in contrast to a BUG(), there is a
way to actually influence the expected behavior (e.g., panic_on_warn)
and to eventually keep the machine alive to extract some debug info.

Ingo notes that not all WARN_ON_ONCE cases need recovery. If we don't ever
expect this code to trigger in any case, recovery code is not really
helpful.

    I'd prefer to keep all these warnings 'simple' - i.e. no attempted
    recovery & control flow, unless we ever expect these to trigger.
    [5]

There have been different rules floating around that were never properly
documented. Let's try to clarify.

[1] https://lkml.kernel.org/r/CAHk-=wiEAH+ojSpAgx_Ep=NKPWHU8AdO3V56BXcCsU97oYJ1EA@mail.gmail.com
[2] https://lore.kernel.org/r/CAHk-=wg40EAZofO16Eviaj7mfqDhZ2gVEbvfsMf6gYzspRjYvw@mail.gmail.com
[3] https://lkml.kernel.org/r/CAHk-=wit-DmhMfQErY29JSPjFgebx_Ld+pnerc4J2Ag990WwAA@mail.gmail.com
[4] https://lore.kernel.org/r/CAHk-=wgF7K2gSSpy=m_=K3Nov4zaceUX9puQf1TjkTJLA2XC_g@mail.gmail.com
[5] https://lore.kernel.org/r/YwIW+mVeZoTOxn%2F4@gmail.com

Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20220923113426.52871-2-david@redhat.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-09-29 13:20:53 -06:00
Yang Yingliang
657ed9c9bc Documentation: devres: add missing IO helper
Add missing devm_request_free_mem_region() to devres.rst.
It's introduced by commit 0092908d16 ("mm: factor out a
devm_request_free_mem_region helper").

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220927080215.1359979-1-yangyingliang@huawei.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-09-29 13:18:28 -06:00
Yang Yingliang
06699e6915 Documentation: devres: update IRQ helper
devm_irq_sim_init() has been changed to devm_irq_domain_create_sim()
in commit 337cbeb2c1 ("genirq/irq_sim: Simplify the API").

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220927083819.12484-1-yangyingliang@huawei.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-09-29 13:18:05 -06:00
Vernon Yang
9a7d7a80e1 Documentation/mm: modify page_referenced to folio_referenced
Since commit b3ac04132c ("mm/rmap: Turn page_referenced() into
folio_referenced()") the page_referenced function name was modified,
so fix it up to use the correct one.

Signed-off-by: Vernon Yang <vernon2gm@gmail.com>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Link: https://lore.kernel.org/r/20220926152032.74621-1-vernon2gm@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-09-29 13:16:08 -06:00
Kristen Carlson Accardi
26e5444809 Documentation/CoC: Reflect current CoC interpretation and practices
The Code of Conduct interpretation does not reflect the current
practices of the CoC committee or the TAB. Update the documentation
to remove references to initial committees and boot strap periods
since it is past that time, and note that the this document
does serve as the documentation for the CoC committee processes.

Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220926211149.2278214-1-kristen@linux.intel.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-09-29 13:15:14 -06:00
Akira Yokosawa
679b4bc25f docs/doc-guide: Add documentation on SPHINX_IMGMATH
Now that building html docs with math expressions does not need texlive
packages, remove the note on the requirement in the "Sphinx Install"
section.

Instead, add sections of "Math Expressions in HTML" and "Choice of Math
Renderer".
Describe the effect of setting SPHINX_IMGMATH in the latter section.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/a67e3279-6bc7-ee2c-2b49-9275252460b0@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-09-29 13:13:45 -06:00
Thorsten Leemhuis
2f993509a9 docs: process/5.Posting.rst: clarify use of Reported-by: tag
Bring the description on when to use the Reported-by: tag found in
Documentation/process/5.Posting.rst more in line with the description in
Documentation/process/submitting-patches.rst: before this change the two
were contradicting each other, as the latter is way more permissive and
only states '[...] if the bug was reported in private, then ask for
permission first before using the Reported-by tag.'

Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info>
Link: https://lore.kernel.org/r/2fc7162dfb76e04da5ea903c9c170d913e735dad.1664372256.git.linux@leemhuis.info
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-09-29 13:11:07 -06:00
Tiezhu Yang
e94102e506 docs, kprobes: Fix the wrong location of Kprobes
After commit 22471e1313 ("kconfig: use a menu in arch/Kconfig to reduce
clutter"), the location of Kprobes is under "General architecture-dependent
options" rather than "General setup".

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Fixes: 22471e1313 ("kconfig: use a menu in arch/Kconfig to reduce clutter")
Link: https://lore.kernel.org/r/1663322106-12178-1-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-09-29 13:07:52 -06:00
Sonny Jiang
541540b904 drm/amdgpu: Enable sram on vcn_4_0_2
Enable sram on vcn_4_0_2

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-09-29 15:05:11 -04:00
Sonny Jiang
a3aded135e drm/amdgpu: Enable VCN DPG for GC11_0_1
Enable VCN DPG on GC11_0_1

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-09-29 15:05:01 -04:00
Arnaldo Carvalho de Melo
8e8bf60a67 perf build: Fixup disabling of -Wdeprecated-declarations for the python scripting engine
A brown paper bag where -Wno-error=deprecated-declarations was added
from compiler output when the right thing is to add
-Wno-deprecated-declarations, fix it.

Fixes: 4ee3c4da8b ("perf scripting python: Do not build fail on deprecation warnings")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-09-29 16:03:35 -03:00