Skip to content

Commit e3f7236

Browse files
committed
Merge remote-tracking branch 'origin/odroid-5.4.y' into sbc-5.4.y
2 parents 9de8c20 + 3e5573e commit e3f7236

File tree

138 files changed

+1975
-494
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+1975
-494
lines changed

Documentation/devicetree/bindings/net/ethernet-phy.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ properties:
8787
compensate for the board being designed with the lanes
8888
swapped.
8989

90+
enet-phy-lane-no-swap:
91+
$ref: /schemas/types.yaml#/definitions/flag
92+
description:
93+
If set, indicates that PHY will disable swap of the
94+
TX/RX lanes. This property allows the PHY to work correcly after
95+
e.g. wrong bootstrap configuration caused by issues in PCB
96+
layout design.
97+
9098
eee-broken-100tx:
9199
$ref: /schemas/types.yaml#definitions/flag
92100
description:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 5
33
PATCHLEVEL = 4
4-
SUBLEVEL = 164
4+
SUBLEVEL = 167
55
EXTRAVERSION =
66
NAME = Kleptomaniac Octopus
77

arch/arm/boot/dts/overlays/hktft-cs-ogst.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
bpp = <16>;
3030
reset-gpios = <&gpx1 5 GPIO_ACTIVE_HIGH>;
3131
dc-gpios = <&gpx1 6 GPIO_ACTIVE_HIGH>;
32-
led-gpios = <&gpx1 2 GPIO_ACTIVE_HIGH>;
32+
led-gpios = <&gpx1 2 GPIO_ACTIVE_LOW>;
3333
debug = <0>;
3434

3535
hktft_cs_ogst_pins: hktft_cs_ogst_pins {

arch/arm/mm/init.c

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,22 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max_low,
176176
int pfn_valid(unsigned long pfn)
177177
{
178178
phys_addr_t addr = __pfn_to_phys(pfn);
179+
unsigned long pageblock_size = PAGE_SIZE * pageblock_nr_pages;
179180

180181
if (__phys_to_pfn(addr) != pfn)
181182
return 0;
182183

183-
return memblock_is_map_memory(__pfn_to_phys(pfn));
184+
/*
185+
* If address less than pageblock_size bytes away from a present
186+
* memory chunk there still will be a memory map entry for it
187+
* because we round freed memory map to the pageblock boundaries.
188+
*/
189+
if (memblock_overlaps_region(&memblock.memory,
190+
ALIGN_DOWN(addr, pageblock_size),
191+
pageblock_size))
192+
return 1;
193+
194+
return 0;
184195
}
185196
EXPORT_SYMBOL(pfn_valid);
186197
#endif
@@ -371,14 +382,14 @@ static void __init free_unused_memmap(void)
371382
*/
372383
start = min(start,
373384
ALIGN(prev_end, PAGES_PER_SECTION));
374-
#else
385+
#endif
375386
/*
376-
* Align down here since the VM subsystem insists that the
377-
* memmap entries are valid from the bank start aligned to
378-
* MAX_ORDER_NR_PAGES.
387+
* Align down here since many operations in VM subsystem
388+
* presume that there are no holes in the memory map inside
389+
* a pageblock
379390
*/
380-
start = round_down(start, MAX_ORDER_NR_PAGES);
381-
#endif
391+
start = round_down(start, pageblock_nr_pages);
392+
382393
/*
383394
* If we had a previous bank, and there is a space
384395
* between the current bank and the previous, free it.
@@ -387,18 +398,20 @@ static void __init free_unused_memmap(void)
387398
free_memmap(prev_end, start);
388399

389400
/*
390-
* Align up here since the VM subsystem insists that the
391-
* memmap entries are valid from the bank end aligned to
392-
* MAX_ORDER_NR_PAGES.
401+
* Align up here since many operations in VM subsystem
402+
* presume that there are no holes in the memory map inside
403+
* a pageblock
393404
*/
394405
prev_end = ALIGN(memblock_region_memory_end_pfn(reg),
395-
MAX_ORDER_NR_PAGES);
406+
pageblock_nr_pages);
396407
}
397408

398409
#ifdef CONFIG_SPARSEMEM
399-
if (!IS_ALIGNED(prev_end, PAGES_PER_SECTION))
410+
if (!IS_ALIGNED(prev_end, PAGES_PER_SECTION)) {
411+
prev_end = ALIGN(prev_end, pageblock_nr_pages);
400412
free_memmap(prev_end,
401413
ALIGN(prev_end, PAGES_PER_SECTION));
414+
}
402415
#endif
403416
}
404417

arch/arm/mm/ioremap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <linux/vmalloc.h>
2828
#include <linux/io.h>
2929
#include <linux/sizes.h>
30+
#include <linux/memblock.h>
3031

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

