1
0
Fork 0
Commit Graph

983428 Commits (757fed1d0898b893d7daa84183947c70f27632f3)

Author SHA1 Message Date
Dave Airlie f722f5bea1 Short summary of fixes pull (less than what git shortlog provides):
* drm/atomic: Release state on error
  * drm/syncobj: Fix use-after-free
  * drm/ttm: Don't use GFP_TRANSHUGE_LIGTH
  * drm/vc4: Unify driver naming for PCM
  * drm/vram-helper: Fix memory leak in vmap
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmAIHQwACgkQaA3BHVML
 eiO8fgf/UPOq1nZXv6WtmNXhQbXS8dcOchzIytliNvVQn0VZ7fB4FZ+w+s3Yu/Vs
 HchWP4jhqlAhK+9NzYLTJ25EigcsJ8IDlpgPo1HenmnMxMl6fN3xP0hwwFA+Usv3
 3yYboXpBEvUTesL6AEiAw+7L/FKnTSMhqwynRNMKjDmLbn40VQM7RxWMIbUKY9cu
 dzzYI6fOcmjWryd/rJQ1cA4k+JOPIC9rbvcY0OzaZOFCUOEeK6icvbG/ARk4BXvQ
 mh7ykD8u126c0ATvAPuwSzy9eSuetQ3HwKDGWS7mIlZa2CdhkSeOypa9spozuDxa
 Nd8dZWG6CcCBQ/Vwb8Ey7fM4JZ9Pig==
 =gLTY
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2021-01-20' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

Short summary of fixes pull (less than what git shortlog provides):

 * drm/atomic: Release state on error
 * drm/syncobj: Fix use-after-free
 * drm/ttm: Don't use GFP_TRANSHUGE_LIGTH
 * drm/vc4: Unify driver naming for PCM
 * drm/vram-helper: Fix memory leak in vmap

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

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/YAgdYGNoH7pC29rz@linux-uq9g
2021-01-22 09:19:52 +10:00
Gayatri Kammela 6e1239c139 x86/cpu: Add another Alder Lake CPU to the Intel family
Add Alder Lake mobile CPU model number to Intel family.

Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210121215004.11618-1-tony.luck@intel.com
2021-01-21 23:01:51 +01:00
Josh Poimboeuf 1d489151e9 objtool: Don't fail on missing symbol table
Thanks to a recent binutils change which doesn't generate unused
symbols, it's now possible for thunk_64.o be completely empty without
CONFIG_PREEMPTION: no text, no data, no symbols.

We could edit the Makefile to only build that file when
CONFIG_PREEMPTION is enabled, but that will likely create confusion
if/when the thunks end up getting used by some other code again.

Just ignore it and move on.

Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1254
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
2021-01-21 15:49:58 -06:00
Josh Poimboeuf 655cf86548 objtool: Don't fail the kernel build on fatal errors
This is basically a revert of commit 644592d328 ("objtool: Fail the
kernel build on fatal errors").

That change turned out to be more trouble than it's worth.  Failing the
build is an extreme measure which sometimes gets too much attention and
blocks CI build testing.

These fatal-type warnings aren't yet as rare as we'd hope, due to the
ever-increasing matrix of supported toolchains/plugins and their
fast-changing nature as of late.

Also, there are more people (and bots) looking for objtool warnings than
ever before, so even non-fatal warnings aren't likely to be ignored for
long.

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
2021-01-21 15:49:39 -06:00
Jin Yao 8adc0a06d6 perf script: Fix overrun issue for dynamically-allocated PMU type number
When unpacking the event which is from dynamic PMU, the array
output[OUTPUT_TYPE_MAX] may be overrun. For example, type number of SKL
uncore_imc is 10, but OUTPUT_TYPE_MAX is 7 now (OUTPUT_TYPE_MAX =
PERF_TYPE_MAX + 1).

/* In builtin-script.c */

process_event()
{
        unsigned int type = output_type(attr->type);

        if (output[type].fields == 0)
                return;
}

output[10] is overrun.

Create a type OUTPUT_TYPE_OTHER for dynamic PMU events, then
output_type(attr->type) will return OUTPUT_TYPE_OTHER here.

Note that if PERF_TYPE_MAX ever changed, then there would be a conflict
between old perf.data files that had a dynamicaliy allocated PMU number
that would then be the same as a fixed PERF_TYPE.

Example:

  # perf record --switch-events -C 0 -e "{cpu-clock,uncore_imc/data_reads/,uncore_imc/data_writes/}:SD" -a -- sleep 1
  # perf script

  Before:
         swapper     0 [000] 1479253.987551:     277766               cpu-clock:  ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms])
         swapper     0 [000] 1479253.987797:     246709               cpu-clock:  ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms])
         swapper     0 [000] 1479253.988127:     329883               cpu-clock:  ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms])
         swapper     0 [000] 1479253.988273:     146393               cpu-clock:  ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms])
         swapper     0 [000] 1479253.988523:     249977               cpu-clock:  ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms])
         swapper     0 [000] 1479253.988877:     354090               cpu-clock:  ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms])
         swapper     0 [000] 1479253.989023:     145940               cpu-clock:  ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms])
         swapper     0 [000] 1479253.989383:     359856               cpu-clock:  ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms])
         swapper     0 [000] 1479253.989523:     140082               cpu-clock:  ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms])

  After:
         swapper     0 [000] 1397040.402011:     272384               cpu-clock:  ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms])
         swapper     0 [000] 1397040.402011:       5396  uncore_imc/data_reads/:
         swapper     0 [000] 1397040.402011:        967 uncore_imc/data_writes/:
         swapper     0 [000] 1397040.402259:     249153               cpu-clock:  ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms])
         swapper     0 [000] 1397040.402259:       7231  uncore_imc/data_reads/:
         swapper     0 [000] 1397040.402259:       1297 uncore_imc/data_writes/:
         swapper     0 [000] 1397040.402508:     249108               cpu-clock:  ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms])
         swapper     0 [000] 1397040.402508:       5333  uncore_imc/data_reads/:
         swapper     0 [000] 1397040.402508:       1008 uncore_imc/data_writes/:

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Link: https://lore.kernel.org/r/20201209005828.21302-1-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-01-21 17:25:33 -03:00
John Garry 3d6e79ee9e perf metricgroup: Fix system PMU metrics
Joakim reports that getting "perf stat" for multiple system PMU metrics
segfaults:

  $ perf stat -a -I 1000 -M imx8mm_ddr_write.all,imx8mm_ddr_write.all
  Segmentation fault
  $

