Skip to content

Commit 91a442e

Browse files
authored
Merge pull request #261 from zandrey/5.4-2.3.x-imx
Update 5.4-2.3.x-imx to v5.4.99
2 parents c789925 + ce0c0d6 commit 91a442e

73 files changed

Lines changed: 665 additions & 320 deletions

File tree

Some content is hidden

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

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 = 98
4+
SUBLEVEL = 99
55
EXTRAVERSION =
66
NAME = Kleptomaniac Octopus
77

arch/arm/boot/dts/lpc32xx.dtsi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,6 @@
329329

330330
clocks = <&xtal_32k>, <&xtal>;
331331
clock-names = "xtal_32k", "xtal";
332-
333-
assigned-clocks = <&clk LPC32XX_CLK_HCLK_PLL>;
334-
assigned-clock-rates = <208000000>;
335332
};
336333
};
337334

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _ARM_KEXEC_INTERNAL_H
3+
#define _ARM_KEXEC_INTERNAL_H
4+
5+
struct kexec_relocate_data {
6+
unsigned long kexec_start_address;
7+
unsigned long kexec_indirection_page;
8+
unsigned long kexec_mach_type;
9+
unsigned long kexec_r2;
10+
};
11+
12+
#endif

arch/arm/kernel/asm-offsets.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/kvm_host.h>
1616
#endif
1717
#include <asm/cacheflush.h>
18+
#include <asm/kexec-internal.h>
1819
#include <asm/glue-df.h>
1920
#include <asm/glue-pf.h>
2021
#include <asm/mach/arch.h>
@@ -190,5 +191,9 @@ int main(void)
190191
DEFINE(MPU_RGN_PRBAR, offsetof(struct mpu_rgn, prbar));
191192
DEFINE(MPU_RGN_PRLAR, offsetof(struct mpu_rgn, prlar));
192193
#endif
194+
DEFINE(KEXEC_START_ADDR, offsetof(struct kexec_relocate_data, kexec_start_address));
195+
DEFINE(KEXEC_INDIR_PAGE, offsetof(struct kexec_relocate_data, kexec_indirection_page));
196+
DEFINE(KEXEC_MACH_TYPE, offsetof(struct kexec_relocate_data, kexec_mach_type));
197+
DEFINE(KEXEC_R2, offsetof(struct kexec_relocate_data, kexec_r2));
193198
return 0;
194199
}

arch/arm/kernel/machine_kexec.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <asm/pgalloc.h>
1616
#include <asm/mmu_context.h>
1717
#include <asm/cacheflush.h>
18+
#include <asm/kexec-internal.h>
1819
#include <asm/fncpy.h>
1920
#include <asm/mach-types.h>
2021
#include <asm/smp_plat.h>
@@ -24,11 +25,6 @@
2425
extern void relocate_new_kernel(void);
2526
extern const unsigned int relocate_new_kernel_size;
2627

27-
extern unsigned long kexec_start_address;
28-
extern unsigned long kexec_indirection_page;
29-
extern unsigned long kexec_mach_type;
30-
extern unsigned long kexec_boot_atags;
31-
3228
static atomic_t waiting_for_crash_ipi;
3329

3430
/*
@@ -161,6 +157,7 @@ void (*kexec_reinit)(void);
161157
void machine_kexec(struct kimage *image)
162158
{
163159
unsigned long page_list, reboot_entry_phys;
160+
struct kexec_relocate_data *data;
164161
void (*reboot_entry)(void);
165162
void *reboot_code_buffer;
166163

@@ -176,18 +173,17 @@ void machine_kexec(struct kimage *image)
176173

177174
reboot_code_buffer = page_address(image->control_code_page);
178175

179-
/* Prepare parameters for reboot_code_buffer*/
180-
set_kernel_text_rw();
181-
kexec_start_address = image->start;
182-
kexec_indirection_page = page_list;
183-
kexec_mach_type = machine_arch_type;
184-
kexec_boot_atags = image->arch.kernel_r2;
185-
186176
/* copy our kernel relocation code to the control code page */
187177
reboot_entry = fncpy(reboot_code_buffer,
188178
&relocate_new_kernel,
189179
relocate_new_kernel_size);
190180

181+
data = reboot_code_buffer + relocate_new_kernel_size;
182+
data->kexec_start_address = image->start;
183+
data->kexec_indirection_page = page_list;
184+
data->kexec_mach_type = machine_arch_type;
185+
data->kexec_r2 = image->arch.kernel_r2;
186+
191187
/* get the identity mapping physical address for the reboot code */
192188
reboot_entry_phys = virt_to_idmap(reboot_entry);
193189

arch/arm/kernel/relocate_kernel.S

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55

66
#include <linux/linkage.h>
77
#include <asm/assembler.h>
8+
#include <asm/asm-offsets.h>
89
#include <asm/kexec.h>
910

1011
.align 3 /* not needed for this code, but keeps fncpy() happy */
1112

1213
ENTRY(relocate_new_kernel)
1314

