Skip to content

Commit 86c0f93

Browse files
Akira Takeuchidhowells
authored andcommitted
MN10300: Remove monitor/JTAG functions
Remove the monitor trap function and the set_jtag_stub function as they're not really necessary. Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com> Signed-off-by: Kiyoshi Owada <owada.kiyoshi@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com>
1 parent 8fbbf7c commit 86c0f93

4 files changed

Lines changed: 2 additions & 55 deletions

File tree

‎arch/mn10300/include/asm/exceptions.h‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
/*
1717
* define the breakpoint instruction opcode to use
18-
* - note that the JTAG unit steals 0xFF, so we want to avoid that if we can
19-
* (can use 0xF7)
18+
* - note that the JTAG unit steals 0xFF, so you can't use JTAG and GDBSTUB at
19+
* the same time.
2020
*/
2121
#define GDBSTUB_BKPT 0xFF
2222

@@ -90,7 +90,6 @@ enum exception_code {
9090

9191
extern void __set_intr_stub(enum exception_code code, void *handler);
9292
extern void set_intr_stub(enum exception_code code, void *handler);
93-
extern void set_jtag_stub(enum exception_code code, void *handler);
9493

9594
struct pt_regs;
9695

‎arch/mn10300/kernel/entry.S‎

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -214,31 +214,6 @@ ENTRY(irq_handler)
214214

215215
jmp ret_from_intr
216216

217-
###############################################################################
218-
#
219-
# Monitor Signal handler entry point
220-
#
221-
###############################################################################
222-
ENTRY(monitor_signal)
223-
movbu (0xae000001),d1
224-
cmp 1,d1
225-
beq monsignal
226-
ret [],0
227-
228-
monsignal:
229-
or EPSW_NMID,epsw
230-
mov d0,a0
231-
mov a0,sp
232-
mov (REG_EPSW,fp),d1
233-
and ~EPSW_nSL,d1
234-
mov d1,(REG_EPSW,fp)
235-
movm (sp),[d2,d3,a2,a3,exreg0,exreg1,exother]
236-
mov (sp),a1
237-
mov a1,usp
238-
movm (sp),[other]
239-
add 4,sp
240-
here: jmp 0x8e000008-here+0x8e000008
241-
242217
###############################################################################
243218
#
244219
# Double Fault handler entry point

‎arch/mn10300/kernel/traps.c‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -537,28 +537,6 @@ void __init set_intr_stub(enum exception_code code, void *handler)
537537
mn10300_icache_inv();
538538
}
539539

540-
/*
541-
* set an interrupt stub to invoke the JTAG unit and then jump to a handler
542-
*/
543-
void __init set_jtag_stub(enum exception_code code, void *handler)
544-
{
545-
unsigned long addr;
546-
u8 *vector = (u8 *)(CONFIG_INTERRUPT_VECTOR_BASE + code);
547-
548-
addr = (unsigned long) handler - ((unsigned long) vector + 1);
549-
vector[0] = 0xff; /* PI to jump into JTAG debugger */
550-
vector[1] = 0xdc; /* jmp handler */
551-
vector[2] = addr;
552-
vector[3] = addr >> 8;
553-
vector[4] = addr >> 16;
554-
vector[5] = addr >> 24;
555-
vector[6] = 0xcb;
556-
vector[7] = 0xcb;
557-
558-
mn10300_dcache_flush_inv();
559-
flush_icache_range((unsigned long) vector, (unsigned long) vector + 8);
560-
}
561-
562540
/*
563541
* initialise the exception table
564542
*/

‎arch/mn10300/mm/fault.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ static void print_pagetable_entries(pgd_t *pgdir, unsigned long address)
100100
}
101101
#endif
102102

103-
asmlinkage void monitor_signal(struct pt_regs *);
104-
105103
/*
106104
* This routine handles page faults. It determines the address,
107105
* and the problem, and then passes it off to one of the appropriate
@@ -279,7 +277,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long fault_code,
279277
*/
280278
bad_area:
281279
up_read(&mm->mmap_sem);
282-
monitor_signal(regs);
283280

284281
/* User mode accesses just cause a SIGSEGV */
285282
if ((fault_code & MMUFCR_xFC_ACCESS) == MMUFCR_xFC_ACCESS_USR) {
@@ -292,7 +289,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long fault_code,
292289
}
293290

294291
no_context:
295-
monitor_signal(regs);
296292
/* Are we prepared to handle this kernel fault? */
297293
if (fixup_exception(regs))
298294
return;
@@ -345,7 +341,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long fault_code,
345341

346342
do_sigbus:
347343
up_read(&mm->mmap_sem);
348-
monitor_signal(regs);
349344

350345
/*
351346
* Send a sigbus, regardless of whether we were in kernel

0 commit comments

Comments
 (0)