]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/log
mirror_ubuntu-hirsute-kernel.git
3 years agox86/split-lock: Avoid returning with interrupts enabled
Andi Kleen [Tue, 22 Dec 2020 17:40:10 +0000 (09:40 -0800)]
x86/split-lock: Avoid returning with interrupts enabled

BugLink: https://bugs.launchpad.net/bugs/1910109
commit e14fd4ba8fb47fcf5f244366ec01ae94490cd86a upstream.

When a split lock is detected always make sure to disable interrupts
before returning from the trap handler.

The kernel exit code assumes that all exits run with interrupts
disabled, otherwise the SWAPGS sequence can race against interrupts and
cause recursing page faults and later panics.

The problem will only happen on CPUs with split lock disable
functionality, so Icelake Server, Tiger Lake, Snow Ridge, Jacobsville.

Fixes: ca4c6a9858c2 ("x86/traps: Make interrupt enable/disable symmetric in C code")
Fixes: bce9b042ec73 ("x86/traps: Disable interrupts in exc_aligment_check()") # v5.8+
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agonet: ipconfig: Avoid spurious blank lines in boot log
Thierry Reding [Tue, 10 Nov 2020 07:37:57 +0000 (08:37 +0100)]
net: ipconfig: Avoid spurious blank lines in boot log

BugLink: https://bugs.launchpad.net/bugs/1910109
commit c9f64d1fc101c64ea2be1b2e562b4395127befc9 upstream.

When dumping the name and NTP servers advertised by DHCP, a blank line
is emitted if either of the lists is empty. This can lead to confusing
issues such as the blank line getting flagged as warning. This happens
because the blank line is the result of pr_cont("\n") and that may see
its level corrupted by some other driver concurrently writing to the
console.

Fix this by making sure that the terminating newline is only emitted
if at least one entry in the lists was printed before.

Reported-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201110073757.1284594-1-thierry.reding@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoUBUNTU: [Config] updateconfigs following v5.10.2 import
Paolo Pisati [Mon, 4 Jan 2021 15:26:54 +0000 (16:26 +0100)]
UBUNTU: [Config] updateconfigs following v5.10.2 import

BugLink: https://bugs.launchpad.net/bugs/1910106
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoLinux 5.10.2
Greg Kroah-Hartman [Mon, 21 Dec 2020 12:30:08 +0000 (13:30 +0100)]
Linux 5.10.2

BugLink: https://bugs.launchpad.net/bugs/1910106
Tested-by: Jeffrin Jose T <jeffrin@rajagiritech.edu.in>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20201219125339.066340030@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoserial: 8250_omap: Avoid FIFO corruption caused by MDR1 access
Alexander Sverdlin [Thu, 10 Dec 2020 05:52:57 +0000 (06:52 +0100)]
serial: 8250_omap: Avoid FIFO corruption caused by MDR1 access

BugLink: https://bugs.launchpad.net/bugs/1910106
commit d96f04d347e4011977abdbb4da5d8f303ebd26f8 upstream.

It has been observed that once per 300-1300 port openings the first
transmitted byte is being corrupted on AM3352 ("v" written to FIFO appeared
as "e" on the wire). It only happened if single byte has been transmitted
right after port open, which means, DMA is not used for this transfer and
the corruption never happened afterwards.

Therefore I've carefully re-read the MDR1 errata (link below), which says
"when accessing the MDR1 registers that causes a dummy under-run condition
that will freeze the UART in IrDA transmission. In UART mode, this may
corrupt the transferred data". Strictly speaking,
omap_8250_mdr1_errataset() performs a read access and if the value is the
same as should be written, exits without errata-recommended FIFO reset.

A brief check of the serial_omap_mdr1_errataset() from the competing
omap-serial driver showed it has no read access of MDR1. After removing the
read access from omap_8250_mdr1_errataset() the data corruption never
happened any more.

Link: https://www.ti.com/lit/er/sprz360i/sprz360i.pdf
Fixes: 61929cf0169d ("tty: serial: Add 8250-core based omap driver")
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Link: https://lore.kernel.org/r/20201210055257.1053028-1-alexander.sverdlin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoALSA: pcm: oss: Fix potential out-of-bounds shift
Takashi Iwai [Wed, 9 Dec 2020 08:45:52 +0000 (09:45 +0100)]
ALSA: pcm: oss: Fix potential out-of-bounds shift

BugLink: https://bugs.launchpad.net/bugs/1910106
commit 175b8d89fe292796811fdee87fa39799a5b6b87a upstream.

syzbot spotted a potential out-of-bounds shift in the PCM OSS layer
where it calculates the buffer size with the arbitrary shift value
given via an ioctl.

Add a range check for avoiding the undefined behavior.
As the value can be treated by a signed integer, the max shift should
be 30.

Reported-by: syzbot+df7dc146ebdd6435eea3@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201209084552.17109-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoUSB: sisusbvga: Make console support depend on BROKEN
Thomas Gleixner [Mon, 19 Oct 2020 10:06:30 +0000 (12:06 +0200)]
USB: sisusbvga: Make console support depend on BROKEN

BugLink: https://bugs.launchpad.net/bugs/1910106
commit 862ee699fefe1e6d6f2c1518395f0b999b8beb15 upstream.

The console part of sisusbvga is broken vs. printk(). It uses in_atomic()
to detect contexts in which it cannot sleep despite the big fat comment in
preempt.h which says: Do not use in_atomic() in driver code.

in_atomic() does not work on kernels with CONFIG_PREEMPT_COUNT=n which
means that spin/rw_lock held regions are not detected by it.

There is no way to make this work by handing context information through to
the driver and this only can be solved once the core printk infrastructure
supports sleepable console drivers.

Make it depend on BROKEN for now.

Fixes: 1bbb4f2035d9 ("[PATCH] USB: sisusb[vga] update")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201019101109.603244207@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoUSB: UAS: introduce a quirk to set no_write_same
Oliver Neukum [Wed, 9 Dec 2020 15:26:39 +0000 (16:26 +0100)]
USB: UAS: introduce a quirk to set no_write_same

BugLink: https://bugs.launchpad.net/bugs/1910106
commit 8010622c86ca5bb44bc98492f5968726fc7c7a21 upstream.

UAS does not share the pessimistic assumption storage is making that
devices cannot deal with WRITE_SAME.  A few devices supported by UAS,
are reported to not deal well with WRITE_SAME. Those need a quirk.

Add it to the device that needs it.

Reported-by: David C. Partridge <david.partridge@perdrix.co.uk>
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201209152639.9195-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoxhci-pci: Allow host runtime PM as default for Intel Maple Ridge xHCI
Mika Westerberg [Tue, 8 Dec 2020 09:29:11 +0000 (11:29 +0200)]
xhci-pci: Allow host runtime PM as default for Intel Maple Ridge xHCI

BugLink: https://bugs.launchpad.net/bugs/1910106
commit 5a8e3229ac27956bdcc25b2709e5d196d109a27a upstream.

Intel Maple Ridge is successor of Titan Ridge Thunderbolt controller. As
Titan Ridge this one also includes xHCI host controller. In order to
safe energy we should put it to low power state by default when idle.
For this reason allow host runtime PM for Maple Ridge.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20201208092912.1773650-5-mathias.nyman@linux.intel.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoxhci-pci: Allow host runtime PM as default for Intel Alpine Ridge LP
Hans de Goede [Tue, 8 Dec 2020 09:29:10 +0000 (11:29 +0200)]
xhci-pci: Allow host runtime PM as default for Intel Alpine Ridge LP

BugLink: https://bugs.launchpad.net/bugs/1910106
commit c4d1ca05b8e68a4b5a3c4455cb6ec25b3df6d9dd upstream.

The xHCI controller on Alpine Ridge LP keeps the whole Thunderbolt
controller awake if the host controller is not allowed to sleep.
This is the case even if no USB devices are connected to the host.

Add the Intel Alpine Ridge LP product-id to the list of product-ids
for which we allow runtime PM by default.

Fixes: 2815ef7fe4d4 ("xhci-pci: allow host runtime PM as default for Intel Alpine and Titan Ridge")
Cc: <stable@vger.kernel.org>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20201208092912.1773650-4-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agousb: xhci: Set quirk for XHCI_SG_TRB_CACHE_SIZE_QUIRK
Tejas Joglekar [Tue, 8 Dec 2020 09:29:08 +0000 (11:29 +0200)]
usb: xhci: Set quirk for XHCI_SG_TRB_CACHE_SIZE_QUIRK

BugLink: https://bugs.launchpad.net/bugs/1910106
commit bac1ec551434697ca3c5bb5d258811ba5446866a upstream.

This commit uses the private data passed by parent device
to set the quirk for Synopsys xHC. This patch fixes the
SNPS xHC hang issue when the data is scattered across
small buffers which does not make atleast MPS size for
given TRB cache size of SNPS xHC.

Signed-off-by: Tejas Joglekar <joglekar@synopsys.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20201208092912.1773650-2-mathias.nyman@linux.intel.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoxhci: Give USB2 ports time to enter U3 in bus suspend
Li Jun [Tue, 8 Dec 2020 09:29:12 +0000 (11:29 +0200)]
xhci: Give USB2 ports time to enter U3 in bus suspend

BugLink: https://bugs.launchpad.net/bugs/1910106
commit c1373f10479b624fb6dba0805d673e860f1b421d upstream.

If a USB2 device wakeup is not enabled/supported the link state may
still be in U0 in xhci_bus_suspend(), where it's then manually put
to suspended U3 state.

Just as with selective suspend the device needs time to enter U3
suspend before continuing with further suspend operations
(e.g. system suspend), otherwise we may enter system suspend with link
state in U0.

[commit message rewording -Mathias]

Cc: <stable@vger.kernel.org>
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20201208092912.1773650-6-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoALSA: usb-audio: Fix control 'access overflow' errors from chmap
Takashi Iwai [Fri, 11 Dec 2020 13:00:48 +0000 (14:00 +0100)]
ALSA: usb-audio: Fix control 'access overflow' errors from chmap

BugLink: https://bugs.launchpad.net/bugs/1910106
commit c6dde8ffd071aea9d1ce64279178e470977b235c upstream.

The current channel-map control implementation in USB-audio driver may
lead to an error message like
  "control 3:0:0:Playback Channel Map:0: access overflow"
when CONFIG_SND_CTL_VALIDATION is set.  It's because the chmap get
callback clears the whole array no matter which count is set, and
rather the false-positive detection.

This patch fixes the problem by clearing only the needed array range
at usb_chmap_ctl_get().

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201211130048.6358-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoALSA: usb-audio: Fix potential out-of-bounds shift
Takashi Iwai [Wed, 9 Dec 2020 08:45:51 +0000 (09:45 +0100)]
ALSA: usb-audio: Fix potential out-of-bounds shift

BugLink: https://bugs.launchpad.net/bugs/1910106
commit 43d5ca88dfcd35e43010fdd818e067aa9a55f5ba upstream.

syzbot spotted a potential out-of-bounds shift in the USB-audio format
parser that receives the arbitrary shift value from the USB
descriptor.

Add a range check for avoiding the undefined behavior.

Reported-by: syzbot+df7dc146ebdd6435eea3@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201209084552.17109-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoUSB: add RESET_RESUME quirk for Snapscan 1212
Oliver Neukum [Mon, 7 Dec 2020 13:03:23 +0000 (14:03 +0100)]
USB: add RESET_RESUME quirk for Snapscan 1212

BugLink: https://bugs.launchpad.net/bugs/1910106
commit 08a02f954b0def3ada8ed6d4b2c7bcb67e885e9c upstream.

I got reports that some models of this old scanner need
this when using runtime PM.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201207130323.23857-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoUSB: dummy-hcd: Fix uninitialized array use in init()
Bui Quang Minh [Fri, 4 Dec 2020 06:24:49 +0000 (06:24 +0000)]
USB: dummy-hcd: Fix uninitialized array use in init()

BugLink: https://bugs.launchpad.net/bugs/1910106
commit e90cfa813da7a527785033a0b247594c2de93dd8 upstream.

This error path

err_add_pdata:
for (i = 0; i < mod_data.num; i++)
kfree(dum[i]);

can be triggered when not all dum's elements are initialized.

Fix this by initializing all dum's elements to NULL.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
Link: https://lore.kernel.org/r/1607063090-3426-1-git-send-email-minhquangbui99@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoUSB: legotower: fix logical error in recent commit
Alan Stern [Tue, 8 Dec 2020 16:30:42 +0000 (11:30 -0500)]
USB: legotower: fix logical error in recent commit

BugLink: https://bugs.launchpad.net/bugs/1910106
commit b175d273d4e4100b66e68f0675fef7a3c07a7957 upstream.

Commit d9f0d82f06c6 ("USB: legousbtower: use usb_control_msg_recv()")
contained an elementary logical error.  The check of the return code
from the new usb_control_msg_recv() function was inverted.

Reported-and-tested-by: syzbot+9be25235b7a69b24d117@syzkaller.appspotmail.com
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20201208163042.GD1298255@rowland.harvard.edu
Fixes: d9f0d82f06c6 ("USB: legousbtower: use usb_control_msg_recv()")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoktest.pl: Fix the logic for truncating the size of the log file for email
Steven Rostedt (VMware) [Mon, 30 Nov 2020 21:38:41 +0000 (16:38 -0500)]
ktest.pl: Fix the logic for truncating the size of the log file for email

BugLink: https://bugs.launchpad.net/bugs/1910106
commit 170f4869e66275f498ae4736106fb54c0fdcd036 upstream.

The logic for truncating the log file for emailing based on the
MAIL_MAX_SIZE option is confusing and incorrect. Simplify it and have the
tail of the log file truncated to the max size specified in the config.

Cc: stable@vger.kernel.org
Fixes: 855d8abd2e8ff ("ktest.pl: Change the logic to control the size of the log file emailed")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoktest.pl: If size of log is too big to email, email error message
Steven Rostedt (VMware) [Mon, 30 Nov 2020 21:32:55 +0000 (16:32 -0500)]
ktest.pl: If size of log is too big to email, email error message

BugLink: https://bugs.launchpad.net/bugs/1910106
commit 8cd6bc0359deebd8500e6de95899a8a78d3ec4ba upstream.

If the size of the error log is too big to send via email, and the sending
fails, it wont email any result. This can be confusing for the user who is
waiting for an email on the completion of the tests.

If it fails to send email, then try again without the log file stating that
it failed to send an email. Obviously this will not be of use if the sending
of email failed for some other reasons, but it will at least give the user
some information when it fails for the most common reason.

Cc: stable@vger.kernel.org
Fixes: c2d84ddb338c8 ("ktest.pl: Add MAIL_COMMAND option to define how to send email")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoptrace: Prevent kernel-infoleak in ptrace_get_syscall_info()
Peilin Ye [Sat, 1 Aug 2020 15:20:44 +0000 (11:20 -0400)]
ptrace: Prevent kernel-infoleak in ptrace_get_syscall_info()

BugLink: https://bugs.launchpad.net/bugs/1910106
commit 0032ce0f85a269a006e91277be5fdbc05fad8426 upstream.

ptrace_get_syscall_info() is potentially copying uninitialized stack
memory to userspace, since the compiler may leave a 3-byte hole near the
beginning of `info`. Fix it by adding a padding field to `struct
ptrace_syscall_info`.

Fixes: 201766a20e30 ("ptrace: add PTRACE_GET_SYSCALL_INFO request")
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200801152044.230416-1-yepeilin.cs@gmail.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoLinux 5.10.1
Greg Kroah-Hartman [Mon, 14 Dec 2020 18:33:01 +0000 (19:33 +0100)]
Linux 5.10.1

BugLink: https://bugs.launchpad.net/bugs/1910104
Link: https://lore.kernel.org/r/20201214170452.563016590@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoUBUNTU: Start new release
Paolo Pisati [Mon, 4 Jan 2021 15:18:44 +0000 (16:18 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoPCI: vmd: Offset Client VMD MSI-X vectors
Jon Derrick [Tue, 22 Dec 2020 07:51:21 +0000 (15:51 +0800)]
PCI: vmd: Offset Client VMD MSI-X vectors

BugLink: https://bugs.launchpad.net/bugs/1894778
Client VMD platforms have a software-triggered MSI-X vector 0 that will
not forward hardware-remapped MSI from the sub-device domain. This
causes an issue with VMD platforms that use AHCI behind VMD and have a
single MSI-X vector remapped to VMD vector 0. Add a VMD MSI-X vector
offset for these platforms.

Link: https://lore.kernel.org/r/20201102222223.92978-1-jonathan.derrick@intel.com
Tested-by: Jian-Hong Pan <jhp@endlessos.org>
Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
(cherry picked from commit f6b7bb847ca821a8aaa1b6da10ee65311e6f15bf)
Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agodrm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock
Imre Deak [Mon, 21 Dec 2020 10:14:37 +0000 (18:14 +0800)]
drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock

https://bugs.launchpad.net/bugs/1908885

Apply Display WA #22010492432 for combo PHY PLLs too. This should fix a
problem where the PLL output frequency is slightly off with the current
PLL fractional divider value.

I haven't seen an actual case where this causes a problem, but let's
follow the spec. It's also needed on some EHL platforms, but for that we
also need a way to distinguish the affected EHL SKUs, so I leave that
for a follow-up.

v2:
- Apply the WA at one place when calculating the PLL dividers from the
  frequency and the frequency from the dividers for all the combo PLL
  use cases (DP, HDMI, TBT). (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201003001846.1271151-6-imre.deak@intel.com
(cherry picked from commit 0e2497e334de42dbaaee8e325241b5b5b34ede7e)
Signed-off-by: Koba Ko <koba.ko@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agodrm/i915: Add an encoder hook to sanitize its state during init/resume
Imre Deak [Mon, 21 Dec 2020 10:14:36 +0000 (18:14 +0800)]
drm/i915: Add an encoder hook to sanitize its state during init/resume

https://bugs.launchpad.net/bugs/1908885

Atm, if a full modeset is performed during the initial modeset the link
training will happen with uninitialized max DP rate and lane count. Make
sure the corresponding encoder state is initialized by adding an encoder
hook called during driver init and system resume.

A better alternative would be to store all states in the CRTC state and
make this state available for the link re-training code. Also instead of
the DPCD read in the hook there should be really a proper sink HW
readout in place. Both of these require a bigger rework, so for now opting
for this minimal fix to make at least full initial modesets work.

The patch is based on
https://patchwork.freedesktop.org/patch/101473/?series=10354&rev=3

v2: (Ville)
- s/sanitize_state/sync_state/
- No point in calling the hook when CRTC is disabled, remove the call.
- No point in calling the hook for MST, remove it.

v3: Check only DPCD_REV to avoid clobbering intel_dp->dpcd. (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201005230154.1477653-1-imre.deak@intel.com
(cherry picked from commit f9e76a6e68d39a13c269999cfb2df23054c5146b)
Signed-off-by: Koba Ko <koba.ko@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agodrm/i915: Check for unsupported DP link rates during initial commit
Imre Deak [Mon, 21 Dec 2020 10:14:35 +0000 (18:14 +0800)]
drm/i915: Check for unsupported DP link rates during initial commit

https://bugs.launchpad.net/bugs/1908885

Some BIOSes set an unsupported/imprecise DP link rate (for instance on
TGL A stepping). Make sure that we do an encoder recompute and a modeset
in this case.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201003001846.1271151-4-imre.deak@intel.com
(cherry picked from commit 7d6287a8481242cb0f324a2937258f240036dd17)
Signed-off-by: Koba Ko <koba.ko@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agodrm/i915: Move the initial fastset commit check to encoder hooks
Imre Deak [Mon, 21 Dec 2020 10:14:34 +0000 (18:14 +0800)]
drm/i915: Move the initial fastset commit check to encoder hooks

https://bugs.launchpad.net/bugs/1908885

Move the checks to decide whether a fastset is possible during the
initial commit to an encoder hook. This check is really encoder specific
and the next patch will also require this adding a DP encoder specific
check.

v2: Fix negated condition in gen11_dsi_initial_fastset_check().
v3: Make sure to call the hook for all encoders on the crtc. (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201005215311.1475666-1-imre.deak@intel.com
(cherry picked from commit b671d6ef8b20ffc2161e1e803f8c7b143e1b1615)
Signed-off-by: Koba Ko <koba.ko@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agodrm/i915/skl: Work around incorrect BIOS WRPLL PDIV programming
Imre Deak [Mon, 21 Dec 2020 10:14:33 +0000 (18:14 +0800)]
drm/i915/skl: Work around incorrect BIOS WRPLL PDIV programming

https://bugs.launchpad.net/bugs/1908885

The BIOS of at least one ASUS-Z170M system with an SKL I have programs
the 101b WRPLL PDIV divider value, which is the encoding for PDIV=7 with
bit#0 incorrectly set.

This happens with the

"3840x2160": 30 262750 3840 3888 3920 4000 2160 2163 2168 2191 0x48 0x9

HDMI mode (scaled from a 1024x768 src fb) set by BIOS and the

ref_clock=24000, dco_integer=383, dco_fraction=5802, pdiv=7, qdiv=1, kdiv=1

WRPLL parameters (assuming PDIV=7 was the intended setting). This
corresponds to 262749 PLL frequency/port clock.

Later the driver sets the same mode for which it calculates the same
dco_int/dco_frac/div WRPLL parameters (with the correct PDIV=7 encoding).

Based on the above, let's assume that PDIV=7 was intended and the HW
just ignores bit#0 in the PDIV register field for this setting, treating
100b and 101b encodings the same way.

While at it add the MISSING_CASE() for the p0,p2 divider decodings.

v2: (Ville)
- Add a define for the incorrect divider value.
- Emit only a debug message when detecting the incorrect divider value.
- Use fallthrough from the incorrect divider value case.
- Add the MISSING_CASE()s.

v3: Return 0 freq for incorrect divider values. (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201006013555.1488262-1-imre.deak@intel.com
(cherry picked from commit 7a8a95f5dc4c1232b7f88b62340cacf8876f80ff)
Signed-off-by: Koba Ko <koba.ko@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agopowerpc/rtas: Fix typo of ibm, open-errinjct in RTAS filter
Tyrel Datwyler [Fri, 18 Dec 2020 12:55:58 +0000 (09:55 -0300)]
powerpc/rtas: Fix typo of ibm, open-errinjct in RTAS filter

BugLink: https://bugs.launchpad.net/bugs/1908710
Commit bd59380c5ba4 ("powerpc/rtas: Restrict RTAS requests from userspace")
introduced the following error when invoking the errinjct userspace
tool:

  [root@ltcalpine2-lp5 librtas]# errinjct open
  [327884.071171] sys_rtas: RTAS call blocked - exploit attempt?
  [327884.071186] sys_rtas: token=0x26, nargs=0 (called by errinjct)
  errinjct: Could not open RTAS error injection facility
  errinjct: librtas: open: Unexpected I/O error

The entry for ibm,open-errinjct in rtas_filter array has a typo where
the "j" is omitted in the rtas call name. After fixing this typo the
errinjct tool functions again as expected.

  [root@ltcalpine2-lp5 linux]# errinjct open
  RTAS error injection facility open, token = 1

Fixes: bd59380c5ba4 ("powerpc/rtas: Restrict RTAS requests from userspace")
Cc: stable@vger.kernel.org
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201208195434.8289-1-tyreld@linux.ibm.com
(cherry picked from commit f10881a46f8914428110d110140a455c66bdf27b)
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoselftests/powerpc/eeh: disable kselftest timeout setting for eeh-basic
Po-Hsu Lin [Fri, 18 Dec 2020 09:50:14 +0000 (17:50 +0800)]
selftests/powerpc/eeh: disable kselftest timeout setting for eeh-basic

BugLink: https://bugs.launchpad.net/bugs/1882503
The eeh-basic test got its own 60 seconds timeout (defined in commit
414f50434aa2 "selftests/eeh: Bump EEH wait time to 60s") per breakable
device.

And we have discovered that the number of breakable devices varies
on different hardware. The device recovery time ranges from 0 to 35
seconds. In our test pool it will take about 30 seconds to run on a
Power8 system that with 5 breakable devices, 60 seconds to run on a
Power9 system that with 4 breakable devices.

Extend the timeout setting in the kselftest framework to 5 minutes
to give it a chance to finish.

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201023024539.9512-1-po-hsu.lin@canonical.com
(cherry picked from commit f5eca0b279117f25020112a2f65ec9c3ea25f3ac)
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: [dep-8] Allow all hwe kernels
Stefan Bader [Thu, 17 Dec 2020 13:57:24 +0000 (14:57 +0100)]
UBUNTU: [dep-8] Allow all hwe kernels

BugLink: https://bugs.launchpad.net/bugs/1908529
The dep-8 tests are limited to kernels which are bootable. But with
moving to versioned hwe kernels this would require constant change.
To avoid that, just allow any kernel source starting with linux-hwe.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agodrm/i915: Force DPCD backlight mode for BOE 2270 panel
Aaron Ma [Fri, 9 Oct 2020 08:57:50 +0000 (16:57 +0800)]
drm/i915: Force DPCD backlight mode for BOE 2270 panel

BugLink: https://bugs.launchpad.net/bugs/1904991
BOE 2270 panel failed to control backlight brightness.
Add it in edid quirks to force using DPCD backlight control.
Then the brightness can be controlled.

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201009085750.88490-2-aaron.ma@canonical.com
(backported picked from commit 055f8458d95a38c20e8360634255f684378179eb)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoigc: Report speed and duplex as unknown when device is runtime suspended
Kai-Heng Feng [Fri, 4 Dec 2020 16:10:03 +0000 (00:10 +0800)]
igc: Report speed and duplex as unknown when device is runtime suspended

BugLink: https://bugs.launchpad.net/bugs/1906851
Similar to commit 165ae7a8feb5 ("igb: Report speed and duplex as unknown
when device is runtime suspended"), if we try to read speed and duplex
sysfs while the device is runtime suspended, igc will complain and
stops working:

[  123.449883] igc 0000:03:00.0 enp3s0: PCIe link lost, device now detached
[  123.450052] BUG: kernel NULL pointer dereference, address: 0000000000000008
[  123.450056] #PF: supervisor read access in kernel mode
[  123.450058] #PF: error_code(0x0000) - not-present page
[  123.450059] PGD 0 P4D 0
[  123.450064] Oops: 0000 [#1] SMP NOPTI
[  123.450068] CPU: 0 PID: 2525 Comm: udevadm Tainted: G     U  W  OE     5.10.0-1002-oem #2+rkl2-Ubuntu
[  123.450078] RIP: 0010:igc_rd32+0x1c/0x90 [igc]
[  123.450080] Code: c0 5d c3 b8 fd ff ff ff c3 0f 1f 44 00 00 0f 1f 44 00 00 55 89 f0 48 89 e5 41 56 41 55 41 54 49 89 c4 53 48 8b 57 08 48 01 d0 <44> 8b 28 41 83 fd ff 74 0c 5b 44 89 e8 41 5c 41 5d 4

[  123.450083] RSP: 0018:ffffb0d100d6fcc0 EFLAGS: 00010202
[  123.450085] RAX: 0000000000000008 RBX: ffffb0d100d6fd30 RCX: 0000000000000000
[  123.450087] RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff945a12716c10
[  123.450089] RBP: ffffb0d100d6fce0 R08: ffff945a12716550 R09: ffff945a09874000
[  123.450090] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000008
[  123.450092] R13: ffff945a12716000 R14: ffff945a037da280 R15: ffff945a037da290
[  123.450094] FS:  00007f3b34c868c0(0000) GS:ffff945b89200000(0000) knlGS:0000000000000000
[  123.450096] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  123.450098] CR2: 0000000000000008 CR3: 00000001144de006 CR4: 0000000000770ef0
[  123.450100] PKRU: 55555554
[  123.450101] Call Trace:
[  123.450111]  igc_ethtool_get_link_ksettings+0xd6/0x1b0 [igc]
[  123.450118]  __ethtool_get_link_ksettings+0x71/0xb0
[  123.450123]  duplex_show+0x74/0xc0
[  123.450129]  dev_attr_show+0x1d/0x40
[  123.450134]  sysfs_kf_seq_show+0xa1/0x100
[  123.450137]  kernfs_seq_show+0x27/0x30
[  123.450142]  seq_read+0xb7/0x400
[  123.450148]  ? common_file_perm+0x72/0x170
[  123.450151]  kernfs_fop_read+0x35/0x1b0
[  123.450155]  vfs_read+0xb5/0x1b0
[  123.450157]  ksys_read+0x67/0xe0
[  123.450160]  __x64_sys_read+0x1a/0x20
[  123.450164]  do_syscall_64+0x38/0x90
[  123.450168]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  123.450170] RIP: 0033:0x7f3b351fe142
[  123.450173] Code: c0 e9 c2 fe ff ff 50 48 8d 3d 3a ca 0a 00 e8 f5 19 02 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff ff 77 56 c3 0f 1f 44 00 00 48 83 ec 28 48 89 54 24
[  123.450174] RSP: 002b:00007fffef2ec138 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[  123.450177] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3b351fe142
[  123.450179] RDX: 0000000000001001 RSI: 00005644c047f070 RDI: 0000000000000003
[  123.450180] RBP: 00007fffef2ec340 R08: 00005644c047f070 R09: 00007f3b352d9320
[  123.450182] R10: 00005644c047c010 R11: 0000000000000246 R12: 00005644c047cbf0
[  123.450184] R13: 00005644c047e6d0 R14: 0000000000000003 R15: 00007fffef2ec140
[  123.450189] Modules linked in: rfcomm ccm cmac algif_hash algif_skcipher af_alg bnep toshiba_acpi industrialio toshiba_haps hp_accel lis3lv02d btusb btrtl btbcm btintel bluetooth ecdh_generic ecc joydev input_leds nls_iso8859_1 snd_sof_pci snd_sof_intel_byt snd_sof_intel_ipc snd_sof_intel_hda_common snd_soc_hdac_hda snd_hda_codec_hdmi snd_sof_xtensa_dsp snd_sof_intel_hda snd_sof snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_intel snd_intel_dspcfg soundwire_intel soundwire_generic_allocation soundwire_cadence snd_hda_codec snd_hda_core ath10k_pci snd_hwdep intel_rapl_msr intel_rapl_common ath10k_core soundwire_bus snd_soc_core x86_pkg_temp_thermal ath intel_powerclamp snd_compress ac97_bus snd_pcm_dmaengine mac80211 snd_pcm coretemp snd_seq_midi snd_seq_midi_event snd_rawmidi kvm_intel cfg80211 snd_seq snd_seq_device snd_timer mei_hdcp kvm libarc4 snd crct10dif_pclmul ghash_clmulni_intel aesni_intel
 mei_me dell_wmi
[  123.450266]  dell_smbios soundcore sparse_keymap dcdbas crypto_simd cryptd mei dell_uart_backlight glue_helper ee1004 wmi_bmof intel_wmi_thunderbolt dell_wmi_descriptor mac_hid efi_pstore acpi_pad acpi_tad intel_cstate sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 btrfs blake2b_generic raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear dm_mirror dm_region_hash dm_log hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cec crc32_pclmul rc_core drm intel_lpss_pci i2c_i801 ahci igc intel_lpss i2c_smbus idma64 xhci_pci libahci virt_dma xhci_pci_renesas wmi video pinctrl_tigerlake
[  123.450335] CR2: 0000000000000008
[  123.450338] ---[ end trace 9f731e38b53c35cc ]---

The more generic approach will be wrap get_link_ksettings() with begin()
and complete() callbacks, and calls runtime resume and runtime suspend
routine respectively. However, igc is like igb, runtime resume routine
uses rtnl_lock() which upper ethtool layer also uses.

So to prevent a deadlock on rtnl, take a different approach, use
pm_runtime_suspended() to avoid reading register while device is runtime
suspended.

Cc: <stable@vger.kernel.org>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Sasha Neftin <sasha.neftin@intel.com>
(cherry picked from commit 0636cd13c6e5e025c95374a78b68c6dc86693fb4 git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git dev-queue)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: SAUCE: rtw88: 8723de: let cpu enter c10
Chin-Yen Lee [Tue, 8 Dec 2020 08:34:02 +0000 (16:34 +0800)]
UBUNTU: SAUCE: rtw88: 8723de: let cpu enter c10

BugLink: https://bugs.launchpad.net/bugs/1907200
Change-Id: Ie0ba548c2ac3c9940351480caed0a75a38e8a4fd
Signed-off-by: Chin-Yen Lee <timlee@realtek.com>
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: [Config] Deactivate CONFIG_QETH_OSN kernel config option
Frank Heimes [Mon, 7 Dec 2020 20:52:55 +0000 (21:52 +0100)]
UBUNTU: [Config] Deactivate CONFIG_QETH_OSN kernel config option

BugLink: https://bugs.launchpad.net/bugs/1906370
The final shipment of OSN devices was as part of the IBM z13 hardware generation.
The primary exploiter was the IBM Communication Controller,
which was pulled out of marketing in March 2015 and should be out of service now.
Therefore, IBM pulls the support from all Linux distros going forward.
Hence the deactivation of the CONFIG_QETH_OSN kernel config option for hirsute and onwards.

Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
[ saf: fix ups ]
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoPM: ACPI: Refresh wakeup device power configuration every time
Rafael J. Wysocki [Mon, 30 Nov 2020 08:13:02 +0000 (16:13 +0800)]
PM: ACPI: Refresh wakeup device power configuration every time

BugLink: https://bugs.launchpad.net/bugs/1906229
When wakeup signaling is enabled for a bridge for the second (or every
next) time in a row, its existing device wakeup power configuration
may not match the new conditions.  For example, some devices below
it may have been put into low-power states and that changes the
device wakeup power conditions or similar.  This causes functional
problems to appear on some systems (for example,  because of it the
Thunderbolt port on Dell Precision 5550 cannot detect devices plugged
in after it has been suspended).

For this reason, modify __acpi_device_wakeup_enable() to refresh the
device wakeup power configuration of the target device on every
invocation, not just when it is called for that device first time
in a row.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reported-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
(cherry picked from commit 7400906166b4bbbca79d4e44094dddeefbb6ecd5 linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoPM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup()
Rafael J. Wysocki [Mon, 30 Nov 2020 08:13:01 +0000 (16:13 +0800)]
PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup()

BugLink: https://bugs.launchpad.net/bugs/1906229
The idea behind acpi_pm_set_bridge_wakeup() was to allow bridges to
be reference counted for wakeup enabling, because they may be enabled
to signal wakeup on behalf of their subordinate devices and that
may happen for multiple times in a row, whereas for the other devices
it only makes sense to enable wakeup signaling once.

However, this becomes problematic if the bridge itself is suspended,
because it is treated as a "regular" device in that case and the
reference counting doesn't work.

For instance, suppose that there are two devices below a bridge and
they both can signal wakeup.  Every time one of them is suspended,
wakeup signaling is enabled for the bridge, so when they both have
been suspended, the bridge's wakeup reference counter value is 2.

Say that the bridge is suspended subsequently and acpi_pci_wakeup()
is called for it.  Because the bridge can signal wakeup, that
function will invoke acpi_pm_set_device_wakeup() to configure it
and __acpi_pm_set_device_wakeup() will be called with the last
argument equal to 1.  This causes __acpi_device_wakeup_enable()
invoked by it to omit the reference counting, because the reference
counter of the target device (the bridge) is 2 at that time.

Now say that the bridge resumes and one of the device below it
resumes too, so the bridge's reference counter becomes 0 and
wakeup signaling is disabled for it, but there is still the other
suspended device which may need the bridge to signal wakeup on its
behalf and that is not going to work.

To address this scenario, use wakeup enable reference counting for
all devices, not just for bridges, so drop the last argument from
__acpi_device_wakeup_enable() and __acpi_pm_set_device_wakeup(),
which causes acpi_pm_set_device_wakeup() and
acpi_pm_set_bridge_wakeup() to become identical, so drop the latter
and use the former instead of it everywhere.

Fixes: 1ba51a7c1496 ("ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup()")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: 4.14+ <stable@vger.kernel.org> # 4.14+
(cherry picked from commit 98ace3f441bafd3ef1ec38c38dd0ba73606d0bff linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: SAUCE: drm/dp: Add dpcd backlight control for 0x4c83 0x4f41
Kai-Chuan Hsieh [Thu, 26 Nov 2020 09:20:11 +0000 (17:20 +0800)]
UBUNTU: SAUCE: drm/dp: Add dpcd backlight control for 0x4c83 0x4f41

BugLink: https://bugs.launchpad.net/bugs/1905663
Signed-off-by: Kai-Chuan Hsieh <kaichuan.hsieh@canonical.com>
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
[ saf: context adjustments ]
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoPM: ACPI: reboot: Use S5 for reboot
Kai-Heng Feng [Fri, 13 Nov 2020 17:01:59 +0000 (01:01 +0800)]
PM: ACPI: reboot: Use S5 for reboot

BugLink: https://bugs.launchpad.net/bugs/1904225
After reboot, it's not possible to use hotkeys to enter BIOS setup
and boot menu on some HP laptops.

BIOS folks identified the root cause is the missing _PTS call, and
BIOS is expecting _PTS to do proper reset.

Using S5 for reboot is default behavior under Windows, "A full
shutdown (S5) occurs when a system restart is requested" [1], so
let's do the same here.

[1] https://docs.microsoft.com/en-us/windows/win32/power/system-power-states

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
[ rjw: Subject edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit d60cd06331a3566d3305b3c7b566e79edf4e2095 linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoBluetooth: btrtl: fix incorrect skb allocation failure check
Colin Ian King [Fri, 13 Nov 2020 16:15:52 +0000 (00:15 +0800)]
Bluetooth: btrtl: fix incorrect skb allocation failure check

BugLink: https://bugs.launchpad.net/bugs/1904221
Currently the check for a failed bt_skb_alloc allocation is incorrectly
checking using IS_ERR and this can lead to a null pointer dereference. Fix
this by checking for a null pointer return using the !skb idiom.

Addresses-Coverity: ("Dereference null return")
Fixes: 1996d9cad6ad ("Bluetooth: btrtl: Ask 8821C to drop old firmware")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit f5e8e215869eed6163d5fdd309f0e674a0f23df6 linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoBluetooth: btrtl: Ask 8821C to drop old firmware
Kai-Heng Feng [Fri, 13 Nov 2020 16:15:51 +0000 (00:15 +0800)]
Bluetooth: btrtl: Ask 8821C to drop old firmware

BugLink: https://bugs.launchpad.net/bugs/1904221
Some platforms keep USB power even when they are powered off and in S5,
this makes Realtek 8821C keep its firmware even after a cold boot, and
make 8821C never load new firmware.

So use vendor specific HCI command to ask 8821C drop its firmware after
system shutdown.

Newer firmware doesn't have this issue so we only use this trick for old
8821C firmware version.

Suggested-by: Max Chou <max.chou@realtek.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit 1996d9cad6ad4882a79464e9fb941a68c693f8fc linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoselftests: test_vxlan_under_vrf: mute unnecessary error message
Po-Hsu Lin [Wed, 16 Dec 2020 04:22:03 +0000 (12:22 +0800)]
selftests: test_vxlan_under_vrf: mute unnecessary error message

BugLink: https://bugs.launchpad.net/bugs/1908342
The cleanup function in this script that tries to delete hv-1 / hv-2
vm-1 / vm-2 netns will generate some uncessary error messages:

Cannot remove namespace file "/run/netns/hv-2": No such file or directory
Cannot remove namespace file "/run/netns/vm-1": No such file or directory
Cannot remove namespace file "/run/netns/vm-2": No such file or directory

Redirect it to /dev/null like other commands in the cleanup function
to reduce confusion.

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Link: https://lore.kernel.org/r/20201211042420.16411-1-po-hsu.lin@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 0e12c0271887f1b00b79b7612c1d4f0d3d34e8a8 linux-next)
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: disable building bpf selftests (no VMLINUX_BTF)
Kamal Mostafa [Wed, 16 Dec 2020 21:40:15 +0000 (13:40 -0800)]
UBUNTU: disable building bpf selftests (no VMLINUX_BTF)

BugLink: https://bugs.launchpad.net/bugs/1908144
Disable selftests/bpf since it cannot be built without having built vmlinux
first, else build fails with either:

    Makefile:...: *** Cannot find a vmlinux for VMLINUX_BTF at any of
    "{paths}".  Stop.

or this more cryptic variant:

    Error: failed to load BTF from format: No such file or directory

Reference: "UBUNTU: SAUCE: selftests/bpf: clarify build error if no vmlinux"
Reference: https://lore.kernel.org/bpf/20201210185233.28091-1-broonie@kernel.org/
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: SAUCE: selftests: Skip BPF seftests by default
Mark Brown [Wed, 16 Dec 2020 21:40:14 +0000 (13:40 -0800)]
UBUNTU: SAUCE: selftests: Skip BPF seftests by default

BugLink: https://bugs.launchpad.net/bugs/1908144
The BPF selftests have build time dependencies on cutting edge versions
of tools in the BPF ecosystem including LLVM which are more involved
to satisfy than more typical requirements like installing a package from
your distribution.  This causes issues for users looking at kselftest in
as a whole who find that a default build of kselftest fails and that
resolving this is time consuming and adds administrative overhead.  The
fast pace of BPF development and the need for a full BPF stack to do
substantial development or validation work on the code mean that people
working directly on it don't see a reasonable way to keep supporting
older environments without causing problems with the usability of the
BPF tests in BPF development so these requirements are unlikely to be
relaxed in the immediate future.

There is already support for skipping targets so in order to reduce the
barrier to entry for people interested in kselftest as a whole let's use
that to skip the BPF tests by default when people work with the top
level kselftest build system.  Users can still build the BPF selftests
as part of the wider kselftest build by specifying SKIP_TARGETS,
including setting an empty SKIP_TARGETS to build everything.  They can
also continue to build the BPF selftests individually in cases where
they are specifically focused on BPF.

This isn't ideal since it means people will need to take special steps
to build the BPF tests but the dependencies mean that realistically this
is already the case to some extent and it makes it easier for people to
pick up and work with the other selftests which is hopefully a net win.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reference: https://lore.kernel.org/bpf/20201210185233.28091-1-broonie@kernel.org/
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: SAUCE: selftests/bpf: Clarify build error if no vmlinux
Kamal Mostafa [Wed, 16 Dec 2020 21:40:13 +0000 (13:40 -0800)]
UBUNTU: SAUCE: selftests/bpf: Clarify build error if no vmlinux

BugLink: https://bugs.launchpad.net/bugs/1908144
If Makefile cannot find any of the vmlinux's in its VMLINUX_BTF_PATHS list,
it tries to run btftool incorrectly, with VMLINUX_BTF unset:

    bpftool btf dump file $(VMLINUX_BTF) format c

Such that the keyword 'format' is misinterpreted as the path to vmlinux.
The resulting build error message is fairly cryptic:

      GEN      vmlinux.h
    Error: failed to load BTF from format: No such file or directory

This patch makes the failure reason clearer by yielding this instead:

    Makefile:...: *** Cannot find a vmlinux for VMLINUX_BTF at any of
    "{paths}".  Stop.

Fixes: acbd06206bbb ("selftests/bpf: Add vmlinux.h selftest exercising tracing of syscalls")
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20201215182011.15755-1-kamal@canonical.com
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoRevert "UBUNTU: SAUCE: selftests/bpf: clarify build error if no vmlinux"
Andrea Righi [Thu, 17 Dec 2020 19:09:52 +0000 (20:09 +0100)]
Revert "UBUNTU: SAUCE: selftests/bpf: clarify build error if no vmlinux"

This reverts commit fa1f62dbeec1d21122a74eda15ceb79d524fb9ad.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoRevert "UBUNTU: SAUCE: selftests: Skip BPF seftests by default"
Andrea Righi [Thu, 17 Dec 2020 19:09:43 +0000 (20:09 +0100)]
Revert "UBUNTU: SAUCE: selftests: Skip BPF seftests by default"

This reverts commit 9efd89e6d89e2c61992ebf1be9f3ab413e7810a9.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoRevert "UBUNTU: disable building bpf selftests (no VMLINUX_BTF)"
Andrea Righi [Thu, 17 Dec 2020 19:07:27 +0000 (20:07 +0100)]
Revert "UBUNTU: disable building bpf selftests (no VMLINUX_BTF)"

This reverts commit 2464bb104a99172fa011b844041aa9644af8cb54.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Ubuntu-5.10.0-9.10
Andrea Righi [Tue, 15 Dec 2020 09:16:14 +0000 (10:16 +0100)]
UBUNTU: Ubuntu-5.10.0-9.10

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Start new release
Andrea Righi [Tue, 15 Dec 2020 09:14:44 +0000 (10:14 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoRevert "dm raid: fix discard limits for raid1 and raid10"
Greg Kroah-Hartman [Mon, 14 Dec 2020 16:51:18 +0000 (17:51 +0100)]
Revert "dm raid: fix discard limits for raid1 and raid10"

This reverts commit e0910c8e4f87bb9f767e61a778b0d9271c4dc512.

It causes problems :(

Reported-by: Dave Jones <davej@codemonkey.org.uk>
Reported-by: Mike Snitzer <snitzer@redhat.com>
Cc: Zdenek Kabelac <zkabelac@redhat.com>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoRevert "md: change mddev 'chunk_sectors' from int to unsigned"
Greg Kroah-Hartman [Mon, 14 Dec 2020 16:48:11 +0000 (17:48 +0100)]
Revert "md: change mddev 'chunk_sectors' from int to unsigned"

This reverts commit 6ffeb1c3f8226244c08105bcdbeecc04bad6b89a.

It causes problems :(

Reported-by: Dave Jones <davej@codemonkey.org.uk>
Reported-by: Mike Snitzer <snitzer@redhat.com>
Cc: Song Liu <songliubraving@fb.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: [Config] Enable CONFIG_BPF_LSM
KP Singh [Mon, 30 Nov 2020 23:14:03 +0000 (23:14 +0000)]
UBUNTU: [Config] Enable CONFIG_BPF_LSM

Buglink: https://bugs.launchpad.net/bugs/1905975
[Impact]

Allows users to implement MAC and Audit Policies using BPF programs.

The LSM won't be added to the list of active LSMs by default (in
CONFIG_LSM or lsm= on the boot parameters) yet, as it adds an indirect
function call overhead by registering an empty callback for all hooks.

The LSM can be made "active" by default when the upstream effort [1] of
getting rid of this overhead is merged in the mainline kernel.

[Regression Potential]

Since the LSM is not active by default, it does not cause any
functional or performance regression.

[1]: https://lore.kernel.org/bpf/20200820164753.3256899-1-jackmanb@chromium.org

Signed-off-by: KP Singh <kpsingh@google.com>
Acked-by: Andrea Righi <andrea.righi@canonical.com>
[ arighi: updated also the annotations file ]
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoPCI: Disable MSI for Pericom PCIe-USB adapter
Andy Shevchenko [Fri, 4 Dec 2020 14:21:55 +0000 (22:21 +0800)]
PCI: Disable MSI for Pericom PCIe-USB adapter

BugLink: https://bugs.launchpad.net/bugs/1906839
Pericom PCIe-USB adapter advertises MSI, but documentation says "The MSI
Function is not implemented on this device" in chapters 7.3.27,
7.3.29-7.3.31, and Alberto found that MSI in fact does not work.

Disable MSI for these devices.

Datasheet: https://www.diodes.com/assets/Datasheets/PI7C9X440SL.pdf
Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices")
Link: https://lore.kernel.org/linux-usb/20201030134826.GP4077@smile.fi.intel.com/
Link: https://lore.kernel.org/r/20201106100526.17726-1-andriy.shevchenko@linux.intel.com
Reported-by: alberto.vignani@fastwebnet.it
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
(cherry picked from commit f83c37941e881224885f2e694e0626bea358e96b linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
3 years agoUBUNTU: disable building bpf selftests (no VMLINUX_BTF)
Kamal Mostafa [Mon, 14 Dec 2020 22:00:40 +0000 (14:00 -0800)]
UBUNTU: disable building bpf selftests (no VMLINUX_BTF)

BugLink: https://bugs.launchpad.net/bugs/1908144
Disable selftests/bpf since it cannot be built without having built vmlinux
first, else build fails with either:

    Makefile:148: *** cannot find a vmlinux for VMLINUX_BTF at any of
    "{paths}".  Stop.

or this more cryptic variant:

    Error: failed to load BTF from format: No such file or directory

Reference: "UBUNTU: SAUCE: selftests/bpf: clarify build error if no vmlinux"
Reference: https://lore.kernel.org/bpf/20201210185233.28091-1-broonie@kernel.org/
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
3 years agoUBUNTU: SAUCE: selftests: Skip BPF seftests by default
Mark Brown [Mon, 14 Dec 2020 22:00:39 +0000 (14:00 -0800)]
UBUNTU: SAUCE: selftests: Skip BPF seftests by default

BugLink: https://bugs.launchpad.net/bugs/1908144
The BPF selftests have build time dependencies on cutting edge versions
of tools in the BPF ecosystem including LLVM which are more involved
to satisfy than more typical requirements like installing a package from
your distribution.  This causes issues for users looking at kselftest in
as a whole who find that a default build of kselftest fails and that
resolving this is time consuming and adds administrative overhead.  The
fast pace of BPF development and the need for a full BPF stack to do
substantial development or validation work on the code mean that people
working directly on it don't see a reasonable way to keep supporting
older environments without causing problems with the usability of the
BPF tests in BPF development so these requirements are unlikely to be
relaxed in the immediate future.

There is already support for skipping targets so in order to reduce the
barrier to entry for people interested in kselftest as a whole let's use
that to skip the BPF tests by default when people work with the top
level kselftest build system.  Users can still build the BPF selftests
as part of the wider kselftest build by specifying SKIP_TARGETS,
including setting an empty SKIP_TARGETS to build everything.  They can
also continue to build the BPF selftests individually in cases where
they are specifically focused on BPF.

This isn't ideal since it means people will need to take special steps
to build the BPF tests but the dependencies mean that realistically this
is already the case to some extent and it makes it easier for people to
pick up and work with the other selftests which is hopefully a net win.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reference: https://lore.kernel.org/bpf/20201210185233.28091-1-broonie@kernel.org/
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
3 years agoUBUNTU: SAUCE: selftests/bpf: clarify build error if no vmlinux
Kamal Mostafa [Mon, 14 Dec 2020 22:00:38 +0000 (14:00 -0800)]
UBUNTU: SAUCE: selftests/bpf: clarify build error if no vmlinux

BugLink: https://bugs.launchpad.net/bugs/1908144
If Makefile cannot find any of the vmlinux's in its VMLINUX_BTF_PATHS list,
it tries to run btftool incorrectly, with VMLINUX_BTF unset:

    bpftool btf dump file $(VMLINUX_BTF) format c

Such that the keyword 'format' is misinterpreted as the path to vmlinux.
The resulting build error message is fairly cryptic:

      GEN      vmlinux.h
    Error: failed to load BTF from format: No such file or directory

This patch makes the failure reason clearer by yielding this instead:

    Makefile:...: *** cannot find a vmlinux for VMLINUX_BTF at any of
    "{paths}".  Stop.

Fixes: acbd06206bbb ("selftests/bpf: Add vmlinux.h selftest exercising tracing of syscalls")
Cc: stable@vger.kernel.org # 5.7+
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Reference: https://lore.kernel.org/bpf/20201214202049.7205-1-kamal@canonical.com/

3 years agoUBUNTU: Ubuntu-5.10.0-8.9
Andrea Righi [Mon, 14 Dec 2020 07:57:57 +0000 (08:57 +0100)]
UBUNTU: Ubuntu-5.10.0-8.9

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: [Config] update configs and annotations after rebase to v5.10
Andrea Righi [Mon, 14 Dec 2020 07:54:49 +0000 (08:54 +0100)]
UBUNTU: [Config] update configs and annotations after rebase to v5.10

Do not enable CONFIG_NFS_V4_2_READ_PLUS, since it's a development-only
feature for now.

CONFIG_MXC_CLK_SCU can be enabled only on arm64 now (ARCH_MXC && ARM64).

Update toolchain version.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Rebase to v5.10
Andrea Righi [Mon, 14 Dec 2020 07:33:04 +0000 (08:33 +0100)]
UBUNTU: Rebase to v5.10

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Start new release
Andrea Righi [Mon, 14 Dec 2020 07:32:34 +0000 (08:32 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: [Packaging] update variants
Andrea Righi [Mon, 14 Dec 2020 07:29:26 +0000 (08:29 +0100)]
UBUNTU: [Packaging] update variants

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agobpf: Fix selftest compilation on clang 11
Andrei Matei [Wed, 25 Nov 2020 03:52:55 +0000 (22:52 -0500)]
bpf: Fix selftest compilation on clang 11

BugLink: c/dtmwdtfJ/115 (Fix bpf selftest compilation with clang 11)

Before this patch, profiler.inc.h wouldn't compile with clang-11 (before
the __builtin_preserve_enum_value LLVM builtin was introduced in
https://reviews.llvm.org/D83242).

Another test that uses this builtin (test_core_enumval) is conditionally
skipped if the compiler is too old. In that spirit, this patch inhibits
part of populate_cgroup_info(), which needs this CO-RE builtin. The
selftests build again on clang-11.

The affected test (the profiler test) doesn't pass on clang-11 because
it's missing https://reviews.llvm.org/D85570, but at least the test suite
as a whole compiles. The test's expected failure is already called out in
the README.

Signed-off-by: Andrei Matei <andreimatei1@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Florian Lehner <dev@der-flo.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20201125035255.17970-1-andreimatei1@gmail.com
(cherry picked from commit fb3558127cb62ba2dea9e3d0efa1bb1d7e5eee2a
 git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: Ubuntu-5.10.0-7.8
Seth Forshee [Mon, 7 Dec 2020 06:15:21 +0000 (00:15 -0600)]
UBUNTU: Ubuntu-5.10.0-7.8

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: update dkms package versions
Seth Forshee [Mon, 7 Dec 2020 02:38:15 +0000 (20:38 -0600)]
UBUNTU: update dkms package versions

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: [Config] Update configs and annotations after rebase to v5.10-rc7
Seth Forshee [Mon, 7 Dec 2020 02:36:30 +0000 (20:36 -0600)]
UBUNTU: [Config] Update configs and annotations after rebase to v5.10-rc7

Add removed modules to modules.ignore.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: Rebase to v5.10-rc7
Seth Forshee [Mon, 7 Dec 2020 02:30:46 +0000 (20:30 -0600)]
UBUNTU: Rebase to v5.10-rc7

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: Start new release
Seth Forshee [Mon, 7 Dec 2020 02:30:02 +0000 (20:30 -0600)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: [Packaging] Change source package name to linux
Seth Forshee [Mon, 7 Dec 2020 02:37:04 +0000 (20:37 -0600)]
UBUNTU: [Packaging] Change source package name to linux

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: [Packaging] Remove nvidia-435 dkms build
Seth Forshee [Mon, 7 Dec 2020 02:26:38 +0000 (20:26 -0600)]
UBUNTU: [Packaging] Remove nvidia-435 dkms build

The l-r-m packages for nvidia-435 are now transitionals, so we
don't need to build the modules anymore.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: [Debian] Build linux-libc-dev for debian.master* branches
Seth Forshee [Thu, 12 Nov 2020 18:34:01 +0000 (12:34 -0600)]
UBUNTU: [Debian] Build linux-libc-dev for debian.master* branches

BugLink: https://bugs.launchpad.net/bugs/1904067
We don't build linux-libc-dev if $DEBIAN is not debian.master.
However, for a master kernel forward ported to the devel series
we do want to build linux-libc-dev. $DEBIAN will be named
debian.master-SERIES for these kernels, so allow building
linux-libc-dev for these kernels too.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: [Debian] Update for leader included in BACKPORT_SUFFIX
Seth Forshee [Wed, 4 Nov 2020 22:25:00 +0000 (23:25 +0100)]
UBUNTU: [Debian] Update for leader included in BACKPORT_SUFFIX

BugLink: https://bugs.launchpad.net/bugs/1902957
Currently a ~ is always added to the version string before
BACKPORT_SUFFIX. Now we will also doing forward-ports to
development releases, which works exactly the same as a
backport, but we want to use + as the leader instead.

Our kernel source doesn't contain the information to determine
which leader is appropriate, but that information is available
when generating update.conf. Therefore the leader will be added
as part of BACKPORT_SUFFIX, and our packaging should not insert
any leader.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
3 years agoUBUNTU: [Packaging] NVIDIA -- Add signed modules for the 455 driver
Alberto Milone [Wed, 21 Oct 2020 19:08:19 +0000 (21:08 +0200)]
UBUNTU: [Packaging] NVIDIA -- Add signed modules for the 455 driver

Add signed modules for the new 455 series.

BugLink: https://bugs.launchpad.net/bugs/1897751
Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: [Config] Reorder annotations after 5.10-rc6 rebase
Paolo Pisati [Tue, 1 Dec 2020 12:34:06 +0000 (13:34 +0100)]
UBUNTU: [Config] Reorder annotations after 5.10-rc6 rebase

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoUBUNTU: [Config] disable GPIO_CDEV_V1
Paolo Pisati [Wed, 2 Dec 2020 15:43:05 +0000 (16:43 +0100)]
UBUNTU: [Config] disable GPIO_CDEV_V1

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoUBUNTU: [Config] ARM_CMN=m
Paolo Pisati [Wed, 2 Dec 2020 13:36:53 +0000 (14:36 +0100)]
UBUNTU: [Config] ARM_CMN=m

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoUBUNTU: [Config] s390x: disable GPIO_CDEV
Paolo Pisati [Wed, 2 Dec 2020 12:02:16 +0000 (13:02 +0100)]
UBUNTU: [Config] s390x: disable GPIO_CDEV

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
3 years agoUBUNTU: [Config] CONFIG_RCU_SCALE_TEST=n
Seth Forshee [Mon, 30 Nov 2020 15:34:06 +0000 (09:34 -0600)]
UBUNTU: [Config] CONFIG_RCU_SCALE_TEST=n

BugLink: https://bugs.launchpad.net/bugs/1904906
This was enabled when rebasing to 5.10-rc1, but it is not an
option we would normally enable, and no justification was
provided for enabling it. The option also may be related to
ppc64el boot problems (though it is as of yet unclear how that
would be possible), so let's disable it.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 years agoUBUNTU: Ubuntu-5.10-5.10.0-6.7
Andrea Righi [Mon, 30 Nov 2020 06:47:35 +0000 (07:47 +0100)]
UBUNTU: Ubuntu-5.10-5.10.0-6.7

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Rebase to v5.10-rc6
Andrea Righi [Mon, 30 Nov 2020 06:43:41 +0000 (07:43 +0100)]
UBUNTU: Rebase to v5.10-rc6

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Start new release
Andrea Righi [Mon, 30 Nov 2020 06:42:54 +0000 (07:42 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: update dkms package versions
Andrea Righi [Mon, 30 Nov 2020 06:41:22 +0000 (07:41 +0100)]
UBUNTU: update dkms package versions

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: [Packaging]: linux-image should suggest linux-modules-extra
Thadeu Lima de Souza Cascardo [Fri, 27 Nov 2020 13:29:57 +0000 (10:29 -0300)]
UBUNTU: [Packaging]: linux-image should suggest linux-modules-extra

When installing linux-image, we don't want the linux-modules-extra to be
installed by default, so it should not be a Recommends. It can, however, be a
Suggests.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: [Packaging]: linux-modules should depend on linux-image
Thadeu Lima de Souza Cascardo [Fri, 27 Nov 2020 13:29:56 +0000 (10:29 -0300)]
UBUNTU: [Packaging]: linux-modules should depend on linux-image

When installing linux-modules package directly, it will not bring a linux-image
package as a dependency. linux-modules-extra, on the other hand, depend on a
linux-image package.

Make the linux-modules package depend on either the linux-image or the
linux-image-unsigned package.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: [Packaging] insertchanges: avoid double newline
Thadeu Lima de Souza Cascardo [Thu, 5 Nov 2020 16:16:00 +0000 (17:16 +0100)]
UBUNTU: [Packaging] insertchanges: avoid double newline

BugLink: https://bugs.launchpad.net/bugs/1903293
When some changes have been already added to the changelog, like when using
insert-ubuntu-changes, and there are no other changes, we end up with two
newlines right after the stanza header.

Add a $skip_newline variable that allows us to skip that extra newline when
there are no other changes.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Andrea Righi <andrea.righi@canonical.com>
Acked-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Ubuntu-5.10-5.10.0-5.6
Andrea Righi [Mon, 23 Nov 2020 12:17:45 +0000 (13:17 +0100)]
UBUNTU: Ubuntu-5.10-5.10.0-5.6

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: [Config] add CONFIG_INFINIBAND_VIRT_DMA
Andrea Righi [Mon, 23 Nov 2020 07:43:31 +0000 (08:43 +0100)]
UBUNTU: [Config] add CONFIG_INFINIBAND_VIRT_DMA

Add CONFIG_INFINIBAND_VIRT_DMA, introduced after rebasing to 5.10-rc5.

NOTE: this config option can only be enabled if CONFIG_HIGHMEM is not
set and that is false in armhf, so it needs to be disabled in this
specific architecture.

As a consequence the following dependent config options are also
disabled (on armhf only):

 - CONFIG_RDMA_RXE
 - CONFIG_RDMA_SIW

This shouldn't be a problem, since these options are used by infiniband,
that is unlikely to be used with armhf.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Rebase to v5.10-rc5
Andrea Righi [Mon, 23 Nov 2020 07:32:42 +0000 (08:32 +0100)]
UBUNTU: Rebase to v5.10-rc5

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Start new release
Andrea Righi [Mon, 23 Nov 2020 07:32:13 +0000 (08:32 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Ubuntu-5.10-5.10.0-4.5
Andrea Righi [Mon, 16 Nov 2020 07:33:54 +0000 (08:33 +0100)]
UBUNTU: Ubuntu-5.10-5.10.0-4.5

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Rebase to v5.10-rc4
Andrea Righi [Mon, 16 Nov 2020 07:32:19 +0000 (08:32 +0100)]
UBUNTU: Rebase to v5.10-rc4

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Start new release
Andrea Righi [Mon, 16 Nov 2020 07:31:05 +0000 (08:31 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: update dkms package versions
Andrea Righi [Mon, 16 Nov 2020 07:21:02 +0000 (08:21 +0100)]
UBUNTU: update dkms package versions

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: [Packaging] reduce the size required to build packages
Andrea Righi [Thu, 24 Sep 2020 12:49:32 +0000 (14:49 +0200)]
UBUNTU: [Packaging] reduce the size required to build packages

During the build we are removing flavor build directory, but this is not
applied until the end of the binary-% rule. This is too late as we have
to build, install, and generate dbgsyms for all flavors before this
triggers.

Removing the flavor build directory at the end of the install-% phase
allows to free up some space in advance and use less space overall to
build the packages.

Suggested-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Ubuntu-5.10-5.10.0-3.4
Andrea Righi [Mon, 9 Nov 2020 08:37:08 +0000 (09:37 +0100)]
UBUNTU: Ubuntu-5.10-5.10.0-3.4

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: [Config] re-enable ZFS
Andrea Righi [Mon, 9 Nov 2020 08:36:09 +0000 (09:36 +0100)]
UBUNTU: [Config] re-enable ZFS

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: [Config] update modules files
Andrea Righi [Mon, 9 Nov 2020 08:12:59 +0000 (09:12 +0100)]
UBUNTU: [Config] update modules files

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: [Config] drop obsolete SND_SST_IPC options
Andrea Righi [Mon, 9 Nov 2020 07:30:04 +0000 (08:30 +0100)]
UBUNTU: [Config] drop obsolete SND_SST_IPC options

The following upstream commit removes SND_SST_IPC and its _PCI and _ACPI
variants:

 1849a3872f035494639201fdefb394425233647b ("ASoC: Intel: atom: Remove duplicate kconfigs")

Update master config accordingly.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: [Config] update CONFIG_MST_IRQ after rebase to 5.10-rc3
Andrea Righi [Mon, 9 Nov 2020 07:27:44 +0000 (08:27 +0100)]
UBUNTU: [Config] update CONFIG_MST_IRQ after rebase to 5.10-rc3

This option is automatically disabled in all architectures, except for
arm64 and armhf.

Apply this change and make sure to update the annotations file
accordingly.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
3 years agoUBUNTU: Rebase to v5.10-rc3
Andrea Righi [Mon, 9 Nov 2020 07:21:52 +0000 (08:21 +0100)]
UBUNTU: Rebase to v5.10-rc3

Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>