307309
area = get_vm_area_caller(size, VM_IOREMAP, caller);

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,6 +1990,7 @@ config EFI
19901990
depends on ACPI
19911991
select UCS2_STRING
19921992
select EFI_RUNTIME_WRAPPERS
1993+
select ARCH_USE_MEMREMAP_PROT
19931994
---help---
19941995
This enables the kernel to use EFI runtime services that are
19951996
available (such as the EFI variable services).

arch/x86/kvm/hyperv.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,18 +1501,21 @@ static u64 kvm_hv_send_ipi(struct kvm_vcpu *current_vcpu, u64 ingpa, u64 outgpa,
15011501

15021502
all_cpus = send_ipi_ex.vp_set.format == HV_GENERIC_SET_ALL;
15031503

1504+
if (all_cpus)
1505+
goto check_and_send_ipi;
1506+
15041507
if (!sparse_banks_len)
15051508
goto ret_success;
15061509

1507-
if (!all_cpus &&
1508-
kvm_read_guest(kvm,
1510+
if (kvm_read_guest(kvm,
15091511
ingpa + offsetof(struct hv_send_ipi_ex,
15101512
vp_set.bank_contents),
15111513
sparse_banks,
15121514
sparse_banks_len))
15131515
return HV_STATUS_INVALID_HYPERCALL_INPUT;
15141516
}
15151517

1518+
check_and_send_ipi:
15161519
if ((vector < HV_IPI_LOW_VECTOR) || (vector > HV_IPI_HIGH_VECTOR))
15171520
return HV_STATUS_INVALID_HYPERCALL_INPUT;
15181521

arch/x86/platform/efi/quirks.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size)
279279
return;
280280
}
281281

282-
new = early_memremap(new_phys, new_size);
282+
new = early_memremap_prot(new_phys, new_size,
283+
pgprot_val(pgprot_encrypted(FIXMAP_PAGE_NORMAL)));
283284
if (!new) {
284285
pr_err("Failed to map new boot services memmap\n");
285286
return;

block/ioprio.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ SYSCALL_DEFINE2(ioprio_get, int, which, int, who)
207207
pgrp = task_pgrp(current);
208208
else
209209
pgrp = find_vpid(who);
210+
read_lock(&tasklist_lock);
210211
do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
211212
tmpio = get_task_ioprio(p);
212213
if (tmpio < 0)
@@ -216,6 +217,8 @@ SYSCALL_DEFINE2(ioprio_get, int, which, int, who)
216217
else
217218
ret = ioprio_best(ret, tmpio);
218219
} while_each_pid_thread(pgrp, PIDTYPE_PGID, p);
220+
read_unlock(&tasklist_lock);
221+
219222
break;
220223
case IOPRIO_WHO_USER:
221224
uid = make_kuid(current_user_ns(), who);

drivers/android/binder.c

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4788,23 +4788,20 @@ static int binder_thread_release(struct binder_proc *proc,
47884788
__release(&t->lock);
47894789

47904790
/*
4791-
* If this thread used poll, make sure we remove the waitqueue
4792-
* from any epoll data structures holding it with POLLFREE.
4793-
* waitqueue_active() is safe to use here because we're holding
4794-
* the inner lock.
4791+
* If this thread used poll, make sure we remove the waitqueue from any
4792+
* poll data structures holding it.
47954793
*/
4796-
if ((thread->looper & BINDER_LOOPER_STATE_POLL) &&
4797-
waitqueue_active(&thread->wait)) {
4798-
wake_up_poll(&thread->wait, EPOLLHUP | POLLFREE);
4799-
}
4794+
if (thread->looper & BINDER_LOOPER_STATE_POLL)
4795+
wake_up_pollfree(&thread->wait);
48004796

48014797
binder_inner_proc_unlock(thread->proc);
48024798

48034799
/*
4804-
* This is needed to avoid races between wake_up_poll() above and
4805-
* and ep_remove_waitqueue() called for other reasons (eg the epoll file
4806-
* descriptor being closed); ep_remove_waitqueue() holds an RCU read
4807-
* lock, so we can be sure it's done after calling synchronize_rcu().
4800+
* This is needed to avoid races between wake_up_pollfree() above and
4801+
* someone else removing the last entry from the queue for other reasons
4802+
* (e.g. ep_remove_wait_queue() being called due to an epoll file
4803+
* descriptor being closed). Such other users hold an RCU read lock, so
4804+
* we can be sure they're done after we call synchronize_rcu().
48084805
*/
48094806
if (thread->looper & BINDER_LOOPER_STATE_POLL)
48104807
synchronize_rcu();

0 commit comments

Comments
 (0)