~ubuntu-mainline/ubuntu-mainline/+git/linux-upstream:linux-5.8.y

Last commit made on 2020-11-01
Get this branch:
git clone -b linux-5.8.y https://git.launchpad.net/~ubuntu-mainline/ubuntu-mainline/+git/linux-upstream
Members of Ubuntu Mainline can upload to this branch. Log in for directions.

Branch merges

Branch information

Recent commits

ab435ce... by Greg Kroah-Hartman <email address hidden>

Linux 5.8.18

Tested-by: Guenter Roeck <email address hidden>
Tested-by: Linux Kernel Functional Testing <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

4a5649e... by =?utf-8?q?Pali_Roh=C3=A1r?= <email address hidden>

phy: marvell: comphy: Convert internal SMCC firmware return codes to errno

commit ea17a0f153af2cd890e4ce517130dcccaa428c13 upstream.

Driver ->power_on and ->power_off callbacks leaks internal SMCC firmware
return codes to phy caller. This patch converts SMCC error codes to
standard linux errno codes. Include file linux/arm-smccc.h already provides
defines for SMCC error codes, so use them instead of custom driver defines.
Note that return value is signed 32bit, but stored in unsigned long type
with zero padding.

Tested-by: Tomasz Maciej Nowak <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Pali Rohár <email address hidden>
Signed-off-by: Lorenzo Pieralisi <email address hidden>
Reviewed-by: Rob Herring <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

b804943... by Ricky Wu <email address hidden>

misc: rtsx: do not setting OC_POWER_DOWN reg in rtsx_pci_init_ocp()

commit 551b6729578a8981c46af964c10bf7d5d9ddca83 upstream.

this power saving action in rtsx_pci_init_ocp() cause INTEL-NUC6 platform
missing card reader

Signed-off-by: Ricky Wu <email address hidden>
Link: https://<email address hidden>
Cc: Chris Clayton <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

ad9ee9c... by Stafford Horne <email address hidden>

openrisc: Fix issue with get_user for 64-bit values

commit d877322bc1adcab9850732275670409e8bcca4c4 upstream.

A build failure was raised by kbuild with the following error.

    drivers/android/binder.c: Assembler messages:
    drivers/android/binder.c:3861: Error: unrecognized keyword/register name `l.lwz ?ap,4(r24)'
    drivers/android/binder.c:3866: Error: unrecognized keyword/register name `l.addi ?ap,r0,0'

The issue is with 64-bit get_user() calls on openrisc. I traced this to
a problem where in the internally in the get_user macros there is a cast
to long __gu_val this causes GCC to think the get_user call is 32-bit.
This binder code is really long and GCC allocates register r30, which
triggers the issue. The 64-bit get_user asm tries to get the 64-bit pair
register, which for r30 overflows the general register names and returns
the dummy register ?ap.

The fix here is to move the temporary variables into the asm macros. We
use a 32-bit __gu_tmp for 32-bit and smaller macro and a 64-bit tmp in
the 64-bit macro. The cast in the 64-bit macro has a trick of casting
through __typeof__((x)-(x)) which avoids the below warning. This was
barrowed from riscv.

    arch/openrisc/include/asm/uaccess.h:240:8: warning: cast to pointer from integer of different size

I tested this in a small unit test to check reading between 64-bit and
32-bit pointers to 64-bit and 32-bit values in all combinations. Also I
ran make C=1 to confirm no new sparse warnings came up. It all looks
clean to me.

Link: https://lore.kernel.org/lkml/202008200453.ohnhqkjQ%<email address hidden>/
Signed-off-by: Stafford Horne <email address hidden>
Reviewed-by: Luc Van Oostenryck <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

f594998... by Souptick Joarder <email address hidden>

xen/gntdev.c: Mark pages as dirty

commit 779055842da5b2e508f3ccf9a8153cb1f704f566 upstream.

There seems to be a bug in the original code when gntdev_get_page()
is called with writeable=true then the page needs to be marked dirty
before being put.

To address this, a bool writeable is added in gnt_dev_copy_batch, set
it in gntdev_grant_copy_seg() (and drop `writeable` argument to
gntdev_get_page()) and then, based on batch->writeable, use
set_page_dirty_lock().

