mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-11 17:20:30 +00:00
ARM development for 5.7:
- replace setup_irq() with request_irq() for ebsa110, footbridge, rpc - fix clang assembly error in kexec code - remove .fixup section in boot stub - decompressor / EFI cache flushing updates -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEuNNh8scc2k/wOAE+9OeQG+StrGQFAl6GMjUACgkQ9OeQG+St rGTQmxAAmExCDLhR5jPwpTRQycOfWbNCZ7U0o0/hofah/R5u0a3vsqZTsZ0vqTjZ NRasyW7h825AFiwJz7FT2celYSiZCOSox/PyRWToRAyD/k75FbcRVIYIT7Fw0IQS E1dnGgq/rcEFWJJ0DlZQ//FL6dZ3PionEbhoo6dhWd3hWkqZOwG9P+HtP965KqOU NPZSpK67y0zTn5y+oBiSGKii+Zl907LUNv7AhtmPXJNm87X+GCg7tMLUKbcU2V2a QETrLzvehLS8XSHfVTRoh1pHYGvxOHbmKQitrfUFvWnwPHdButabDPsZm1GvubM3 7uiC06s2UH6nnwSDbmZ5VmD0IGViAgocW+iCRj094mWO6DlfqD+eDmfBO+ZhCfVH rpoP9ge9GNHGGl0FhDulRLWrfnV4X+vq3keT5Duy8QrLkLvbI3IRUEjKrMT7Y+uM RLEoJL7Ym4HuuU+I9HAXsDFU3OqagJipjHKDGexaNd92JEISx0JZd6+nY5jB9JDF 5W6nxY1rbBnLKBLawUM5RRbUEoV+L31B6uVLxEbsiiQZtGON7lKzNSf1iX2f8Yjb U4PHRzUglZs5EZLpvM4uDxGhftPA+XdEbAW40Thsd3x1wn5tVtTMsb8cq8eNptNx IQqDCpazeHUYaXocH/p7fhufjwrChzSzq6TJh3BbmEEuIs3BoDA= =ySzP -----END PGP SIGNATURE----- Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - replace setup_irq() with request_irq() for ebsa110, footbridge, rpc - fix clang assembly error in kexec code - remove .fixup section in boot stub - decompressor / EFI cache flushing updates * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8966/1: rpc: replace setup_irq() by request_irq() ARM: 8965/2: footbridge: replace setup_irq() by request_irq() ARM: 8964/1: ebsa110: replace setup_irq() by request_irq() ARM: 8962/1: kexec: drop invalid assembly argument ARM: decompressor: switch to by-VA cache maintenance for v7 cores ARM: decompressor: prepare cache_clean_flush for doing by-VA maintenance ARM: decompressor: factor out routine to obtain the inflated image size ARM: 8959/1: Remove unused .fixup section in boot stub ARM: allow unwinder to unwind recursive functions
This commit is contained in:
commit
a943353d17
9 changed files with 88 additions and 111 deletions
|
@ -151,6 +151,25 @@
|
||||||
.L_\@:
|
.L_\@:
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The kernel build system appends the size of the
|
||||||
|
* decompressed kernel at the end of the compressed data
|
||||||
|
* in little-endian form.
|
||||||
|
*/
|
||||||
|
.macro get_inflated_image_size, res:req, tmp1:req, tmp2:req
|
||||||
|
adr \res, .Linflated_image_size_offset
|
||||||
|
ldr \tmp1, [\res]
|
||||||
|
add \tmp1, \tmp1, \res @ address of inflated image size
|
||||||
|
|
||||||
|
ldrb \res, [\tmp1] @ get_unaligned_le32
|
||||||
|
ldrb \tmp2, [\tmp1, #1]
|
||||||
|
orr \res, \res, \tmp2, lsl #8
|
||||||
|
ldrb \tmp2, [\tmp1, #2]
|
||||||
|
ldrb \tmp1, [\tmp1, #3]
|
||||||
|
orr \res, \res, \tmp2, lsl #16
|
||||||
|
orr \res, \res, \tmp1, lsl #24
|
||||||
|
.endm
|
||||||
|
|
||||||
.section ".start", "ax"
|
.section ".start", "ax"
|
||||||
/*
|
/*
|
||||||
* sort out different calling conventions
|
* sort out different calling conventions
|
||||||
|
@ -268,15 +287,15 @@ not_angel:
|
||||||
*/
|
*/
|
||||||
mov r0, pc
|
mov r0, pc
|
||||||
cmp r0, r4
|
cmp r0, r4
|
||||||
ldrcc r0, LC0+32
|
ldrcc r0, LC0+28
|
||||||
addcc r0, r0, pc
|
addcc r0, r0, pc
|
||||||
cmpcc r4, r0
|
cmpcc r4, r0
|
||||||
orrcc r4, r4, #1 @ remember we skipped cache_on
|
orrcc r4, r4, #1 @ remember we skipped cache_on
|
||||||
blcs cache_on
|
blcs cache_on
|
||||||
|
|
||||||
restart: adr r0, LC0
|
restart: adr r0, LC0
|
||||||
ldmia r0, {r1, r2, r3, r6, r10, r11, r12}
|
ldmia r0, {r1, r2, r3, r6, r11, r12}
|
||||||
ldr sp, [r0, #28]
|
ldr sp, [r0, #24]
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We might be running at a different address. We need
|
* We might be running at a different address. We need
|
||||||
|
@ -284,20 +303,8 @@ restart: adr r0, LC0
|
||||||
*/
|
*/
|
||||||
sub r0, r0, r1 @ calculate the delta offset
|
sub r0, r0, r1 @ calculate the delta offset
|
||||||
add r6, r6, r0 @ _edata
|
add r6, r6, r0 @ _edata
|
||||||
add r10, r10, r0 @ inflated kernel size location
|
|
||||||
|
|
||||||
/*
|
get_inflated_image_size r9, r10, lr
|
||||||
* The kernel build system appends the size of the
|
|
||||||
* decompressed kernel at the end of the compressed data
|
|
||||||
* in little-endian form.
|
|
||||||
*/
|
|
||||||
ldrb r9, [r10, #0]
|
|
||||||
ldrb lr, [r10, #1]
|
|
||||||
orr r9, r9, lr, lsl #8
|
|
||||||
ldrb lr, [r10, #2]
|
|
||||||
ldrb r10, [r10, #3]
|
|
||||||
orr r9, r9, lr, lsl #16
|
|
||||||
orr r9, r9, r10, lsl #24
|
|
||||||
|
|
||||||
#ifndef CONFIG_ZBOOT_ROM
|
#ifndef CONFIG_ZBOOT_ROM
|
||||||
/* malloc space is above the relocated stack (64k max) */
|
/* malloc space is above the relocated stack (64k max) */
|
||||||
|
@ -521,11 +528,8 @@ dtb_check_done:
|
||||||
/* Preserve offset to relocated code. */
|
/* Preserve offset to relocated code. */
|
||||||
sub r6, r9, r6
|
sub r6, r9, r6
|
||||||
|
|
||||||
#ifndef CONFIG_ZBOOT_ROM
|
mov r0, r9 @ start of relocated zImage
|
||||||
/* cache_clean_flush may use the stack, so relocate it */
|
add r1, sp, r6 @ end of relocated zImage
|
||||||
add sp, sp, r6
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bl cache_clean_flush
|
bl cache_clean_flush
|
||||||
|
|
||||||
badr r0, restart
|
badr r0, restart
|
||||||
|
@ -622,6 +626,11 @@ not_relocated: mov r0, #0
|
||||||
add r2, sp, #0x10000 @ 64k max
|
add r2, sp, #0x10000 @ 64k max
|
||||||
mov r3, r7
|
mov r3, r7
|
||||||
bl decompress_kernel
|
bl decompress_kernel
|
||||||
|
|
||||||
|
get_inflated_image_size r1, r2, r3
|
||||||
|
|
||||||
|
mov r0, r4 @ start of inflated image
|
||||||
|
add r1, r1, r0 @ end of inflated image
|
||||||
bl cache_clean_flush
|
bl cache_clean_flush
|
||||||
bl cache_off
|
bl cache_off
|
||||||
|
|
||||||
|
@ -652,13 +661,15 @@ LC0: .word LC0 @ r1
|
||||||
.word __bss_start @ r2
|
.word __bss_start @ r2
|
||||||
.word _end @ r3
|
.word _end @ r3
|
||||||
.word _edata @ r6
|
.word _edata @ r6
|
||||||
.word input_data_end - 4 @ r10 (inflated size location)
|
|
||||||
.word _got_start @ r11
|
.word _got_start @ r11
|
||||||
.word _got_end @ ip
|
.word _got_end @ ip
|
||||||
.word .L_user_stack_end @ sp
|
.word .L_user_stack_end @ sp
|
||||||
.word _end - restart + 16384 + 1024*1024
|
.word _end - restart + 16384 + 1024*1024
|
||||||
.size LC0, . - LC0
|
.size LC0, . - LC0
|
||||||
|
|
||||||
|
.Linflated_image_size_offset:
|
||||||
|
.long (input_data_end - 4) - .
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_RPC
|
#ifdef CONFIG_ARCH_RPC
|
||||||
.globl params
|
.globl params
|
||||||
params: ldr r0, =0x10000100 @ params_phys for RPC
|
params: ldr r0, =0x10000100 @ params_phys for RPC
|
||||||
|
@ -667,6 +678,24 @@ params: ldr r0, =0x10000100 @ params_phys for RPC
|
||||||
.align
|
.align
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* dcache_line_size - get the minimum D-cache line size from the CTR register
|
||||||
|
* on ARMv7.
|
||||||
|
*/
|
||||||
|
.macro dcache_line_size, reg, tmp
|
||||||
|
#ifdef CONFIG_CPU_V7M
|
||||||
|
movw \tmp, #:lower16:BASEADDR_V7M_SCB + V7M_SCB_CTR
|
||||||
|
movt \tmp, #:upper16:BASEADDR_V7M_SCB + V7M_SCB_CTR
|
||||||
|
ldr \tmp, [\tmp]
|
||||||
|
#else
|
||||||
|
mrc p15, 0, \tmp, c0, c0, 1 @ read ctr
|
||||||
|
#endif
|
||||||
|
lsr \tmp, \tmp, #16
|
||||||
|
and \tmp, \tmp, #0xf @ cache line size encoding
|
||||||
|
mov \reg, #4 @ bytes per word
|
||||||
|
mov \reg, \reg, lsl \tmp @ actual cache line size
|
||||||
|
.endm
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Turn on the cache. We need to setup some page tables so that we
|
* Turn on the cache. We need to setup some page tables so that we
|
||||||
* can have both the I and D caches on.
|
* can have both the I and D caches on.
|
||||||
|
@ -1159,8 +1188,6 @@ __armv7_mmu_cache_off:
|
||||||
bic r0, r0, #0x000c
|
bic r0, r0, #0x000c
|
||||||
#endif
|
#endif
|
||||||
mcr p15, 0, r0, c1, c0 @ turn MMU and cache off
|
mcr p15, 0, r0, c1, c0 @ turn MMU and cache off
|
||||||
mov r12, lr
|
|
||||||
bl __armv7_mmu_cache_flush
|
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
#ifdef CONFIG_MMU
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c8, c7, 0 @ invalidate whole TLB
|
mcr p15, 0, r0, c8, c7, 0 @ invalidate whole TLB
|
||||||
|
@ -1168,11 +1195,14 @@ __armv7_mmu_cache_off:
|
||||||
mcr p15, 0, r0, c7, c5, 6 @ invalidate BTC
|
mcr p15, 0, r0, c7, c5, 6 @ invalidate BTC
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ DSB
|
mcr p15, 0, r0, c7, c10, 4 @ DSB
|
||||||
mcr p15, 0, r0, c7, c5, 4 @ ISB
|
mcr p15, 0, r0, c7, c5, 4 @ ISB
|
||||||
mov pc, r12
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clean and flush the cache to maintain consistency.
|
* Clean and flush the cache to maintain consistency.
|
||||||
*
|
*
|
||||||
|
* On entry,
|
||||||
|
* r0 = start address
|
||||||
|
* r1 = end address (exclusive)
|
||||||
* On exit,
|
* On exit,
|
||||||
* r1, r2, r3, r9, r10, r11, r12 corrupted
|
* r1, r2, r3, r9, r10, r11, r12 corrupted
|
||||||
* This routine must preserve:
|
* This routine must preserve:
|
||||||
|
@ -1181,6 +1211,7 @@ __armv7_mmu_cache_off:
|
||||||
.align 5
|
.align 5
|
||||||
cache_clean_flush:
|
cache_clean_flush:
|
||||||
mov r3, #16
|
mov r3, #16
|
||||||
|
mov r11, r1
|
||||||
b call_cache_fn
|
b call_cache_fn
|
||||||
|
|
||||||
__armv4_mpu_cache_flush:
|
__armv4_mpu_cache_flush:
|
||||||
|
@ -1231,51 +1262,16 @@ __armv7_mmu_cache_flush:
|
||||||
mcr p15, 0, r10, c7, c14, 0 @ clean+invalidate D
|
mcr p15, 0, r10, c7, c14, 0 @ clean+invalidate D
|
||||||
b iflush
|
b iflush
|
||||||
hierarchical:
|
hierarchical:
|
||||||
mcr p15, 0, r10, c7, c10, 5 @ DMB
|
dcache_line_size r1, r2 @ r1 := dcache min line size
|
||||||
stmfd sp!, {r0-r7, r9-r11}
|
sub r2, r1, #1 @ r2 := line size mask
|
||||||
mrc p15, 1, r0, c0, c0, 1 @ read clidr
|
bic r0, r0, r2 @ round down start to line size
|
||||||
ands r3, r0, #0x7000000 @ extract loc from clidr
|
sub r11, r11, #1 @ end address is exclusive
|
||||||
mov r3, r3, lsr #23 @ left align loc bit field
|
bic r11, r11, r2 @ round down end to line size
|
||||||
beq finished @ if loc is 0, then no need to clean
|
0: cmp r0, r11 @ finished?
|
||||||
mov r10, #0 @ start clean at cache level 0
|
bgt iflush
|
||||||
loop1:
|
mcr p15, 0, r0, c7, c14, 1 @ Dcache clean/invalidate by VA
|
||||||
add r2, r10, r10, lsr #1 @ work out 3x current cache level
|
add r0, r0, r1
|
||||||
mov r1, r0, lsr r2 @ extract cache type bits from clidr
|
b 0b
|
||||||
and r1, r1, #7 @ mask of the bits for current cache only
|
|
||||||
cmp r1, #2 @ see what cache we have at this level
|
|
||||||
blt skip @ skip if no cache, or just i-cache
|
|
||||||
mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr
|
|
||||||
mcr p15, 0, r10, c7, c5, 4 @ isb to sych the new cssr&csidr
|
|
||||||
mrc p15, 1, r1, c0, c0, 0 @ read the new csidr
|
|
||||||
and r2, r1, #7 @ extract the length of the cache lines
|
|
||||||
add r2, r2, #4 @ add 4 (line length offset)
|
|
||||||
ldr r4, =0x3ff
|
|
||||||
ands r4, r4, r1, lsr #3 @ find maximum number on the way size
|
|
||||||
clz r5, r4 @ find bit position of way size increment
|
|
||||||
ldr r7, =0x7fff
|
|
||||||
ands r7, r7, r1, lsr #13 @ extract max number of the index size
|
|
||||||
loop2:
|
|
||||||
mov r9, r4 @ create working copy of max way size
|
|
||||||
loop3:
|
|
||||||
ARM( orr r11, r10, r9, lsl r5 ) @ factor way and cache number into r11
|
|
||||||
ARM( orr r11, r11, r7, lsl r2 ) @ factor index number into r11
|
|
||||||
THUMB( lsl r6, r9, r5 )
|
|
||||||
THUMB( orr r11, r10, r6 ) @ factor way and cache number into r11
|
|
||||||
THUMB( lsl r6, r7, r2 )
|
|
||||||
THUMB( orr r11, r11, r6 ) @ factor index number into r11
|
|
||||||
mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way
|
|
||||||
subs r9, r9, #1 @ decrement the way
|
|
||||||
bge loop3
|
|
||||||
subs r7, r7, #1 @ decrement the index
|
|
||||||
bge loop2
|
|
||||||
skip:
|
|
||||||
add r10, r10, #2 @ increment cache number
|
|
||||||
cmp r3, r10
|
|
||||||
bgt loop1
|
|
||||||
finished:
|
|
||||||
ldmfd sp!, {r0-r7, r9-r11}
|
|
||||||
mov r10, #0 @ switch back to cache level 0
|
|
||||||
mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr
|
|
||||||
iflush:
|
iflush:
|
||||||
mcr p15, 0, r10, c7, c10, 4 @ DSB
|
mcr p15, 0, r10, c7, c10, 4 @ DSB
|
||||||
mcr p15, 0, r10, c7, c5, 0 @ invalidate I+BTB
|
mcr p15, 0, r10, c7, c5, 0 @ invalidate I+BTB
|
||||||
|
|
|
@ -36,7 +36,6 @@ SECTIONS
|
||||||
*(.start)
|
*(.start)
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.text.*)
|
*(.text.*)
|
||||||
*(.fixup)
|
|
||||||
*(.gnu.warning)
|
*(.gnu.warning)
|
||||||
*(.glue_7t)
|
*(.glue_7t)
|
||||||
*(.glue_7)
|
*(.glue_7)
|
||||||
|
|
|
@ -25,26 +25,26 @@ ENTRY(relocate_new_kernel)
|
||||||
ldr r3, [r0],#4
|
ldr r3, [r0],#4
|
||||||
|
|
||||||
/* Is it a destination page. Put destination address to r4 */
|
/* Is it a destination page. Put destination address to r4 */
|
||||||
tst r3,#1,0
|
tst r3,#1
|
||||||
beq 1f
|
beq 1f
|
||||||
bic r4,r3,#1
|
bic r4,r3,#1
|
||||||
b 0b
|
b 0b
|
||||||
1:
|
1:
|
||||||
/* Is it an indirection page */
|
/* Is it an indirection page */
|
||||||
tst r3,#2,0
|
tst r3,#2
|
||||||
beq 1f
|
beq 1f
|
||||||
bic r0,r3,#2
|
bic r0,r3,#2
|
||||||
b 0b
|
b 0b
|
||||||
1:
|
1:
|
||||||
|
|
||||||
/* are we done ? */
|
/* are we done ? */
|
||||||
tst r3,#4,0
|
tst r3,#4
|
||||||
beq 1f
|
beq 1f
|
||||||
b 2f
|
b 2f
|
||||||
|
|
||||||
1:
|
1:
|
||||||
/* is it source ? */
|
/* is it source ? */
|
||||||
tst r3,#8,0
|
tst r3,#8
|
||||||
beq 0b
|
beq 0b
|
||||||
bic r3,r3,#8
|
bic r3,r3,#8
|
||||||
mov r6,#1024
|
mov r6,#1024
|
||||||
|
|
|
@ -444,7 +444,7 @@ int unwind_frame(struct stackframe *frame)
|
||||||
ctrl.vrs[PC] = ctrl.vrs[LR];
|
ctrl.vrs[PC] = ctrl.vrs[LR];
|
||||||
|
|
||||||
/* check for infinite loop */
|
/* check for infinite loop */
|
||||||
if (frame->pc == ctrl.vrs[PC])
|
if (frame->pc == ctrl.vrs[PC] && frame->sp == ctrl.vrs[SP])
|
||||||
return -URC_FAILURE;
|
return -URC_FAILURE;
|
||||||
|
|
||||||
frame->fp = ctrl.vrs[FP];
|
frame->fp = ctrl.vrs[FP];
|
||||||
|
|
|
@ -201,17 +201,13 @@ ebsa110_timer_interrupt(int irq, void *dev_id)
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irqaction ebsa110_timer_irq = {
|
|
||||||
.name = "EBSA110 Timer Tick",
|
|
||||||
.flags = IRQF_TIMER | IRQF_IRQPOLL,
|
|
||||||
.handler = ebsa110_timer_interrupt,
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up timer interrupt.
|
* Set up timer interrupt.
|
||||||
*/
|
*/
|
||||||
void __init ebsa110_timer_init(void)
|
void __init ebsa110_timer_init(void)
|
||||||
{
|
{
|
||||||
|
int irq = IRQ_EBSA110_TIMER0;
|
||||||
|
|
||||||
arch_gettimeoffset = ebsa110_gettimeoffset;
|
arch_gettimeoffset = ebsa110_gettimeoffset;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -221,7 +217,9 @@ void __init ebsa110_timer_init(void)
|
||||||
__raw_writeb(COUNT & 0xff, PIT_T1);
|
__raw_writeb(COUNT & 0xff, PIT_T1);
|
||||||
__raw_writeb(COUNT >> 8, PIT_T1);
|
__raw_writeb(COUNT >> 8, PIT_T1);
|
||||||
|
|
||||||
setup_irq(IRQ_EBSA110_TIMER0, &ebsa110_timer_irq);
|
if (request_irq(irq, ebsa110_timer_interrupt, IRQF_TIMER | IRQF_IRQPOLL,
|
||||||
|
"EBSA110 Timer Tick", NULL))
|
||||||
|
pr_err("Failed to request irq %d (EBSA110 Timer Tick)\n", irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct plat_serial8250_port serial_platform_data[] = {
|
static struct plat_serial8250_port serial_platform_data[] = {
|
||||||
|
|
|
@ -101,13 +101,6 @@ static irqreturn_t timer1_interrupt(int irq, void *dev_id)
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irqaction footbridge_timer_irq = {
|
|
||||||
.name = "dc21285_timer1",
|
|
||||||
.handler = timer1_interrupt,
|
|
||||||
.flags = IRQF_TIMER | IRQF_IRQPOLL,
|
|
||||||
.dev_id = &ckevt_dc21285,
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up timer interrupt.
|
* Set up timer interrupt.
|
||||||
*/
|
*/
|
||||||
|
@ -118,7 +111,9 @@ void __init footbridge_timer_init(void)
|
||||||
|
|
||||||
clocksource_register_hz(&cksrc_dc21285, rate);
|
clocksource_register_hz(&cksrc_dc21285, rate);
|
||||||
|
|
||||||
setup_irq(ce->irq, &footbridge_timer_irq);
|
if (request_irq(ce->irq, timer1_interrupt, IRQF_TIMER | IRQF_IRQPOLL,
|
||||||
|
"dc21285_timer1", &ckevt_dc21285))
|
||||||
|
pr_err("Failed to request irq %d (dc21285_timer1)", ce->irq);
|
||||||
|
|
||||||
ce->cpumask = cpumask_of(smp_processor_id());
|
ce->cpumask = cpumask_of(smp_processor_id());
|
||||||
clockevents_config_and_register(ce, rate, 0x4, 0xffffff);
|
clockevents_config_and_register(ce, rate, 0x4, 0xffffff);
|
||||||
|
|
|
@ -96,11 +96,6 @@ static void isa_irq_handler(struct irq_desc *desc)
|
||||||
generic_handle_irq(isa_irq);
|
generic_handle_irq(isa_irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irqaction irq_cascade = {
|
|
||||||
.handler = no_action,
|
|
||||||
.name = "cascade",
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct resource pic1_resource = {
|
static struct resource pic1_resource = {
|
||||||
.name = "pic1",
|
.name = "pic1",
|
||||||
.start = 0x20,
|
.start = 0x20,
|
||||||
|
@ -160,7 +155,10 @@ void __init isa_init_irq(unsigned int host_irq)
|
||||||
|
|
||||||
request_resource(&ioport_resource, &pic1_resource);
|
request_resource(&ioport_resource, &pic1_resource);
|
||||||
request_resource(&ioport_resource, &pic2_resource);
|
request_resource(&ioport_resource, &pic2_resource);
|
||||||
setup_irq(IRQ_ISA_CASCADE, &irq_cascade);
|
|
||||||
|
irq = IRQ_ISA_CASCADE;
|
||||||
|
if (request_irq(irq, no_action, 0, "cascade", NULL))
|
||||||
|
pr_err("Failed to request irq %u (cascade)\n", irq);
|
||||||
|
|
||||||
irq_set_chained_handler(host_irq, isa_irq_handler);
|
irq_set_chained_handler(host_irq, isa_irq_handler);
|
||||||
|
|
||||||
|
|
|
@ -25,17 +25,12 @@ static irqreturn_t pit_timer_interrupt(int irq, void *dev_id)
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irqaction pit_timer_irq = {
|
|
||||||
.name = "pit",
|
|
||||||
.handler = pit_timer_interrupt,
|
|
||||||
.flags = IRQF_TIMER | IRQF_IRQPOLL,
|
|
||||||
.dev_id = &i8253_clockevent,
|
|
||||||
};
|
|
||||||
|
|
||||||
void __init isa_timer_init(void)
|
void __init isa_timer_init(void)
|
||||||
{
|
{
|
||||||
clocksource_i8253_init();
|
clocksource_i8253_init();
|
||||||
|
|
||||||
setup_irq(i8253_clockevent.irq, &pit_timer_irq);
|
if (request_irq(i8253_clockevent.irq, pit_timer_interrupt,
|
||||||
|
IRQF_TIMER | IRQF_IRQPOLL, "pit", &i8253_clockevent))
|
||||||
|
pr_err("Failed to request irq %d(pit)\n", i8253_clockevent.irq);
|
||||||
clockevent_i8253_init(false);
|
clockevent_i8253_init(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,11 +85,6 @@ ioc_timer_interrupt(int irq, void *dev_id)
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irqaction ioc_timer_irq = {
|
|
||||||
.name = "timer",
|
|
||||||
.handler = ioc_timer_interrupt
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up timer interrupt.
|
* Set up timer interrupt.
|
||||||
*/
|
*/
|
||||||
|
@ -97,5 +92,6 @@ void __init ioc_timer_init(void)
|
||||||
{
|
{
|
||||||
WARN_ON(clocksource_register_hz(&ioctime_clocksource, RPC_CLOCK_FREQ));
|
WARN_ON(clocksource_register_hz(&ioctime_clocksource, RPC_CLOCK_FREQ));
|
||||||
ioctime_init();
|
ioctime_init();
|
||||||
setup_irq(IRQ_TIMER0, &ioc_timer_irq);
|
if (request_irq(IRQ_TIMER0, ioc_timer_interrupt, 0, "timer", NULL))
|
||||||
|
pr_err("Failed to request irq %d (timer)\n", IRQ_TIMER0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue