Skip to content

Commit eefa7a9

Browse files
committed
Merge tag 'for-linus' of https://github.com/openrisc/linux
Pull OpenRISC fixes from Stafford Horne: - Fix from Masahiro Yamada to fix 6.13 OpenRISC boot issues after vmlinux.lds.h symbol ordering was changed - Code formatting fixups from Geert * tag 'for-linus' of https://github.com/openrisc/linux: openrisc: Fix misalignments in head.S openrisc: place exception table at the head of vmlinux
2 parents 150b567 + c8f8d43 commit eefa7a9

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

arch/openrisc/kernel/entry.S

+2
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ handler: ;\
239239

240240
/* =====================================================[ exceptions] === */
241241

242+
__REF
243+
242244
/* ---[ 0x100: RESET exception ]----------------------------------------- */
243245

244246
EXCEPTION_ENTRY(_tng_kernel_start)

arch/openrisc/kernel/head.S

+17-15
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
#include <asm/asm-offsets.h>
2727
#include <linux/of_fdt.h>
2828

29-
#define tophys(rd,rs) \
30-
l.movhi rd,hi(-KERNELBASE) ;\
29+
#define tophys(rd,rs) \
30+
l.movhi rd,hi(-KERNELBASE) ;\
3131
l.add rd,rd,rs
3232

33-
#define CLEAR_GPR(gpr) \
33+
#define CLEAR_GPR(gpr) \
3434
l.movhi gpr,0x0
3535

36-
#define LOAD_SYMBOL_2_GPR(gpr,symbol) \
37-
l.movhi gpr,hi(symbol) ;\
36+
#define LOAD_SYMBOL_2_GPR(gpr,symbol) \
37+
l.movhi gpr,hi(symbol) ;\
3838
l.ori gpr,gpr,lo(symbol)
3939

4040

@@ -326,21 +326,21 @@
326326
l.addi r1,r1,-(INT_FRAME_SIZE) ;\
327327
/* r1 is KSP, r30 is __pa(KSP) */ ;\
328328
tophys (r30,r1) ;\
329-
l.sw PT_GPR12(r30),r12 ;\
329+
l.sw PT_GPR12(r30),r12 ;\
330330
l.mfspr r12,r0,SPR_EPCR_BASE ;\
331331
l.sw PT_PC(r30),r12 ;\
332332
l.mfspr r12,r0,SPR_ESR_BASE ;\
333333
l.sw PT_SR(r30),r12 ;\
334334
/* save r31 */ ;\
335335
EXCEPTION_T_LOAD_GPR30(r12) ;\
336-
l.sw PT_GPR30(r30),r12 ;\
336+
l.sw PT_GPR30(r30),r12 ;\
337337
/* save r10 as was prior to exception */ ;\
338338
EXCEPTION_T_LOAD_GPR10(r12) ;\
339-
l.sw PT_GPR10(r30),r12 ;\
340-
/* save PT_SP as was prior to exception */ ;\
339+
l.sw PT_GPR10(r30),r12 ;\
340+
/* save PT_SP as was prior to exception */ ;\
341341
EXCEPTION_T_LOAD_SP(r12) ;\
342342
l.sw PT_SP(r30),r12 ;\
343-
l.sw PT_GPR13(r30),r13 ;\
343+
l.sw PT_GPR13(r30),r13 ;\
344344
/* --> */ ;\
345345
/* save exception r4, set r4 = EA */ ;\
346346
l.sw PT_GPR4(r30),r4 ;\
@@ -357,6 +357,8 @@
357357

358358
/* =====================================================[ exceptions] === */
359359

360+
__HEAD
361+
360362
/* ---[ 0x100: RESET exception ]----------------------------------------- */
361363
.org 0x100
362364
/* Jump to .init code at _start which lives in the .head section
@@ -394,7 +396,7 @@ _dispatch_do_ipage_fault:
394396
.org 0x500
395397
EXCEPTION_HANDLE(_timer_handler)
396398

397-
/* ---[ 0x600: Alignment exception ]-------------------------------------- */
399+
/* ---[ 0x600: Alignment exception ]------------------------------------- */
398400
.org 0x600
399401
EXCEPTION_HANDLE(_alignment_handler)
400402

@@ -424,7 +426,7 @@ _dispatch_do_ipage_fault:
424426
.org 0xc00
425427
EXCEPTION_HANDLE(_sys_call_handler)
426428

427-
/* ---[ 0xd00: Floating point exception ]--------------------------------- */
429+
/* ---[ 0xd00: Floating point exception ]-------------------------------- */
428430
.org 0xd00
429431
EXCEPTION_HANDLE(_fpe_trap_handler)
430432

@@ -506,10 +508,10 @@ _dispatch_do_ipage_fault:
506508

507509
/* .text*/
508510

509-
/* This early stuff belongs in HEAD, but some of the functions below definitely
511+
/* This early stuff belongs in the .init.text section, but some of the functions below definitely
510512
* don't... */
511513

512-
__HEAD
514+
__INIT
513515
.global _start
514516
_start:
515517
/* Init r0 to zero as per spec */
@@ -816,7 +818,7 @@ secondary_start:
816818

817819
#endif
818820

819-
/* ========================================[ cache ]=== */
821+
/* ==========================================================[ cache ]=== */
820822

821823
/* alignment here so we don't change memory offsets with
822824
* memory controller defined

arch/openrisc/kernel/vmlinux.lds.S

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ SECTIONS
5050
.text : AT(ADDR(.text) - LOAD_OFFSET)
5151
{
5252
_stext = .;
53+
HEAD_TEXT
5354
TEXT_TEXT
5455
SCHED_TEXT
5556
LOCK_TEXT
@@ -83,8 +84,6 @@ SECTIONS
8384
. = ALIGN(PAGE_SIZE);
8485
__init_begin = .;
8586

86-
HEAD_TEXT_SECTION
87-
8887
/* Page aligned */
8988
INIT_TEXT_SECTION(PAGE_SIZE)
9089

scripts/head-object-list.txt

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ arch/m68k/kernel/head.o
2424
arch/m68k/kernel/sun3-head.o
2525
arch/microblaze/kernel/head.o
2626
arch/nios2/kernel/head.o
27-
arch/openrisc/kernel/head.o
2827
arch/parisc/kernel/head.o
2928
arch/powerpc/kernel/head_44x.o
3029
arch/powerpc/kernel/head_64.o

0 commit comments

Comments
 (0)