You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
Merge "Merge 5.10.201 into android12-5.10-lts" into android12-5.10-lts
This commit is contained in:
@@ -70,6 +70,9 @@ Instead, the 2-factor form of the allocator should be used::
|
||||
|
||||
foo = kmalloc_array(count, size, GFP_KERNEL);
|
||||
|
||||
Specifically, kmalloc() can be replaced with kmalloc_array(), and
|
||||
kzalloc() can be replaced with kcalloc().
|
||||
|
||||
If no 2-factor form is available, the saturate-on-overflow helpers should
|
||||
be used::
|
||||
|
||||
@@ -90,9 +93,20 @@ Instead, use the helper::
|
||||
array usage and switch to a `flexible array member
|
||||
<#zero-length-and-one-element-arrays>`_ instead.
|
||||
|
||||
See array_size(), array3_size(), and struct_size(),
|
||||
for more details as well as the related check_add_overflow() and
|
||||
check_mul_overflow() family of functions.
|
||||
For other calculations, please compose the use of the size_mul(),
|
||||
size_add(), and size_sub() helpers. For example, in the case of::
|
||||
|
||||
foo = krealloc(current_size + chunk_size * (count - 3), GFP_KERNEL);
|
||||
|
||||
Instead, use the helpers::
|
||||
|
||||
foo = krealloc(size_add(current_size,
|
||||
size_mul(chunk_size,
|
||||
size_sub(count, 3))), GFP_KERNEL);
|
||||
|
||||
For more details, also see array3_size() and flex_array_size(),
|
||||
as well as the related check_mul_overflow(), check_add_overflow(),
|
||||
check_sub_overflow(), and check_shl_overflow() family of functions.
|
||||
|
||||
simple_strtol(), simple_strtoll(), simple_strtoul(), simple_strtoull()
|
||||
----------------------------------------------------------------------
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 200
|
||||
SUBLEVEL = 201
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
||||
@@ -82,14 +82,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
regulators {
|
||||
vsdcc_fixed: vsdcc-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "SDCC Power";
|
||||
regulator-min-microvolt = <2700000>;
|
||||
regulator-max-microvolt = <2700000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
vsdcc_fixed: vsdcc-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "SDCC Power";
|
||||
regulator-min-microvolt = <2700000>;
|
||||
regulator-max-microvolt = <2700000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
soc: soc {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
ENTRY(mmioset)
|
||||
ENTRY(memset)
|
||||
UNWIND( .fnstart )
|
||||
and r1, r1, #255 @ cast to unsigned char
|
||||
ands r3, r0, #3 @ 1 unaligned?
|
||||
mov ip, r0 @ preserve r0 as return value
|
||||
bne 6f @ 1
|
||||
|
||||
@@ -159,9 +159,6 @@ static int xen_starting_cpu(unsigned int cpu)
|
||||
BUG_ON(err);
|
||||
per_cpu(xen_vcpu, cpu) = vcpup;
|
||||
|
||||
if (!xen_kernel_unmapped_at_usr())
|
||||
xen_setup_runstate_info(cpu);
|
||||
|
||||
after_register_vcpu_info:
|
||||
enable_percpu_irq(xen_events_irq, 0);
|
||||
return 0;
|
||||
@@ -394,9 +391,6 @@ static int __init xen_guest_init(void)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!xen_kernel_unmapped_at_usr())
|
||||
xen_time_setup_guest();
|
||||
|
||||
if (xen_initial_domain())
|
||||
pvclock_gtod_register_notifier(&xen_pvclock_gtod_notifier);
|
||||
|
||||
@@ -406,7 +400,13 @@ static int __init xen_guest_init(void)
|
||||
}
|
||||
early_initcall(xen_guest_init);
|
||||
|
||||
static int __init xen_pm_init(void)
|
||||
static int xen_starting_runstate_cpu(unsigned int cpu)
|
||||
{
|
||||
xen_setup_runstate_info(cpu);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init xen_late_init(void)
|
||||
{
|
||||
if (!xen_domain())
|
||||
return -ENODEV;
|
||||
@@ -419,9 +419,16 @@ static int __init xen_pm_init(void)
|
||||
do_settimeofday64(&ts);
|
||||
}
|
||||
|
||||
return 0;
|
||||
if (xen_kernel_unmapped_at_usr())
|
||||
return 0;
|
||||
|
||||
xen_time_setup_guest();
|
||||
|
||||
return cpuhp_setup_state(CPUHP_AP_ARM_XEN_RUNSTATE_STARTING,
|
||||
"arm/xen_runstate:starting",
|
||||
xen_starting_runstate_cpu, NULL);
|
||||
}
|
||||
late_initcall(xen_pm_init);
|
||||
late_initcall(xen_late_init);
|
||||
|
||||
|
||||
/* empty stubs */
|
||||
|
||||
@@ -1175,7 +1175,7 @@
|
||||
#size-cells = <1>;
|
||||
#iommu-cells = <1>;
|
||||
compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
|
||||
ranges = <0 0x01e20000 0x40000>;
|
||||
ranges = <0 0x01e20000 0x20000>;
|
||||
reg = <0x01ef0000 0x3000>;
|
||||
clocks = <&gcc GCC_SMMU_CFG_CLK>,
|
||||
<&gcc GCC_APSS_TCU_CLK>;
|
||||
|
||||
@@ -564,6 +564,8 @@
|
||||
vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
|
||||
vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
|
||||
vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
|
||||
|
||||
qcom,snoc-host-cap-8bit-quirk;
|
||||
};
|
||||
|
||||
/* PINCTRL - additions to nodes defined in sdm845.dtsi */
|
||||
|
||||
@@ -69,9 +69,6 @@
|
||||
|
||||
#define _PTE_NONE_MASK 0
|
||||
|
||||
/* Until my rework is finished, 40x still needs atomic PTE updates */
|
||||
#define PTE_ATOMIC_UPDATES 1
|
||||
|
||||
#define _PAGE_BASE_NC (_PAGE_PRESENT | _PAGE_ACCESSED)
|
||||
#define _PAGE_BASE (_PAGE_BASE_NC)
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ static int trace_imc_mem_size;
|
||||
* core and trace-imc
|
||||
*/
|
||||
static struct imc_pmu_ref imc_global_refc = {
|
||||
.lock = __SPIN_LOCK_INITIALIZER(imc_global_refc.lock),
|
||||
.lock = __SPIN_LOCK_UNLOCKED(imc_global_refc.lock),
|
||||
.id = 0,
|
||||
.refc = 0,
|
||||
};
|
||||
|
||||
@@ -523,8 +523,10 @@ static ssize_t vcpudispatch_stats_write(struct file *file, const char __user *p,
|
||||
|
||||
if (cmd) {
|
||||
rc = init_cpu_associativity();
|
||||
if (rc)
|
||||
if (rc) {
|
||||
destroy_cpu_associativity();
|
||||
goto out;
|
||||
}
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
disp = per_cpu_ptr(&vcpu_disp_data, cpu);
|
||||
|
||||
@@ -779,7 +779,7 @@ int xive_native_get_queue_info(u32 vp_id, u32 prio,
|
||||
if (out_qpage)
|
||||
*out_qpage = be64_to_cpu(qpage);
|
||||
if (out_qsize)
|
||||
*out_qsize = be32_to_cpu(qsize);
|
||||
*out_qsize = be64_to_cpu(qsize);
|
||||
if (out_qeoi_page)
|
||||
*out_qeoi_page = be64_to_cpu(qeoi_page);
|
||||
if (out_escalate_irq)
|
||||
|
||||
@@ -25,6 +25,17 @@ config STACK_DEBUG
|
||||
every function call and will therefore incur a major
|
||||
performance hit. Most users should say N.
|
||||
|
||||
config EARLY_PRINTK
|
||||
bool "Early printk"
|
||||
depends on SH_STANDARD_BIOS
|
||||
help
|
||||
Say Y here to redirect kernel printk messages to the serial port
|
||||
used by the SH-IPL bootloader, starting very early in the boot
|
||||
process and ending when the kernel's serial console is initialised.
|
||||
This option is only useful while porting the kernel to a new machine,
|
||||
when the kernel may crash or hang before the serial console is
|
||||
initialised. If unsure, say N.
|
||||
|
||||
config 4KSTACKS
|
||||
bool "Use 4Kb for kernel stacks instead of 8Kb"
|
||||
depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB
|
||||
|
||||
@@ -1360,20 +1360,10 @@ static void pt_addr_filters_fini(struct perf_event *event)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
static u64 canonical_address(u64 vaddr, u8 vaddr_bits)
|
||||
{
|
||||
return ((s64)vaddr << (64 - vaddr_bits)) >> (64 - vaddr_bits);
|
||||
}
|
||||
|
||||
static u64 is_canonical_address(u64 vaddr, u8 vaddr_bits)
|
||||
{
|
||||
return canonical_address(vaddr, vaddr_bits) == vaddr;
|
||||
}
|
||||
|
||||
/* Clamp to a canonical address greater-than-or-equal-to the address given */
|
||||
static u64 clamp_to_ge_canonical_addr(u64 vaddr, u8 vaddr_bits)
|
||||
{
|
||||
return is_canonical_address(vaddr, vaddr_bits) ?
|
||||
return __is_canonical_address(vaddr, vaddr_bits) ?
|
||||
vaddr :
|
||||
-BIT_ULL(vaddr_bits - 1);
|
||||
}
|
||||
@@ -1381,7 +1371,7 @@ static u64 clamp_to_ge_canonical_addr(u64 vaddr, u8 vaddr_bits)
|
||||
/* Clamp to a canonical address less-than-or-equal-to the address given */
|
||||
static u64 clamp_to_le_canonical_addr(u64 vaddr, u8 vaddr_bits)
|
||||
{
|
||||
return is_canonical_address(vaddr, vaddr_bits) ?
|
||||
return __is_canonical_address(vaddr, vaddr_bits) ?
|
||||
vaddr :
|
||||
BIT_ULL(vaddr_bits - 1) - 1;
|
||||
}
|
||||
|
||||
@@ -71,6 +71,16 @@ static inline void copy_user_page(void *to, void *from, unsigned long vaddr,
|
||||
extern bool __virt_addr_valid(unsigned long kaddr);
|
||||
#define virt_addr_valid(kaddr) __virt_addr_valid((unsigned long) (kaddr))
|
||||
|
||||
static __always_inline u64 __canonical_address(u64 vaddr, u8 vaddr_bits)
|
||||
{
|
||||
return ((s64)vaddr << (64 - vaddr_bits)) >> (64 - vaddr_bits);
|
||||
}
|
||||
|
||||
static __always_inline u64 __is_canonical_address(u64 vaddr, u8 vaddr_bits)
|
||||
{
|
||||
return __canonical_address(vaddr, vaddr_bits) == vaddr;
|
||||
}
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
|
||||
@@ -446,7 +446,7 @@ copy_mc_to_kernel(void *to, const void *from, unsigned len);
|
||||
#define copy_mc_to_kernel copy_mc_to_kernel
|
||||
|
||||
unsigned long __must_check
|
||||
copy_mc_to_user(void *to, const void *from, unsigned len);
|
||||
copy_mc_to_user(void __user *to, const void *from, unsigned len);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -2407,7 +2407,7 @@ static void __init srso_select_mitigation(void)
|
||||
pr_info("%s%s\n", srso_strings[srso_mitigation], (has_microcode ? "" : ", no microcode"));
|
||||
|
||||
pred_cmd:
|
||||
if ((boot_cpu_has(X86_FEATURE_SRSO_NO) || srso_cmd == SRSO_CMD_OFF) &&
|
||||
if ((!boot_cpu_has_bug(X86_BUG_SRSO) || srso_cmd == SRSO_CMD_OFF) &&
|
||||
boot_cpu_has(X86_FEATURE_SBPB))
|
||||
x86_pred_cmd = PRED_CMD_SBPB;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ static struct desc_struct startup_gdt[GDT_ENTRIES] = {
|
||||
* while the kernel still uses a direct mapping.
|
||||
*/
|
||||
static struct desc_ptr startup_gdt_descr = {
|
||||
.size = sizeof(startup_gdt),
|
||||
.size = sizeof(startup_gdt)-1,
|
||||
.address = 0,
|
||||
};
|
||||
|
||||
|
||||
@@ -688,7 +688,7 @@ static inline u8 ctxt_virt_addr_bits(struct x86_emulate_ctxt *ctxt)
|
||||
static inline bool emul_is_noncanonical_address(u64 la,
|
||||
struct x86_emulate_ctxt *ctxt)
|
||||
{
|
||||
return get_canonical(la, ctxt_virt_addr_bits(ctxt)) != la;
|
||||
return !__is_canonical_address(la, ctxt_virt_addr_bits(ctxt));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -738,7 +738,7 @@ static __always_inline int __linearize(struct x86_emulate_ctxt *ctxt,
|
||||
case X86EMUL_MODE_PROT64:
|
||||
*linear = la;
|
||||
va_bits = ctxt_virt_addr_bits(ctxt);
|
||||
if (get_canonical(la, va_bits) != la)
|
||||
if (!__is_canonical_address(la, va_bits))
|
||||
goto bad;
|
||||
|
||||
*max_size = min_t(u64, ~0u, (1ull << va_bits) - la);
|
||||
|
||||
@@ -1640,7 +1640,7 @@ static int __kvm_set_msr(struct kvm_vcpu *vcpu, u32 index, u64 data,
|
||||
* value, and that something deterministic happens if the guest
|
||||
* invokes 64-bit SYSENTER.
|
||||
*/
|
||||
data = get_canonical(data, vcpu_virt_addr_bits(vcpu));
|
||||
data = __canonical_address(data, vcpu_virt_addr_bits(vcpu));
|
||||
}
|
||||
|
||||
msr.data = data;
|
||||
|
||||
@@ -156,14 +156,9 @@ static inline u8 vcpu_virt_addr_bits(struct kvm_vcpu *vcpu)
|
||||
return kvm_read_cr4_bits(vcpu, X86_CR4_LA57) ? 57 : 48;
|
||||
}
|
||||
|
||||
static inline u64 get_canonical(u64 la, u8 vaddr_bits)
|
||||
{
|
||||
return ((int64_t)la << (64 - vaddr_bits)) >> (64 - vaddr_bits);
|
||||
}
|
||||
|
||||
static inline bool is_noncanonical_address(u64 la, struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return get_canonical(la, vcpu_virt_addr_bits(vcpu)) != la;
|
||||
return !__is_canonical_address(la, vcpu_virt_addr_bits(vcpu));
|
||||
}
|
||||
|
||||
static inline void vcpu_cache_mmio_info(struct kvm_vcpu *vcpu,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user