While the same works without issue for a single metric.

The logic in metricgroup__add_metric_sys_event_iter() is broken, in that
add_metric() @m argument should be NULL for each new metric. Fix by not
passing a holder for that, and rather make local in
metricgroup__add_metric_sys_event_iter().

Fixes: be335ec28e ("perf metricgroup: Support adding metrics for system PMUs")
Reported-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linuxarm@openeuler.org
Link: https://lore.kernel.org/r/1611050655-44020-1-git-send-email-john.garry@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-01-21 17:25:33 -03:00
John Garry 9c880c24cb perf metricgroup: Fix for metrics containing duration_time
Metrics containing duration_time cause a segfault:

  $ perf stat -v -M L1D_Cache_Fill_BW sleep 1
  Using CPUID GenuineIntel-6-3D-4
  metric expr 64 * l1d.replacement / 1000000000 / duration_time for L1D_Cache_Fill_BW
  found event duration_time
  found event l1d.replacement
  adding {l1d.replacement}:W,duration_time
  l1d.replacement -> cpu/umask=0x1,(null)=0x1e8483,event=0x51/
  Segmentation fault
  $

In commit c2337d6719 ("perf metricgroup: Fix metrics using aliases
covering multiple PMUs"), the logic in find_evsel_group() when iter'ing
events was changed to not only select events in same group, but also for
aliased PMUs.

Checking whether events were for aliased PMUs was done by comparing the
event PMU name. This was not safe for duration_time event, which has no
associated PMU (and no PMU name), so fix by checking if the event PMU name
is set also.

Committer testing:

Reproduced the bug, then, on a:

  $ grep -m1 ^'model name' /proc/cpuinfo
  model name	: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  $

We now get:

  $ perf stat -M L1D_Cache_Fill_BW sleep 1

   Performance counter stats for 'sleep 1':

               4,141      l1d.replacement:u
       1,001,285,107 ns   duration_time:u

         1.001285107 seconds time elapsed

         0.000000000 seconds user
         0.001119000 seconds sys

  $

Detais from -v:

  Using CPUID GenuineIntel-6-8E-A
  metric expr 64 * l1d.replacement / 1000000000 / duration_time for L1D_Cache_Fill_BW
  found event duration_time
  found event l1d.replacement
  adding {l1d.replacement}:W,duration_time
  l1d.replacement -> cpu/(null)=0x1e8483,umask=0x1,event=0x51/
  Control descriptor is not initialized
  Warning:
  kernel.perf_event_paranoid=2, trying to fall back to excluding kernel and hypervisor  samples
  Warning:
  kernel.perf_event_paranoid=2, trying to fall back to excluding kernel and hypervisor  samples
  l1d.replacement:u: 4592 612201 612201
  duration_time:u: 1001478621 1001478621 1001478621

Fixes: c2337d6719 ("perf metricgroup: Fix metrics using aliases covering multiple PMUs")
Reported-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Ian Rogers <irogers@google.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linuxarm@openeuler.org
Link: https://lore.kernel.org/r/1611159518-226883-1-git-send-email-john.garry@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-01-21 17:25:33 -03:00
Adrian Hunter fc705fecf3 perf evlist: Fix id index for heterogeneous systems
perf_evlist__set_sid_idx() updates perf_sample_id with the evlist map
index, CPU number and TID. It is passed indexes to the evsel's cpu and
thread maps, but references the evlist's maps instead. That results in
using incorrect CPU numbers on heterogeneous systems. Fix it by using
evsel maps.

The id index (PERF_RECORD_ID_INDEX) is used by AUX area tracing when in
sampling mode. Having an incorrect CPU number causes the trace data to
be attributed to the wrong CPU, and can result in decoder errors because
the trace data is then associated with the wrong process.

Committer notes:

Keep the class prefix convention in the function name, switching from
perf_evlist__set_sid_idx() to perf_evsel__set_sid_idx().

Fixes: 3c659eedad ("perf tools: Add id index")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20210121125446.11287-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-01-21 17:25:33 -03:00
Hannes Reinecke 809b1e4945 dm: avoid filesystem lookup in dm_get_dev_t()
This reverts commit
644bda6f34 ("dm table: fall back to getting device using name_to_dev_t()")

dm_get_dev_t() is just used to convert an arbitrary 'path' string
into a dev_t. It doesn't presume that the device is present; that
check will be done later, as the only caller is dm_get_device(),
which does a dm_get_table_device() later on, which will properly
open the device.

So if the path string already _is_ in major:minor representation
we can convert it directly, avoiding a recursion into the filesystem
to lookup the block device.

This avoids a hang in multipath_message() when the filesystem is
inaccessible.

Fixes: 644bda6f34 ("dm table: fall back to getting device using name_to_dev_t()")
Cc: stable@vger.kernel.org
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2021-01-21 15:06:45 -05:00
Ignat Korchagin 004b8ae9e2 dm crypt: fix copy and paste bug in crypt_alloc_req_aead
In commit d68b29584c ("dm crypt: use GFP_ATOMIC when allocating
crypto requests from softirq") code was incorrectly copy and pasted
from crypt_alloc_req_skcipher()'s crypto request allocation code to
crypt_alloc_req_aead(). It is OK from runtime perspective as both
simple encryption request pointer and AEAD request pointer are part of
a union, but may confuse code reviewers.

Fixes: d68b29584c ("dm crypt: use GFP_ATOMIC when allocating crypto requests from softirq")
Cc: stable@vger.kernel.org # v5.9+
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2021-01-21 15:06:44 -05:00
Mikulas Patocka 5c02406428 dm integrity: conditionally disable "recalculate" feature
Otherwise a malicious user could (ab)use the "recalculate" feature
that makes dm-integrity calculate the checksums in the background
while the device is already usable. When the system restarts before all
checksums have been calculated, the calculation continues where it was
interrupted even if the recalculate feature is not requested the next
time the dm device is set up.

Disable recalculating if we use internal_hash or journal_hash with a
key (e.g. HMAC) and we don't have the "legacy_recalculate" flag.

This may break activation of a volume, created by an older kernel,
that is not yet fully recalculated -- if this happens, the user should
add the "legacy_recalculate" flag to constructor parameters.

Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Daniel Glockner <dg@emlix.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2021-01-21 15:05:21 -05:00
Linus Torvalds 9f29bd8b2e \n
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEq1nRK9aeMoq1VSgcnJ2qBz9kQNkFAmAJfUoACgkQnJ2qBz9k
 QNnH+Qf/Q/e0zGxGW7Snj6Kz4VL9yHwfvQUdZPFashv+Uff1jnPkXQbnJia2mUNE
 6g4XsMTuXTF13TvNmf93MBHAmlJSicUfRNqyDx9HP0VrNy2NarIwDcN4yAoOs2cZ
 jwzwOVDJmDf/EALVv+6JUySRq/v5f4EEihtYjVEXxVNh7rZiLOBYnY5wPLvicU3h
 ButzuOnH0F4aqBKuZsanJYDIswmJ05awxy4wu4SWoyghc+KUc61pXeND1KHa4LoR
 1A4NL7OcjZkpHvaWCw8FKgEQnyTyvbi78aSSrOLcZhdT6l5jQt8xaRwz66zk9Yw2
 mxQe9YefTcvlmm8iNn3B7QxMmJmZ7g==
 =agn9
 -----END PGP SIGNATURE-----

Merge tag 'fs_for_v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs

Pull fs and udf fixes from Jan Kara:
 "A lazytime handling fix from Eric Biggers and a fix of UDF session
  handling for large devices"

* tag 'fs_for_v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  udf: fix the problem that the disc content is not displayed
  fs: fix lazytime expiration handling in __writeback_single_inode()
2021-01-21 11:45:40 -08:00
Mikulas Patocka 2d06dfecb1 dm integrity: fix a crash if "recalculate" used without "internal_hash"
Recalculate can only be specified with internal_hash.

Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2021-01-21 14:41:43 -05:00
Greg Kroah-Hartman b11f623cc8 This tag contains the following bug fixes for 5.11-rc5/6:
- Clear the fence field in the PCI counters packet before sending
   the packet to the F/W. Not clearing it might cause the driver
   and F/W to get out-of-sync
 
 - Fix backward compatibility in the uapi of IDLE check that is
   part of the INFO IOCTL.
 
 - Tell the F/W to not access the Host (device outbound) while
   the driver removes the device. If that happens, the server
   might crash.
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEE7TEboABC71LctBLFZR1NuKta54AFAmAJ06ETHG9nYWJiYXlA
 a2VybmVsLm9yZwAKCRBlHU24q1rngJZSB/9zAWGpMoQd1RzglMDfuLqnrGWtFHq5
 CmqJXPmDUXf059f7Rj0Mw/Ce6jnzreBgRzL4GJ31gVPGD5Bi2IvAv7uO3qJtOwkq
 ceeLqvS5T30FhGUqTId5JW9eGjj5MfkXALNWunl+AzeJfahCFygltrA4FtTf7i/X
 YzV9kwT01njb5/NAi5IEcs8T13+n913WIyLmzt7G90brOonP2m1lETNBShx7M0dL
 8hlCs2ULPD3x4ErAmLbyZInD4kJjuU65KgZhUzxVYzg73q+vUl/5dN9GoJy4SAhb
 shIhdkRcu201MjNexiogMmwez9+8M6lcPinpfMrvfH+YGW4QZHrTR6WQ
 =HJ7o
 -----END PGP SIGNATURE-----

Merge tag 'misc-habanalabs-fixes-2021-01-21' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-linus

Oded writes:

This tag contains the following bug fixes for 5.11-rc5/6:

- Clear the fence field in the PCI counters packet before sending
  the packet to the F/W. Not clearing it might cause the driver
  and F/W to get out-of-sync

- Fix backward compatibility in the uapi of IDLE check that is
  part of the INFO IOCTL.

- Tell the F/W to not access the Host (device outbound) while
  the driver removes the device. If that happens, the server
  might crash.

* tag 'misc-habanalabs-fixes-2021-01-21' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux:
  habanalabs: disable FW events on device removal
  habanalabs: fix backward compatibility of idle check
  habanalabs: zero pci counters packet before submit to FW
2021-01-21 20:38:51 +01:00
Linus Torvalds 2561bbbe2e Printk fixes for 5.11-rc5
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEESH4wyp42V4tXvYsjUqAMR0iAlPIFAmAJmRwACgkQUqAMR0iA
 lPLxAxAAgBEj8XqRiQh51mDyGCFkHR0NJ2WqSRa50HHhw/mCipwl40jwTsOol2xs
 REodcmswBBvZVApqtWlN+U24j3VaU0gyjpt9ndfkkG9c5PeKlpryGnlABd4Zw3SP
 m8NHkO2rQtdAgVm6AaNd17mYXtZV9a820SNhiDrqxylNDHR1DJW31MoQTpyY4SqE
 zcFyOFabA/zAc869IEnbpiZ8AO6n1lQCJa0C+D+mI70jgy7YEmD0eGkxRTpjoMDS
 ms/iTjelxfWHsuNzQ+85q/931hdz53/Ri3a+HHjDVZSL/e/yxRyr9sOM0XLPVQDy
 2xoHbqTZo4YCYaWSj0ePuW9Sl2yzxuuDtovNEUyssjP+22YV9en9qiHgViZqW9HN
 saruWYZytnpGp4YMFChgen4rxd7jbdxZZzaYOJdJWy2aRn3MfDXrg7aO97MhU4HS
 TeHGee430VYrUc28Nzhnd+wGyAtPDVlGSnZdT+AIo+Uv4a4iK8ULv/58mTM2DvrJ
 Nzln/pwSBf7ddarO8pvdAggmsBAxyBEQ8NUPbeSwiZ2BEIRnO+hT7mDLZ/6TNY83
 jeBDZP7hxo5MfDMhUPkoTdxlZxETnHFrihopChcHjtw+Gz1mb27n1iFactWaLirg
 J+E+/dKbdmxtcKyT3NoqGvcEj08pk/ImtuCPK11b23CzUFTkLrk=
 =l1hI
 -----END PGP SIGNATURE-----

Merge tag 'printk-for-5.11-printk-rework-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux

Pull printk fixes from Petr Mladek:

 - Fix line counting and buffer size calculation. Both regressions
   caused that a reader buffer might not get filled as much as possible.

 - Restore non-documented behavior of printk() reader API and make it
   official.

   It did not fill the last byte of the provided buffer before 5.10. Two
   architectures, powerpc and um, used it to add the trailing '\0'.
   There might theoretically be more callers depending on this behavior
   in userspace.

* tag 'printk-for-5.11-printk-rework-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux:
  printk: fix buffer overflow potential for print_text()
  printk: fix kmsg_dump_get_buffer length calulations
  printk: ringbuffer: fix line counting
2021-01-21 11:37:22 -08:00
Linus Torvalds 6a52f4cf86 ACPI fix for 5.11-rc5
Modify a helper function in the ACPI core to match the behavior
 expected by its users so as to prevent NULL pointer dereferences
 and occasional memory corruption from occurring (Hans de Goede).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmAJyzESHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxMqUP/16WwsmD/09ArqK15naoRJT89KGXyK9L
 RmF9OSXKzgRi8AY3BMZP4yPpMECZtyoCYzY8A82n1ypi67AKB8sRq1+EvVRdGla/
 ioHqIB1kWEAmkX0kBuYYMN2GT0RQFN43Xdpx7u4j9AHwzdTG+/4WGCy/WeQpgF3D
 DAyNtI0aJXvJ7wUH+n/976w6E3hxaW5zHiq+4Q3smIx6uPj3wsjlchvIRs5RmfnA
 pzq9U9wZjFBq9ov8hYDP5ObzHTR3XS4vY1aQOpfoK1k9sKtIlgI0q49AdibPfQP5
 PPf8idLftqJFrGyijFmAyCb0vwaS9jJvcTR/hX7DQqAQHPRGAxltzaazW8XtXAlj
 NLykdaaxYc1n3+Zy49TW0i8Gg01JN3Z3ja5laxfbL2wXsCdFIP4BG49ry63cE+x2
 8ubyyMo8+yNzH3sc4OgjID0PVs8C2tP6oHNQo7e3N3svaIh0xnfj/3hBH8Bw0MSK
 4s34IYXPNqmXgMGyssXOMDpxUeVhuRxSQXwCUxb6hHfJf8fikQZ90Xmh92tMH8Yn
 Xd6AVQag6PiRhO79wE6KimI6W1j/fRq6APFG0umF0qzH2vfLLYkc10psZemYDXkU
 Qu7ZAV2HtmpJWfiKI+AdJPimX01uZ1/tyaR5ywImZI/uFfPXEoJ5bx7sxHo36wXl
 dtdc/cmygyRl
 =E7AD
 -----END PGP SIGNATURE-----

Merge tag 'acpi-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "Modify a helper function in the ACPI core to match the behavior
  expected by its users so as to prevent NULL pointer dereferences and
  occasional memory corruption from occurring (Hans de Goede)"

* tag 'acpi-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: scan: Make acpi_bus_get_device() clear return pointer on error
2021-01-21 11:28:30 -08:00
Linus Torvalds 120fbdb84f sound fixes for 5.11-rc5
Here is a collection of sound fixes targeted for 5.11-rc5.  Most
 notably, USB-audio still got a few intensive changes for covering the
 regressions while the rest are all small fixes.
 
 - A trivial fix for sequencer OSS emulation error path
 - HD-audio runtime PM regression fix, a few quirks and new IDs
 - USB-audio regression fixes for Pioneer device, Logitech webcams, etc
 - ASoC SOF Intel coverage
 - MAINTAINERS file update
 - A fix in the jack handling in ASoC HDMI codec
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmAJj6sOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE9uSg//cMS9BjlRT63nK6GIpBMY76FHkJT9Layj7AFD
 DLElEnUslberM+4/UiFtLM3bSaIuOH+BUgTcBgs4tADA/kGHsz/+/idx7aZSMYcP
 Qh1SbRetNVCcOwT5+tzYJYjMYG2f4RRRUKJ1YTns5w/0p8NCfUSTxGpZbm38rILN
 8FuOjRkcR3awCbEYI9q4VbRAbeF7b0WU1JVF1d/eXFdiYWkiZvCZoH9Tl8wgptvF
 1ijVemE6mvGh3xpTwxfU1IDfxd9B6vDumIrKvjUJ8L3tuz1sMvaC05nOz1UuFbus
 uE4B53Jy8/DbzqDbiUmrOVh80qRpp9JMOWgEnYi9ro7QoQHgvVEksuWDmQxhtNhk
 ogyYMdKhB2zDcZBVHgdK8gWk/gpaH3QeUQwVaFYPEnQJLn/4NxATVr8S+X99Dtix
 AhKpThRdGwcmnkKPFzvxm63pnl3uqLeB73hCJMC7fB7FAskFr4Bwi8MVJ0ZE95jD
 /A/oxvKBClt5goi+1EzNXFD371i1u3B/FWcVESVdgt1CZyXR/wSi/zaGgzuk5i/H
 9WtEPlqyHNfjsiUbwMnF1nrkZxIimFWrNNpO5cwm8MzDgBQMy/AniOisZBg4AkSD
 XN0VGQ4ZxtfxBhNJtXJRSYI/JM7cTJ1/J/yDN3toVgCtXxKlxyLe3EcJNFUxpixT
 j/n+dz4=
 =r+rh
 -----END PGP SIGNATURE-----

Merge tag 'sound-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here is a collection of sound fixes targeted for 5.11-rc5. Most
  notably, USB-audio still got a few intensive changes for covering the
  regressions while the rest are all small fixes.

   - A trivial fix for sequencer OSS emulation error path

   - HD-audio runtime PM regression fix, a few quirks and new IDs

   - USB-audio regression fixes for Pioneer device, Logitech webcams,
     etc

   - ASoC SOF Intel coverage

   - MAINTAINERS file update

   - A fix in the jack handling in ASoC HDMI codec"

* tag 'sound-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: usb-audio: Fix hw constraints dependencies
  ALSA: hda: Balance runtime/system PM if direct-complete is disabled
  ALSA: usb-audio: Avoid implicit feedback on Pioneer devices
  ALSA: usb-audio: Set sample rate for all sharing EPs on UAC1
  ALSA: usb-audio: Fix UAC1 rate setup for secondary endpoints
  MAINTAINERS: update qcom ASoC drivers list
  MAINTAINERS: update maintainers of qcom audio
  ALSA: hda: Add Cometlake-R PCI ID
  ALSA: seq: oss: Fix missing error check in snd_seq_oss_synth_make_info()
  ALSA: hda/via: Add minimum mute flag
  ALSA: hda/realtek - Limit int mic boost on Acer Aspire E5-575T
  ALSA: usb-audio: Always apply the hw constraints for implicit fb sync
  ASoC: SOF: Intel: fix page fault at probe if i915 init fails
  ALSA: hda: Add AlderLake-P PCI ID and HDMI codec vid
  ASoC: SOF: Intel: hda: Avoid checking jack on system suspend
  ASoC: SOF: Intel: hda: Modify existing helper to disable WAKEEN
  ASoC: SOF: Intel: hda: Resume codec to do jack detection
  MAINTAINERS: update references to stm32 audio bindings
  ASoC: hdmi-codec: Fix return value in hdmi_codec_set_jack()
2021-01-21 11:25:35 -08:00
Linus Torvalds d7631e4378 gpio fixes for v5.11-rc5
- rework the character device code to avoid a frame size warning
 - fix printk format issues in gpio-tools
 - warn on redefinition of the to_irq callback in core gpiolib code
 - fix PWM period calculation in gpio-mvebu
 - make gpio-sifive Kconfig entry consistent with other drivers
 - fix a build issue in gpio-tegra
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmAJSRUACgkQEacuoBRx
 13INyQ/8CXh1/nBTx8LkLPNXkmv/RTA0AKjEBuhY/VVYHwhhZ17rTisc3+2LfQ4N
 dbS1taI5J1GVqk8yrKrcjESZxAuduwokhR5ciRZbHDFMEii6hhH7RuN7Evxd9DCr
 1kMhv0X/dRG/C6xAawP6nS8wpf/tOzv71wBpp7MT//ZzZGWx49jMtyEkqijjqH8n
 lQnoZdBw7vMVvxhXa6WXc3i9N8hAOS3YAFAs9NtDvabGpvIaCSgU43e4we6pYHND
 0OHD2+V3FYpRYsenoOmOoRLZheMQ/Z0DjWKkvBQburl1n6ZLaCtdjAi1MoG5FhbN
 49VJhyPTOlw1xsmTm/2Fg4WzktDi95gsQzef25bhhTBVoETOen6gBxK2RsdUmpzm
 zQX1wUrINGfzcfQhStIvjyznHZRabGuxDlFN9UH3mGnDVzWepuqCvY9s2/zmU4eU
 OtCTWsM9TTmlRiU/bIqC5/aSJyZJ/d1stiacRCsfPJ4Gmb4zsm9y/cILMporiRPJ
 JEd4T0jUSo94QLcrSSse15TBVVOA9TydFrDgVE3HBAZbqf+eaRG/fYKRABs6cX+H
 VNhIRi1mjj2rr1UwmCYcEtuT3ODthXS7lTAGmLt7hAzSHCxMsO+pSQ2BPdGanb9O
 GKWs/owyZm1be4e3yVdQfrQ4/+LimqpyN8uDSU4RbfuNrHiSLxw=
 =1H0g
 -----END PGP SIGNATURE-----

Merge tag 'gpio-fixes-for-v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - rework the character device code to avoid a frame size warning

 - fix printk format issues in gpio-tools

 - warn on redefinition of the to_irq callback in core gpiolib code

 - fix PWM period calculation in gpio-mvebu

 - make gpio-sifive Kconfig entry consistent with other drivers

 - fix a build issue in gpio-tegra

* tag 'gpio-fixes-for-v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: tegra: Add missing dependencies
  gpio: sifive: select IRQ_DOMAIN_HIERARCHY rather than depend on it
  gpio: mvebu: fix pwm .get_state period calculation
  gpiolib: add a warning on gpiochip->to_irq defined
  tools: gpio: fix %llu warning in gpio-watch.c
  tools: gpio: fix %llu warning in gpio-event-mon.c
  gpiolib: cdev: fix frame size warning in gpio_ioctl()
2021-01-21 11:19:59 -08:00
Linus Torvalds 63858ac326 Pin control fixes for the v5.11 kernel.
These are all driver fixes, the Qualcomm stuff is the most
 widely used and important:
 
 - The main matter is a complicated fixup for the Qualcomm
   deep sleep states. This manifests in how interrupts get
   handled or in some cases not handled in cooperation with
   the PDC (Power Domain Controller). It's one of these really
   hardcore bug fixes that signifies high maturity of the
   platform.
 
 - Fix a register layout problem in the JZ4760 driver.
 
 - Fix a register offset in the Aspeed G6 driver.
 
 - Fix a compiler warning in the Nomadik driver.
 
 - Fix a fallback code path in the mediatek driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAmAJQAAACgkQQRCzN7AZ
 XXMXNQ/9GSYkl2Q3gRS/XYFRXzIu8PEiwkirzU/zs7k18M5Y7H5EDmDQRMvZWV5F
 fdZBz9YuUysDfJYHWisgQd/tZWrtDEiK5WSgk6lKQh5easfOr3fA4Fy12ccoBZFx
 n1G6Azda+OrpJxAMc2QOyeBLk3VPs2zOQ6osI8UnrPinP8xyXLFqk5e69JicBH4v
 hmC0215VFKuSkLa2aCYjjBheESbUia4Gsasvaqbz6Ffzr/ixbCS2CvYJpB9aES9y
 lrcUFsRofO2xEYxjVoVmmWtdzvyRGsMOySpx2/ip6zgwSMraGo57ecD8MdKu/TpZ
 DS6dN7xKIW5Oj2Rb5Xy1ME7OoOsYQWlRw8SgrzzTt1nE/1UtL/1CEaWFYhYM5RN7
 MGznLOxo0PJKF+vr5uddA22IxQMidkCuo59mS63gDjVImX51S5zCVM6dzSqeOhoP
 0V0S8VQ833ddr4/v3FWTVxGAgbEbfkt5xJDfHu1y5CeUUzBrEr3hrWpNDrTANJG9
 Ea7BCVEFYbut8TCjT1YQv35RbqJhHD79AmCLDJU4r/M5WedUKRxwDjY9YPlIU8e9
 gRONTXuqZf2pXRnZ/pWAcpAiyg1GmTIhNa2mMtyTMh2yOOApiPDZNtqOcpAm9Zoz
 E05qv/1WYWfp10qmWRSuz68a71dALprUjqTTpGbP5qXlFdxP0O0=
 =sEqd
 -----END PGP SIGNATURE-----

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

Pull pin control fixes from Linus Walleij:
 "These are all driver fixes, the Qualcomm stuff is the most widely used
  and important:

   - The main matter is a complicated fixup for the Qualcomm deep sleep
     states.

     This manifests in how interrupts get handled or in some cases not
     handled in cooperation with the PDC (Power Domain Controller). It's
     one of these really hardcore bug fixes that signifies high maturity
     of the platform.

   - Fix a register layout problem in the JZ4760 driver

   - Fix a register offset in the Aspeed G6 driver

   - Fix a compiler warning in the Nomadik driver

   - Fix a fallback code path in the mediatek driver"

* tag 'pinctrl-v5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: qcom: Don't clear pending interrupts when enabling
  pinctrl: qcom: Properly clear "intr_ack_high" interrupts when unmasking
  pinctrl: qcom: No need to read-modify-write the interrupt status
  pinctrl: qcom: Allow SoCs to specify a GPIO function that's not 0
  pinctrl: mediatek: Fix fallback call path
  pinctrl: nomadik: Remove unused variable in nmk_gpio_dbg_show_one
  pinctrl: aspeed: g6: Fix PWMG0 pinctrl setting
  pinctrl: ingenic: Rename registers from JZ4760_GPIO_* to JZ4770_GPIO_*
  pinctrl: ingenic: Fix JZ4760 support
2021-01-21 11:14:24 -08:00
Saravana Kannan e020ff611b driver core: Fix device link device name collision
The device link device's name was of the form:
<supplier-dev-name>--<consumer-dev-name>

This can cause name collision as reported here [1] as device names are
not globally unique. Since device names have to be unique within the
bus/class, add the bus/class name as a prefix to the device names used to
construct the device link device name.

So the devuce link device's name will be of the form:
<supplier-bus-name>:<supplier-dev-name>--<consumer-bus-name>:<consumer-dev-name>

[1] - https://lore.kernel.org/lkml/20201229033440.32142-1-michael@walle.cc/

Fixes: 287905e68d ("driver core: Expose device link details in sysfs")
Cc: stable@vger.kernel.org
Reported-by: Michael Walle <michael@walle.cc>
Tested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20210110175408.1465657-1-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-21 20:12:40 +01:00
Oded Gabbay 2dc4a6d791 habanalabs: disable FW events on device removal
When device is removed, we need to make sure the F/W won't send us
any more events because during the remove process we disable the
interrupts.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2021-01-21 20:30:22 +02:00
Oded Gabbay f8abaf379b habanalabs: fix backward compatibility of idle check
Need to take the lower 32 bits of the driver's 64-bit idle mask and put
it in the legacy 32-bit variable that the userspace reads to know the
idle mask.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2021-01-21 20:30:22 +02:00
Ofir Bitton 9354f1b421 habanalabs: zero pci counters packet before submit to FW
Driver does not zero some pci counters packets before sending
to FW. This causes an out of sync PI/CI between driver and FW.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2021-01-21 20:30:22 +02:00
Alexander Shishkin cb5c681ab9 intel_th: pci: Add Alder Lake-P support
This adds support for the Trace Hub in Alder Lake-P.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Link: https://lore.kernel.org/r/20210115195917.3184-3-alexander.shishkin@linux.intel.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-21 18:54:43 +01:00
Wang Hui 927633a6d2 stm class: Fix module init return on allocation failure
In stm_heartbeat_init(): return value gets reset after the first
iteration by stm_source_register_device(), so allocation failures
after that will, after a clean up, return success. Fix that.

Fixes: 1192918530 ("stm class: Add heartbeat stm source device")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hui <john.wanghui@huawei.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Link: https://lore.kernel.org/r/20210115195917.3184-2-alexander.shishkin@linux.intel.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-21 18:54:37 +01:00
Rafael J. Wysocki 3d1cf435e2 driver core: Extend device_is_dependent()
If the device passed as the target (second argument) to
device_is_dependent() is not completely registered (that is, it has
been initialized, but not added yet), but the parent pointer of it
is set, it may be missing from the list of the parent's children
and device_for_each_child() called by device_is_dependent() cannot
be relied on to catch that dependency.

For this reason, modify device_is_dependent() to check the ancestors
of the target device by following its parent pointer in addition to
the device_for_each_child() walk.

Fixes: 9ed9895370 ("driver core: Functional dependencies tracking support")
Reported-by: Stephan Gerhold <stephan@gerhold.net>
Tested-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Saravana Kannan <saravanak@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/17705994.d592GUb2YH@kreacher
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-21 18:46:34 +01:00
Christoph Hellwig f2d6c2708b kernfs: wire up ->splice_read and ->splice_write
Wire up the splice_read and splice_write methods to the default
helpers using ->read_iter and ->write_iter now that those are
implemented for kernfs.  This restores support to use splice and
sendfile on kernfs files.

Fixes: 36e2c7421f ("fs: don't allow splice read/write without explicit ops")
Reported-by: Siddharth Gupta <sidgup@codeaurora.org>
Tested-by: Siddharth Gupta <sidgup@codeaurora.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210120204631.274206-4-hch@lst.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-21 18:30:28 +01:00
Christoph Hellwig cc099e0b39 kernfs: implement ->write_iter
Switch kernfs to implement the write_iter method instead of plain old
write to prepare to supporting splice and sendfile again.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210120204631.274206-3-hch@lst.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-21 18:30:28 +01:00
Christoph Hellwig 4eaad21a6a kernfs: implement ->read_iter
Switch kernfs to implement the read_iter method instead of plain old
read to prepare to supporting splice and sendfile again.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210120204631.274206-2-hch@lst.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-21 18:30:28 +01:00
Ilya Dryomov 9d5ae6f3c5 libceph: fix "Boolean result is used in bitwise operation" warning
This line dates back to 2013, but cppcheck complained because commit
2f713615dd ("libceph: move msgr1 protocol implementation to its own
file") moved it.  Add parenthesis to silence the warning.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2021-01-21 16:49:59 +01:00
Aaron Liu 39263a2f88 drm/amdgpu: update mmhub mgcg&ls for mmhub_v2_3
Starting from vangogh, the ATCL2 and DAGB0 registers relative
to mgcg/ls has changed.

For MGCG:
Replace mmMM_ATC_L2_MISC_CG with mmMM_ATC_L2_CGTT_CLK_CTRL.

For MGLS:
Replace mmMM_ATC_L2_MISC_CG with mmMM_ATC_L2_CGTT_CLK_CTRL.
Add DAGB0_(WR/RD)_CGTT_CLK_CTRL registers.

Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-01-21 10:46:05 -05:00
Jinzhou Su 8f0d60fe8b drm/amdgpu: modify GCR_GENERAL_CNTL for Vangogh
GCR_GENERAL_CNTL is defined differently in gc_10_1_0_offset.h and
gc_10_3_0_offset.h. Update GCR_GENERAL_CNTL for Vangogh.

Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-01-21 10:46:05 -05:00
Prike Liang 51e87da7d4 drm/amdgpu/pm: no need GPU status set since mmnbif_gpu_BIF_DOORBELL_FENCE_CNTL added in FSDL
In the renoir there is no need GpuChangeState message set to exit gfxoff in the s0i3 resume since
mmnbif_gpu_BIF_DOORBELL_FENCE_CNTL has been added in the s0i3 FSDL.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2021-01-21 10:46:05 -05:00
Vladimir Stempen 4b08d8c783 drm/amd/display: Fixed corruptions on HPDRX link loss restore
[why]
Heavy corruption or blank screen reported on wake,
with 6k display connected and FEC enabled

[how]
When Disable/Enable stream for display pipes on HPDRX,
DC should take into account ODM split pipes.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Vladimir Stempen <vladimir.stempen@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Anson Jacob <anson.jacob@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-01-21 10:46:05 -05:00
Nicholas Kazlauskas c74f865f14 drm/amd/display: Use hardware sequencer functions for PG control
[Why & How]
These can differ per ASIC or not be present. Don't call the dcn20 ones
directly but rather the ones defined by the ASIC init table.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Eric Yang <eric.yang2@amd.com>
Acked-by: Anson Jacob <anson.jacob@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-01-21 10:46:05 -05:00
Bing Guo 4716a7c50c drm/amd/display: Change function decide_dp_link_settings to avoid infinite looping
Why:
Function decide_dp_link_settings() loops infinitely when required bandwidth
can't be supported.

How:
Check the required bandwidth against verified_link_cap before trying to
find a link setting for it.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Bing Guo <bing.guo@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Anson Jacob <anson.jacob@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-01-21 10:46:05 -05:00
Aric Cyr 8bc3d461d0 drm/amd/display: Allow PSTATE chnage when no displays are enabled
[Why]
When no displays are currently enabled, display driver should not
disallow PSTATE switching.

[How]
Allow PSTATE switching if either the active configuration supports it,
or there are no active displays.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Aric Cyr <aric.cyr@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Anson Jacob <anson.jacob@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-01-21 10:46:05 -05:00
Jake Wang bdfc6fd6c8 drm/amd/display: Update dram_clock_change_latency for DCN2.1
[WHY]
dram clock change latencies get updated using ddr4 latency table, but
that update does not happen before validation. This value
should not be the default and should be number received from
df for better mode support.
This may cause a PState hang on high refresh panels with short vblanks
such as on 1080p 360hz or 300hz panels.

[HOW]
Update latency from 23.84 to 11.72.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Jake Wang <haonan.wang2@amd.com>
Reviewed-by: Sung Lee <Sung.Lee@amd.com>
Acked-by: Anson Jacob <anson.jacob@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-01-21 10:46:05 -05:00
Huang Rui acc214bfaf drm/amdgpu: remove gpu info firmware of green sardine
The ip discovery is supported on green sardine, it doesn't need gpu info
firmware anymore.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Prike Liang <Prike.Liang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 5.10.x
2021-01-21 10:46:05 -05:00
Sung Lee 348fe1ca5c drm/amd/display: DCN2X Find Secondary Pipe properly in MPO + ODM Case
[WHY]
Previously as MPO + ODM Combine was not supported, finding secondary pipes
for each case was mutually exclusive. Now that both are supported at the same
time, both cases should be taken into account when finding a secondary pipe.

[HOW]
If a secondary pipe cannot be found based on previous bottom pipe,
search for a second pipe using next_odm_pipe instead.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Sung Lee <sung.lee@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Anson Jacob <anson.jacob@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 5.10.x
2021-01-21 10:45:58 -05:00
Petr Mladek 535b6a122c Merge branch 'printk-rework' into for-linus 2021-01-21 16:06:21 +01:00
Marc Zyngier 139bc8a614 KVM: Forbid the use of tagged userspace addresses for memslots
The use of a tagged address could be pretty confusing for the
whole memslot infrastructure as well as the MMU notifiers.

Forbid it altogether, as it never quite worked the first place.

Cc: stable@vger.kernel.org
Reported-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2021-01-21 14:17:36 +00:00
Pan Bian 9778448175 lightnvm: fix memory leak when submit fails
The allocated page is not released if error occurs in
nvm_submit_io_sync_raw(). __free_page() is moved ealier to avoid
possible memory leak issue.

Fixes: aff3fb18f9 ("lightnvm: move bad block and chunk state logic to core")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-01-21 05:45:51 -07:00
Jens Axboe 1df35bf0b4 nvme fixes for 5.11:
- fix a status code in nvmet (Chaitanya Kulkarni)
  - avoid double completions in nvme-rdma/nvme-tcp (Chao Leng)
  - fix the CMB support to cope with NVMe 1.4 controllers (Klaus Jensen)
  - fix PRINFO handling in the passthrough ioctl (Revanth Rajashekar)
  - fix a double DMA unmap in nvme-pci
 -----BEGIN PGP SIGNATURE-----
 
 iQI/BAABCgApFiEEgdbnc3r/njty3Iq9D55TZVIEUYMFAmAJOsYLHGhjaEBsc3Qu
 ZGUACgkQD55TZVIEUYNcFBAAg/opZV5vQ/yJA9ayW4BhRY2KhLpn+Z0ZXbeNux5P
 M+odGtz/I0DqwY4EGrjwLdWSu7ZnL5l1W+XL19KAHciETWJqYCZ2zmflzEW/1NQ/
 nPhxkpGe0eNz2G88k4xD9Yw+xi+3gF6mpcTUhePNiBm0cg/67yaw35PbjEfsK/9x
 vLW4WpPLeAvaJk8VdoNjpciTRV3VCxV1FTRS9G8F+LWrnywz0MnoWQNG2to6NdwA
 bVhZIlaRnP0yvDtnmiNzFPYaSWrd7/urX7scRaQ7niHY4gtycE6hXcAxKmr7wrv1
 IKguCvRHGy4buxmyBSNySxX4yIOz+4Sit0jNN7UiWI96ogefz8fWPrJJZn9ngxCd
 03bZWCo7VWGLZsDnHa3fwdJPygkk/jgFrqGZRxqXv9pHijGhLjzlN29Mq24nox0n
 rp/zJBFdEBwPWt/oo07RB+ennp7LZA6TxKYGYEgYDHGPhYRr+NC0mzKiGPYbLB2W
 8KLO194xKxk/8aZUBfHZFfMscO6f53I2AMZbyjAD63IJV7ujxVyprbYaADrD+Nno
 PyPldyNtczYM+3UmmLFhMSzxaUKSIWnf39dv5SQEmmqlo77RW6lmlwv7uPX1GWu9
 RbvcM7rUswqSRjItd3xD7ijOFFsZBOLFWAUB3i9/xOwGhQbEDT9eAHbVE5F8hJ0s
 w24=
 =7vCy
 -----END PGP SIGNATURE-----

Merge tag 'nvme-5.11-2020-01-21' of git://git.infradead.org/nvme into block-5.11

Pull NVMe fixes from Christoph:

"nvme fixes for 5.11:

 - fix a status code in nvmet (Chaitanya Kulkarni)
 - avoid double completions in nvme-rdma/nvme-tcp (Chao Leng)
 - fix the CMB support to cope with NVMe 1.4 controllers (Klaus Jensen)
 - fix PRINFO handling in the passthrough ioctl (Revanth Rajashekar)
 - fix a double DMA unmap in nvme-pci"

* tag 'nvme-5.11-2020-01-21' of git://git.infradead.org/nvme:
  nvme-pci: fix error unwind in nvme_map_data
  nvme-pci: refactor nvme_unmap_data
  nvmet: set right status on error in id-ns handler
  nvme-pci: allow use of cmb on v1.4 controllers
  nvme-tcp: avoid request double completion for concurrent nvme_tcp_timeout
  nvme-rdma: avoid request double completion for concurrent nvme_rdma_timeout
  nvme: check the PRINFO bit before deciding the host buffer length
2021-01-21 05:40:34 -07:00
Andy Lutomirski 67de8dca50 x86/mmx: Use KFPU_387 for MMX string operations
The default kernel_fpu_begin() doesn't work on systems that support XMM but
haven't yet enabled CR4.OSFXSR.  This causes crashes when _mmx_memcpy() is
called too early because LDMXCSR generates #UD when the aforementioned bit
is clear.

Fix it by using kernel_fpu_begin_mask(KFPU_387) explicitly.

Fixes: 7ad816762f ("x86/fpu: Reset MXCSR to default in kernel_fpu_begin()")
Reported-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Krzysztof Piotr Olędzki <ole@ans.pl>
Tested-by: Krzysztof Mazur <krzysiek@podlesie.net>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/e7bf21855fe99e5f3baa27446e32623358f69e8d.1611205691.git.luto@kernel.org
2021-01-21 13:39:36 +01:00
Dmitry Osipenko 51dfb6ca37
regulator: consumer: Add missing stubs to regulator/consumer.h
Add missing stubs to regulator/consumer.h in order to fix COMPILE_TEST
of the kernel. In particular this should fix compile-testing of OPP core
because of a missing stub for regulator_sync_voltage().

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210120205844.12658-1-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-21 12:35:42 +00:00
Andy Lutomirski e45122893a x86/fpu: Add kernel_fpu_begin_mask() to selectively initialize state
Currently, requesting kernel FPU access doesn't distinguish which parts of
the extended ("FPU") state are needed.  This is nice for simplicity, but
there are a few cases in which it's suboptimal:

 - The vast majority of in-kernel FPU users want XMM/YMM/ZMM state but do
   not use legacy 387 state.  These users want MXCSR initialized but don't
   care about the FPU control word.  Skipping FNINIT would save time.
   (Empirically, FNINIT is several times slower than LDMXCSR.)

 - Code that wants MMX doesn't want or need MXCSR initialized.
   _mmx_memcpy(), for example, can run before CR4.OSFXSR gets set, and
   initializing MXCSR will fail because LDMXCSR generates an #UD when the
   aforementioned CR4 bit is not set.

 - Any future in-kernel users of XFD (eXtended Feature Disable)-capable
   dynamic states will need special handling.

Add a more specific API that allows callers to specify exactly what they
want.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Krzysztof Piotr Olędzki <ole@ans.pl>
Link: https://lkml.kernel.org/r/aff1cac8b8fc7ee900cf73e8f2369966621b053f.1611205691.git.luto@kernel.org
2021-01-21 12:07:28 +01:00
Marc Zyngier 9529aaa056 KVM: arm64: Filter out v8.1+ events on v8.0 HW
When running on v8.0 HW, make sure we don't try to advertise
events in the 0x4000-0x403f range.

Cc: stable@vger.kernel.org
Fixes: 88865beca9 ("KVM: arm64: Mask out filtered events in PCMEID{0,1}_EL1")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210121105636.1478491-1-maz@kernel.org
2021-01-21 11:00:02 +00:00
Steven Price e1663372d5 KVM: arm64: Compute TPIDR_EL2 ignoring MTE tag
KASAN in HW_TAGS mode will store MTE tags in the top byte of the
pointer. When computing the offset for TPIDR_EL2 we don't want anything
in the top byte, so remove the tag to ensure the computation is correct
no matter what the tag.

Fixes: 94ab5b61ee ("kasan, arm64: enable CONFIG_KASAN_HW_TAGS")
Signed-off-by: Steven Price <steven.price@arm.com>
[maz: added comment]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210108161254.53674-1-steven.price@arm.com
2021-01-21 09:36:23 +00:00
Greg Kroah-Hartman 494e63ee9c Merge 9bb48c82ac ("tty: implement write_iter") into tty-linus
We want the single "splice/sendfile to a tty" regression fix into
tty-linus so it can get into 5.11-final, while the larger patch series
fixing "splice/sendfile from a tty" should wait for 5.12-rc1 so that we
get more testing.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-21 09:38:37 +01:00