From 7e970c18f85f99acc678d90128b6e01dce1bf273 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 01 Nov 2024 02:40:12 +0000
Subject: [PATCH] gmac get mac form eeprom
---
kernel/arch/arm/mm/alignment.c | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/kernel/arch/arm/mm/alignment.c b/kernel/arch/arm/mm/alignment.c
index bcefe3f..6018226 100644
--- a/kernel/arch/arm/mm/alignment.c
+++ b/kernel/arch/arm/mm/alignment.c
@@ -19,6 +19,7 @@
#include <linux/init.h>
#include <linux/sched/signal.h>
#include <linux/uaccess.h>
+#include <linux/dovetail.h>
#include <asm/cp15.h>
#include <asm/system_info.h>
@@ -807,10 +808,12 @@
u16 tinstr = 0;
int isize = 4;
int thumb2_32b = 0;
- int fault;
+ int fault, ret = 0;
if (interrupts_enabled(regs))
- local_irq_enable();
+ hard_local_irq_enable();
+
+ mark_trap_entry(ARM_TRAP_ALIGNMENT, regs);
instrptr = instruction_pointer(regs);
@@ -938,7 +941,7 @@
if (thumb_mode(regs))
regs->ARM_cpsr = it_advance(regs->ARM_cpsr);
- return 0;
+ goto out;
bad_or_fault:
if (type == TYPE_ERROR)
@@ -947,7 +950,7 @@
* We got a fault - fix it up, or die.
*/
do_bad_area(addr, fsr, regs);
- return 0;
+ goto out;
swp:
pr_err("Alignment trap: not handling swp instruction\n");
@@ -961,7 +964,8 @@
isize << 1,
isize == 2 ? tinstr : instr, instrptr);
ai_skipped += 1;
- return 1;
+ ret = 1;
+ goto out;
user:
ai_user += 1;
@@ -992,12 +996,15 @@
* entry-common.S) and disable the alignment trap only if
* there is no work pending for this thread.
*/
- raw_local_irq_disable();
+ hard_local_irq_disable();
if (!(current_thread_info()->flags & _TIF_WORK_MASK))
set_cr(cr_no_alignment);
}
- return 0;
+out:
+ mark_trap_exit(ARM_TRAP_ALIGNMENT, regs);
+
+ return ret;
}
static int __init noalign_setup(char *__unused)
--
Gitblit v1.6.2