Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/odroid-5.4.y' into sbc-5.4.y
Browse files Browse the repository at this point in the history
  • Loading branch information
scpcom committed Dec 26, 2021
2 parents 9de8c20 + 3e5573e commit e3f7236
Show file tree
Hide file tree
Showing 138 changed files with 1,975 additions and 494 deletions.
8 changes: 8 additions & 0 deletions Documentation/devicetree/bindings/net/ethernet-phy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ properties:
compensate for the board being designed with the lanes
swapped.

enet-phy-lane-no-swap:
$ref: /schemas/types.yaml#/definitions/flag
description:
If set, indicates that PHY will disable swap of the
TX/RX lanes. This property allows the PHY to work correcly after
e.g. wrong bootstrap configuration caused by issues in PCB
layout design.

eee-broken-100tx:
$ref: /schemas/types.yaml#definitions/flag
description:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 164
SUBLEVEL = 167
EXTRAVERSION =
NAME = Kleptomaniac Octopus

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/overlays/hktft-cs-ogst.dts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
bpp = <16>;
reset-gpios = <&gpx1 5 GPIO_ACTIVE_HIGH>;
dc-gpios = <&gpx1 6 GPIO_ACTIVE_HIGH>;
led-gpios = <&gpx1 2 GPIO_ACTIVE_HIGH>;
led-gpios = <&gpx1 2 GPIO_ACTIVE_LOW>;
debug = <0>;

hktft_cs_ogst_pins: hktft_cs_ogst_pins {
Expand Down
37 changes: 25 additions & 12 deletions arch/arm/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,22 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max_low,
int pfn_valid(unsigned long pfn)
{
phys_addr_t addr = __pfn_to_phys(pfn);
unsigned long pageblock_size = PAGE_SIZE * pageblock_nr_pages;

if (__phys_to_pfn(addr) != pfn)
return 0;

return memblock_is_map_memory(__pfn_to_phys(pfn));
/*
* If address less than pageblock_size bytes away from a present
* memory chunk there still will be a memory map entry for it
* because we round freed memory map to the pageblock boundaries.
*/
if (memblock_overlaps_region(&memblock.memory,
ALIGN_DOWN(addr, pageblock_size),
pageblock_size))
return 1;

return 0;
}
EXPORT_SYMBOL(pfn_valid);
#endif
Expand Down Expand Up @@ -371,14 +382,14 @@ static void __init free_unused_memmap(void)
*/
start = min(start,
ALIGN(prev_end, PAGES_PER_SECTION));
#else
#endif
/*
* Align down here since the VM subsystem insists that the
* memmap entries are valid from the bank start aligned to
* MAX_ORDER_NR_PAGES.
* Align down here since many operations in VM subsystem
* presume that there are no holes in the memory map inside
* a pageblock
*/
start = round_down(start, MAX_ORDER_NR_PAGES);
#endif
start = round_down(start, pageblock_nr_pages);

/*
* If we had a previous bank, and there is a space
* between the current bank and the previous, free it.
Expand All @@ -387,18 +398,20 @@ static void __init free_unused_memmap(void)
free_memmap(prev_end, start);

/*
* Align up here since the VM subsystem insists that the
* memmap entries are valid from the bank end aligned to
* MAX_ORDER_NR_PAGES.
* Align up here since many operations in VM subsystem
* presume that there are no holes in the memory map inside
* a pageblock
*/
prev_end = ALIGN(memblock_region_memory_end_pfn(reg),
MAX_ORDER_NR_PAGES);
pageblock_nr_pages);
}

#ifdef CONFIG_SPARSEMEM
if (!IS_ALIGNED(prev_end, PAGES_PER_SECTION))
if (!IS_ALIGNED(prev_end, PAGES_PER_SECTION)) {
prev_end = ALIGN(prev_end, pageblock_nr_pages);
free_memmap(prev_end,
ALIGN(prev_end, PAGES_PER_SECTION));
}
#endif
}

Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/vmalloc.h>
#include <linux/io.h>
#include <linux/sizes.h>
#include <linux/memblock.h>