Fixes: a4cdb556cae0 (xen/gntdev: add ioctl for grant copy)
Suggested-by: Boris Ostrovsky <email address hidden>
Signed-off-by: Souptick Joarder <email address hidden>
Cc: John Hubbard <email address hidden>
Cc: Boris Ostrovsky <email address hidden>
Cc: Juergen Gross <email address hidden>
Cc: David Vrabel <email address hidden>
Cc: <email address hidden>
Link: https://<email address hidden>
Reviewed-by: Boris Ostrovsky <email address hidden>
Signed-off-by: Boris Ostrovsky <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

67e326e... by Geert Uytterhoeven <email address hidden>

ata: sata_rcar: Fix DMA boundary mask

commit df9c590986fdb6db9d5636d6cd93bc919c01b451 upstream.

Before commit 9495b7e92f716ab2 ("driver core: platform: Initialize
dma_parms for platform devices"), the R-Car SATA device didn't have DMA
parameters. Hence the DMA boundary mask supplied by its driver was
silently ignored, as __scsi_init_queue() doesn't check the return value
of dma_set_seg_boundary(), and the default value of 0xffffffff was used.

Now the device has gained DMA parameters, the driver-supplied value is
used, and the following warning is printed on Salvator-XS:

    DMA-API: sata_rcar ee300000.sata: mapping sg segment across boundary [start=0x00000000ffffe000] [end=0x00000000ffffefff] [boundary=0x000000001ffffffe]
    WARNING: CPU: 5 PID: 38 at kernel/dma/debug.c:1233 debug_dma_map_sg+0x298/0x300

(the range of start/end values depend on whether IOMMU support is
 enabled or not)

The issue here is that SATA_RCAR_DMA_BOUNDARY doesn't have bit 0 set, so
any typical end value, which is odd, will trigger the check.

Fix this by increasing the DMA boundary value by 1.

This also fixes the following WRITE DMA EXT timeout issue:

    # dd if=/dev/urandom of=/mnt/de1/file1-1024M bs=1M count=1024
    ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
    ata1.00: failed command: WRITE DMA EXT
    ata1.00: cmd 35/00:00:00:e6:0c/00:0a:00:00:00/e0 tag 0 dma 1310720 out
    res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
    ata1.00: status: { DRDY }

as seen by Shimoda-san since commit 429120f3df2dba2b ("block: fix
splitting segments on boundary masks").

Fixes: 8bfbeed58665dbbf ("sata_rcar: correct 'sata_rcar_sht'")
Fixes: 9495b7e92f716ab2 ("driver core: platform: Initialize dma_parms for platform devices")
Fixes: 429120f3df2dba2b ("block: fix splitting segments on boundary masks")
Signed-off-by: Geert Uytterhoeven <email address hidden>
Tested-by: Lad Prabhakar <email address hidden>
Tested-by: Yoshihiro Shimoda <email address hidden>
Reviewed-by: Christoph Hellwig <email address hidden>
Reviewed-by: Greg Kroah-Hartman <email address hidden>
Reviewed-by: Sergei Shtylyov <email address hidden>
Reviewed-by: Ulf Hansson <email address hidden>
Cc: stable <email address hidden>
Signed-off-by: Jens Axboe <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

f6b9406... by Grygorii Strashko <email address hidden>

PM: runtime: Fix timer_expires data type on 32-bit arches

commit 6b61d49a55796dbbc479eeb4465e59fd656c719c upstream.

Commit 8234f6734c5d ("PM-runtime: Switch autosuspend over to using
hrtimers") switched PM runtime autosuspend to use hrtimers and all
related time accounting in ns, but missed to update the timer_expires
data type in struct dev_pm_info to u64.

This causes the timer_expires value to be truncated on 32-bit
architectures when assignment is done from u64 values:

rpm_suspend()
|- dev->power.timer_expires = expires;

Fix it by changing the timer_expires type to u64.

Fixes: 8234f6734c5d ("PM-runtime: Switch autosuspend over to using hrtimers")
Signed-off-by: Grygorii Strashko <email address hidden>
Acked-by: Pavel Machek <email address hidden>
Acked-by: Vincent Guittot <email address hidden>
Cc: 5.0+ <email address hidden> # 5.0+
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

53faca2... by Peter Zijlstra <email address hidden>

serial: pl011: Fix lockdep splat when handling magic-sysrq interrupt

commit 534cf755d9df99e214ddbe26b91cd4d81d2603e2 upstream.

Issuing a magic-sysrq via the PL011 causes the following lockdep splat,
which is easily reproducible under QEMU:

  | sysrq: Changing Loglevel
  | sysrq: Loglevel set to 9
  |
  | ======================================================
  | WARNING: possible circular locking dependency detected
  | 5.9.0-rc7 #1 Not tainted
  | ------------------------------------------------------
  | systemd-journal/138 is trying to acquire lock:
  | ffffab133ad950c0 (console_owner){-.-.}-{0:0}, at: console_lock_spinning_enable+0x34/0x70
  |
  | but task is already holding lock:
  | ffff0001fd47b098 (&port_lock_key){-.-.}-{2:2}, at: pl011_int+0x40/0x488
  |
  | which lock already depends on the new lock.

  [...]

  | Possible unsafe locking scenario:
  |
  | CPU0 CPU1
  | ---- ----
  | lock(&port_lock_key);
  | lock(console_owner);
  | lock(&port_lock_key);
  | lock(console_owner);
  |
  | *** DEADLOCK ***

The issue being that CPU0 takes 'port_lock' on the irq path in pl011_int()
before taking 'console_owner' on the printk() path, whereas CPU1 takes
the two locks in the opposite order on the printk() path due to setting
the "console_owner" prior to calling into into the actual console driver.

Fix this in the same way as the msm-serial driver by dropping 'port_lock'
before handling the sysrq.

Cc: <email address hidden> # 4.19+
Cc: Russell King <email address hidden>
Cc: Greg Kroah-Hartman <email address hidden>
Cc: Jiri Slaby <email address hidden>
Link: https://lore.kernel.org/r/20200811101313.GA6970@willie-the-truck
Signed-off-by: Peter Zijlstra <email address hidden>
Tested-by: Will Deacon <email address hidden>
Signed-off-by: Will Deacon <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

e3f6c12... by Paras Sharma <email address hidden>

serial: qcom_geni_serial: To correct QUP Version detection logic

commit c9ca43d42ed8d5fd635d327a664ed1d8579eb2af upstream.

For QUP IP versions 2.5 and above the oversampling rate is
halved from 32 to 16.

Commit ce734600545f ("tty: serial: qcom_geni_serial: Update
the oversampling rate") is pushed to handle this scenario.
But the existing logic is failing to classify QUP Version 3.0
into the correct group ( 2.5 and above).

As result Serial Engine clocks are not configured properly for
baud rate and garbage data is sampled to FIFOs from the line.

So, fix the logic to detect QUP with versions 2.5 and above.

Fixes: ce734600545f ("tty: serial: qcom_geni_serial: Update the oversampling rate")
Cc: stable <email address hidden>
Signed-off-by: Paras Sharma <email address hidden>
Reviewed-by: Akash Asthana <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

8f924c0... by Chris Wilson

drm/i915/gem: Serialise debugfs i915_gem_objects with ctx->mutex

commit 4fe9af8e881d946bf60790eeb37a7c4f96e28382 upstream.

Since the debugfs may peek into the GEM contexts as the corresponding
client/fd is being closed, we may try and follow a dangling pointer.
However, the context closure itself is serialised with the ctx->mutex,
so if we hold that mutex as we inspect the state coupled in the context,
we know the pointers within the context are stable and will remain valid
as we inspect their tables.

Signed-off-by: Chris Wilson <email address hidden>
Cc: CQ Tang <email address hidden>
Cc: Daniel Vetter <email address hidden>
Cc: <email address hidden>
Reviewed-by: Tvrtko Ursulin <email address hidden>
Link: https://patchwork<email address hidden>
(cherry picked from commit 102f5aa491f262c818e607fc4fee08a724a76c69)
Signed-off-by: Rodrigo Vivi <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>