14-
ldr r0,kexec_indirection_page
15-
ldr r1,kexec_start_address
15+
adr r7, relocate_new_kernel_end
16+
ldr r0, [r7, #KEXEC_INDIR_PAGE]
17+
ldr r1, [r7, #KEXEC_START_ADDR]
1618

1719
/*
1820
* If there is no indirection page (we are doing crashdumps)
@@ -57,34 +59,16 @@ ENTRY(relocate_new_kernel)
5759

5860
2:
5961
/* Jump to relocated kernel */
60-
mov lr,r1
61-
mov r0,#0
62-
ldr r1,kexec_mach_type
63-
ldr r2,kexec_boot_atags
64-
ARM( ret lr )
65-
THUMB( bx lr )
66-
67-
.align
68-
69-
.globl kexec_start_address
70-
kexec_start_address:
71-
.long 0x0
72-
73-
.globl kexec_indirection_page
74-
kexec_indirection_page:
75-
.long 0x0
76-
77-
.globl kexec_mach_type
78-
kexec_mach_type:
79-
.long 0x0
80-
81-
/* phy addr of the atags for the new kernel */
82-
.globl kexec_boot_atags
83-
kexec_boot_atags:
84-
.long 0x0
62+
mov lr, r1
63+
mov r0, #0
64+
ldr r1, [r7, #KEXEC_MACH_TYPE]
65+
ldr r2, [r7, #KEXEC_R2]
66+
ARM( ret lr )
67+
THUMB( bx lr )
8568

8669
ENDPROC(relocate_new_kernel)
8770

71+
.align 3
8872
relocate_new_kernel_end:
8973

9074
.globl relocate_new_kernel_size

arch/arm/kernel/signal.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -694,18 +694,20 @@ struct page *get_signal_page(void)
694694

695695
addr = page_address(page);
696696

697+
/* Poison the entire page */
698+
memset32(addr, __opcode_to_mem_arm(0xe7fddef1),
699+
PAGE_SIZE / sizeof(u32));
700+
697701
/* Give the signal return code some randomness */
698702
offset = 0x200 + (get_random_int() & 0x7fc);
699703
signal_return_offset = offset;
700704

701-
/*
702-
* Copy signal return handlers into the vector page, and
703-
* set sigreturn to be a pointer to these.
704-
*/
705+
/* Copy signal return handlers into the page */
705706
memcpy(addr + offset, sigreturn_codes, sizeof(sigreturn_codes));
706707

707-
ptr = (unsigned long)addr + offset;
708-
flush_icache_range(ptr, ptr + sizeof(sigreturn_codes));
708+
/* Flush out all instructions in this page */
709+
ptr = (unsigned long)addr;
710+
flush_icache_range(ptr, ptr + PAGE_SIZE);
709711

710712
return page;
711713
}

arch/arm/mach-omap2/cpuidle44xx.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
151151
(cx->mpu_logic_state == PWRDM_POWER_OFF);
152152

153153
/* Enter broadcast mode for periodic timers */
154-
tick_broadcast_enable();
154+
RCU_NONIDLE(tick_broadcast_enable());
155155

156156
/* Enter broadcast mode for one-shot timers */
157-
tick_broadcast_enter();
157+
RCU_NONIDLE(tick_broadcast_enter());
158158

159159
/*
160160
* Call idle CPU PM enter notifier chain so that
@@ -166,7 +166,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
166166

167167
if (dev->cpu == 0) {
168168
pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
169-
omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
169+
RCU_NONIDLE(omap_set_pwrdm_state(mpu_pd, cx->mpu_state));
170170

171171
/*
172172
* Call idle CPU cluster PM enter notifier chain
@@ -178,7 +178,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
178178
index = 0;
179179
cx = state_ptr + index;
180180
pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
181-
omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
181+
RCU_NONIDLE(omap_set_pwrdm_state(mpu_pd, cx->mpu_state));
182182
mpuss_can_lose_context = 0;
183183
}
184184
}
@@ -194,9 +194,9 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
194194
mpuss_can_lose_context)
195195
gic_dist_disable();
196196

197-
clkdm_deny_idle(cpu_clkdm[1]);
198-
omap_set_pwrdm_state(cpu_pd[1], PWRDM_POWER_ON);
199-
clkdm_allow_idle(cpu_clkdm[1]);
197+
RCU_NONIDLE(clkdm_deny_idle(cpu_clkdm[1]));
198+
RCU_NONIDLE(omap_set_pwrdm_state(cpu_pd[1], PWRDM_POWER_ON));
199+
RCU_NONIDLE(clkdm_allow_idle(cpu_clkdm[1]));
200200

201201
if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD) &&
202202
mpuss_can_lose_context) {
@@ -222,7 +222,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
222222
cpu_pm_exit();
223223

224224
cpu_pm_out:
225-
tick_broadcast_exit();
225+
RCU_NONIDLE(tick_broadcast_exit());
226226

227227
fail:
228228
cpuidle_coupled_parallel_barrier(dev, &abort_barrier);

arch/arm/xen/enlighten.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,6 @@ static int __init xen_guest_init(void)
370370
return -ENOMEM;
371371
}
372372
gnttab_init();
373-
if (!xen_initial_domain())
374-
xenbus_probe();
375373

376374
/*
377375
* Making sure board specific code will not set up ops for

arch/arm64/boot/dts/qcom/sdm845-db845c.dts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,9 @@
337337
&gcc {
338338
protected-clocks = <GCC_QSPI_CORE_CLK>,
339339
<GCC_QSPI_CORE_CLK_SRC>,
340-
<GCC_QSPI_CNOC_PERIPH_AHB_CLK>;
340+
<GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
341+
<GCC_LPASS_Q6_AXI_CLK>,
342+
<GCC_LPASS_SWAY_CLK>;
341343
};
342344

343345
&pm8998_gpio {

0 commit comments

Comments
 (0)