#include <asm/cp15.h>
#include <asm/cputype.h>
Expand Down Expand Up @@ -301,7 +302,8 @@ static void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
* Don't allow RAM to be mapped with mismatched attributes - this
* causes problems with ARMv6+
*/
if (WARN_ON(pfn_valid(pfn) && mtype != MT_MEMORY_RW))
if (WARN_ON(memblock_is_map_memory(PFN_PHYS(pfn)) &&
mtype != MT_MEMORY_RW))
return NULL;

area = get_vm_area_caller(size, VM_IOREMAP, caller);
Expand Down
1 change: 1 addition & 0 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1990,6 +1990,7 @@ config EFI
depends on ACPI
select UCS2_STRING
select EFI_RUNTIME_WRAPPERS
select ARCH_USE_MEMREMAP_PROT
---help---
This enables the kernel to use EFI runtime services that are
available (such as the EFI variable services).
Expand Down
7 changes: 5 additions & 2 deletions arch/x86/kvm/hyperv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1501,18 +1501,21 @@ static u64 kvm_hv_send_ipi(struct kvm_vcpu *current_vcpu, u64 ingpa, u64 outgpa,

all_cpus = send_ipi_ex.vp_set.format == HV_GENERIC_SET_ALL;

if (all_cpus)
goto check_and_send_ipi;

if (!sparse_banks_len)
goto ret_success;

if (!all_cpus &&
kvm_read_guest(kvm,
if (kvm_read_guest(kvm,
ingpa + offsetof(struct hv_send_ipi_ex,
vp_set.bank_contents),
sparse_banks,
sparse_banks_len))
return HV_STATUS_INVALID_HYPERCALL_INPUT;
}

check_and_send_ipi:
if ((vector < HV_IPI_LOW_VECTOR) || (vector > HV_IPI_HIGH_VECTOR))
return HV_STATUS_INVALID_HYPERCALL_INPUT;

Expand Down
3 changes: 2 additions & 1 deletion arch/x86/platform/efi/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size)
return;
}

new = early_memremap(new_phys, new_size);
new = early_memremap_prot(new_phys, new_size,
pgprot_val(pgprot_encrypted(FIXMAP_PAGE_NORMAL)));
if (!new) {
pr_err("Failed to map new boot services memmap\n");
return;
Expand Down
3 changes: 3 additions & 0 deletions block/ioprio.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ SYSCALL_DEFINE2(ioprio_get, int, which, int, who)
pgrp = task_pgrp(current);
else
pgrp = find_vpid(who);
read_lock(&tasklist_lock);
do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
tmpio = get_task_ioprio(p);
if (tmpio < 0)
Expand All @@ -216,6 +217,8 @@ SYSCALL_DEFINE2(ioprio_get, int, which, int, who)
else
ret = ioprio_best(ret, tmpio);
} while_each_pid_thread(pgrp, PIDTYPE_PGID, p);
read_unlock(&tasklist_lock);

break;
case IOPRIO_WHO_USER:
uid = make_kuid(current_user_ns(), who);
Expand Down
21 changes: 9 additions & 12 deletions drivers/android/binder.c
Original file line number Diff line number Diff line change
Expand Up @@ -4788,23 +4788,20 @@ static int binder_thread_release(struct binder_proc *proc,
__release(&t->lock);

/*
* If this thread used poll, make sure we remove the waitqueue
* from any epoll data structures holding it with POLLFREE.
* waitqueue_active() is safe to use here because we're holding
* the inner lock.
* If this thread used poll, make sure we remove the waitqueue from any
* poll data structures holding it.
*/
if ((thread->looper & BINDER_LOOPER_STATE_POLL) &&
waitqueue_active(&thread->wait)) {
wake_up_poll(&thread->wait, EPOLLHUP | POLLFREE);
}
if (thread->looper & BINDER_LOOPER_STATE_POLL)
wake_up_pollfree(&thread->wait);

binder_inner_proc_unlock(thread->proc);

/*
* This is needed to avoid races between wake_up_poll() above and
* and ep_remove_waitqueue() called for other reasons (eg the epoll file
* descriptor being closed); ep_remove_waitqueue() holds an RCU read
* lock, so we can be sure it's done after calling synchronize_rcu().
* This is needed to avoid races between wake_up_pollfree() above and
* someone else removing the last entry from the queue for other reasons
* (e.g. ep_remove_wait_queue() being called due to an epoll file
* descriptor being closed). Such other users hold an RCU read lock, so
* we can be sure they're done after we call synchronize_rcu().
*/
if (thread->looper & BINDER_LOOPER_STATE_POLL)
synchronize_rcu();
Expand Down
2 changes: 2 additions & 0 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4437,6 +4437,8 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "VRFDFC22048UCHC-TE*", NULL, ATA_HORKAGE_NODMA },
/* Odd clown on sil3726/4726 PMPs */
{ "Config Disk", NULL, ATA_HORKAGE_DISABLE },
/* Similar story with ASMedia 1092 */
{ "ASMT109x- Config", NULL, ATA_HORKAGE_DISABLE },

/* Weird ATAPI devices */
{ "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 },
Expand Down
6 changes: 3 additions & 3 deletions drivers/char/agp/parisc-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ agp_ioc_init(void __iomem *ioc_regs)
return 0;
}

static int
static int __init
lba_find_capability(int cap)
{
struct _parisc_agp_info *info = &parisc_agp_info;
Expand Down Expand Up @@ -366,7 +366,7 @@ parisc_agp_setup(void __iomem *ioc_hpa, void __iomem *lba_hpa)
return error;
}

static int
static int __init
find_quicksilver(struct device *dev, void *data)
{
struct parisc_device **lba = data;
Expand All @@ -378,7 +378,7 @@ find_quicksilver(struct device *dev, void *data)
return 0;
}

static int
static int __init
parisc_agp_init(void)
{
extern struct sba_device *sba_list;
Expand Down
2 changes: 1 addition & 1 deletion drivers/clk/qcom/clk-regmap-mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static u8 mux_get_parent(struct clk_hw *hw)
val &= mask;

if (mux->parent_map)
return qcom_find_src_index(hw, mux->parent_map, val);
return qcom_find_cfg_index(hw, mux->parent_map, val);

return val;
}
Expand Down
12 changes: 12 additions & 0 deletions drivers/clk/qcom/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@ int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map, u8 src)
}
EXPORT_SYMBOL_GPL(qcom_find_src_index);

int qcom_find_cfg_index(struct clk_hw *hw, const struct parent_map *map, u8 cfg)
{
int i, num_parents = clk_hw_get_num_parents(hw);

for (i = 0; i < num_parents; i++)
if (cfg == map[i].cfg)
return i;

return -ENOENT;
}
EXPORT_SYMBOL_GPL(qcom_find_cfg_index);

struct regmap *
qcom_cc_map(struct platform_device *pdev, const struct qcom_cc_desc *desc)
{
Expand Down
2 changes: 2 additions & 0 deletions drivers/clk/qcom/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ extern void
qcom_pll_set_fsm_mode(struct regmap *m, u32 reg, u8 bias_count, u8 lock_count);
extern int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map,
u8 src);
extern int qcom_find_cfg_index(struct clk_hw *hw, const struct parent_map *map,
u8 cfg);

extern int qcom_cc_register_board_clk(struct device *dev, const char *path,
const char *name, unsigned long rate);
Expand Down
8 changes: 8 additions & 0 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,14 @@ int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name)
ret = -EINVAL;
goto cleanup;
}

if ((aconn->base.connector_type != DRM_MODE_CONNECTOR_DisplayPort) &&
(aconn->base.connector_type != DRM_MODE_CONNECTOR_eDP)) {
DRM_DEBUG_DRIVER("No DP connector available for CRC source\n");
ret = -EINVAL;
goto cleanup;
}

}

if (amdgpu_dm_crtc_configure_crc_source(crtc, crtc_state, source)) {
Expand Down
4 changes: 4 additions & 0 deletions drivers/gpu/drm/amd/display/dc/core/dc_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -1546,6 +1546,10 @@ bool dc_is_stream_unchanged(
if (old_stream->ignore_msa_timing_param != stream->ignore_msa_timing_param)
return false;

// Only Have Audio left to check whether it is same or not. This is a corner case for Tiled sinks
if (old_stream->audio_info.mode_count != stream->audio_info.mode_count)
return false;

return true;
}

Expand Down
11 changes: 10 additions & 1 deletion drivers/gpu/drm/drm_syncobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,17 @@ int drm_syncobj_find_fence(struct drm_file *file_private,

if (*fence) {
ret = dma_fence_chain_find_seqno(fence, point);
if (!ret)
if (!ret) {
/* If the requested seqno is already signaled
* drm_syncobj_find_fence may return a NULL
* fence. To make sure the recipient gets
* signalled, use a new fence instead.
*/
if (!*fence)
*fence = dma_fence_get_stub();

goto out;
}
dma_fence_put(*fence);
} else {
ret = -EINVAL;
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/msm/dsi/dsi_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -1669,6 +1669,8 @@ static int dsi_host_parse_lane_data(struct msm_dsi_host *msm_host,
if (!prop) {
DRM_DEV_DEBUG(dev,
"failed to find data lane mapping, using default\n");
/* Set the number of date lanes to 4 by default. */
msm_host->num_data_lanes = 4;
return 0;
}

Expand Down
10 changes: 5 additions & 5 deletions drivers/hid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@ config HID_CHERRY

config HID_CHICONY
tristate "Chicony devices"
depends on HID
depends on USB_HID
default !EXPERT
---help---
Support for Chicony Tactical pad and special keys on Chicony keyboards.

config HID_CORSAIR
tristate "Corsair devices"
depends on HID && USB && LEDS_CLASS
depends on USB_HID && LEDS_CLASS
---help---
Support for Corsair devices that are not fully compliant with the
HID standard.
Expand Down Expand Up @@ -244,7 +244,7 @@ config HID_MACALLY

config HID_PRODIKEYS
tristate "Prodikeys PC-MIDI Keyboard support"
depends on HID && SND
depends on USB_HID && SND
select SND_RAWMIDI
---help---
Support for Prodikeys PC-MIDI Keyboard device support.
Expand Down Expand Up @@ -524,7 +524,7 @@ config HID_LENOVO

config HID_LOGITECH
tristate "Logitech devices"
depends on HID
depends on USB_HID
default !EXPERT
---help---
Support for Logitech devices that are not fully compliant with HID standard.
Expand Down Expand Up @@ -871,7 +871,7 @@ config HID_SAITEK

config HID_SAMSUNG
tristate "Samsung InfraRed remote control or keyboards"
depends on HID
depends on USB_HID
---help---
Support for Samsung InfraRed remote control or keyboards.

Expand Down
2 changes: 1 addition & 1 deletion drivers/hid/hid-asus.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
if (drvdata->quirks & QUIRK_IS_MULTITOUCH)
drvdata->tp = &asus_i2c_tp;

if (drvdata->quirks & QUIRK_T100_KEYBOARD) {
if ((drvdata->quirks & QUIRK_T100_KEYBOARD) && hid_is_usb(hdev)) {
struct usb_interface *intf = to_usb_interface(hdev->dev.parent);

if (intf->altsetting->desc.bInterfaceNumber == T100_TPAD_INTF) {
Expand Down
Loading

0 comments on commit e3f7236

Please sign in to comment.