Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
0a808a31
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0a808a31
编写于
8月 02, 2007
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[SPARC32]: Fix modular build of floppy driver.
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
3daadf33
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
75 addition
and
44 deletion
+75
-44
arch/sparc/kernel/entry.S
arch/sparc/kernel/entry.S
+3
-4
arch/sparc/kernel/irq.c
arch/sparc/kernel/irq.c
+59
-25
arch/sparc/kernel/sparc_ksyms.c
arch/sparc/kernel/sparc_ksyms.c
+0
-1
include/asm-sparc/floppy.h
include/asm-sparc/floppy.h
+11
-9
include/asm-sparc/irq.h
include/asm-sparc/irq.h
+2
-5
未找到文件。
arch/sparc/kernel/entry.S
浏览文件 @
0a808a31
/*
$Id
:
entry
.
S
,
v
1
.170
2001
/
11
/
13
00
:
57
:
05
davem
Exp
$
/*
arch
/
sparc
/
kernel
/
entry.S
:
Sparc
trap
low
-
level
entry
points
.
*
arch
/
sparc
/
kernel
/
entry
.
S
:
Sparc
trap
low
-
level
entry
points
.
*
*
*
Copyright
(
C
)
1995
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*
Copyright
(
C
)
1995
,
2007
David
S
.
Miller
(
davem
@
davemloft
.
net
)
*
Copyright
(
C
)
1996
Eddie
C
.
Dost
(
ecd
@
skynet
.
be
)
*
Copyright
(
C
)
1996
Eddie
C
.
Dost
(
ecd
@
skynet
.
be
)
*
Copyright
(
C
)
1996
Miguel
de
Icaza
(
miguel
@
nuclecu
.
unam
.
mx
)
*
Copyright
(
C
)
1996
Miguel
de
Icaza
(
miguel
@
nuclecu
.
unam
.
mx
)
*
Copyright
(
C
)
1996
-
1999
Jakub
Jelinek
(
jj
@
sunsite
.
mff
.
cuni
.
cz
)
*
Copyright
(
C
)
1996
-
1999
Jakub
Jelinek
(
jj
@
sunsite
.
mff
.
cuni
.
cz
)
...
@@ -129,7 +128,7 @@ trap_low:
...
@@ -129,7 +128,7 @@ trap_low:
RESTORE_ALL
RESTORE_ALL
#endif
#endif
#if
def CONFIG_BLK_DEV_FD
#if
defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_BLK_DEV_FD_MODULE)
.
text
.
text
.
align
4
.
align
4
.
globl
floppy_hardint
.
globl
floppy_hardint
...
...
arch/sparc/kernel/irq.c
浏览文件 @
0a808a31
...
@@ -351,34 +351,14 @@ void handler_irq(int irq, struct pt_regs * regs)
...
@@ -351,34 +351,14 @@ void handler_irq(int irq, struct pt_regs * regs)
set_irq_regs
(
old_regs
);
set_irq_regs
(
old_regs
);
}
}
#ifdef CONFIG_BLK_DEV_FD
#if defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_BLK_DEV_FD_MODULE)
extern
void
floppy_interrupt
(
int
irq
,
void
*
dev_id
);
void
sparc_floppy_irq
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
pt_regs
*
old_regs
;
int
cpu
=
smp_processor_id
();
old_regs
=
set_irq_regs
(
regs
);
disable_pil_irq
(
irq
);
irq_enter
();
kstat_cpu
(
cpu
).
irqs
[
irq
]
++
;
floppy_interrupt
(
irq
,
dev_id
);
irq_exit
();
enable_pil_irq
(
irq
);
set_irq_regs
(
old_regs
);
// XXX Eek, it's totally changed with preempt_count() and such
// if (softirq_pending(cpu))
// do_softirq();
}
#endif
/* Fast IRQs on the Sparc can only have one routine attached to them,
/* Fast IRQs on the Sparc can only have one routine attached to them,
* thus no sharing possible.
* thus no sharing possible.
*/
*/
int
request_fast_irq
(
unsigned
int
irq
,
static
int
request_fast_irq
(
unsigned
int
irq
,
irq_handler_t
handler
,
void
(
*
handler
)(
void
)
,
unsigned
long
irqflags
,
const
char
*
devname
)
unsigned
long
irqflags
,
const
char
*
devname
)
{
{
struct
irqaction
*
action
;
struct
irqaction
*
action
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -457,7 +437,6 @@ int request_fast_irq(unsigned int irq,
...
@@ -457,7 +437,6 @@ int request_fast_irq(unsigned int irq,
*/
*/
flush_cache_all
();
flush_cache_all
();
action
->
handler
=
handler
;
action
->
flags
=
irqflags
;
action
->
flags
=
irqflags
;
cpus_clear
(
action
->
mask
);
cpus_clear
(
action
->
mask
);
action
->
name
=
devname
;
action
->
name
=
devname
;
...
@@ -475,6 +454,61 @@ int request_fast_irq(unsigned int irq,
...
@@ -475,6 +454,61 @@ int request_fast_irq(unsigned int irq,
return
ret
;
return
ret
;
}
}
/* These variables are used to access state from the assembler
* interrupt handler, floppy_hardint, so we cannot put these in
* the floppy driver image because that would not work in the
* modular case.
*/
volatile
unsigned
char
*
fdc_status
;
EXPORT_SYMBOL
(
fdc_status
);
char
*
pdma_vaddr
;
EXPORT_SYMBOL
(
pdma_vaddr
);
unsigned
long
pdma_size
;
EXPORT_SYMBOL
(
pdma_size
);
volatile
int
doing_pdma
;
EXPORT_SYMBOL
(
doing_pdma
);
char
*
pdma_base
;
EXPORT_SYMBOL
(
pdma_base
);
unsigned
long
pdma_areasize
;
EXPORT_SYMBOL
(
pdma_areasize
);
extern
void
floppy_hardint
(
void
);
static
irqreturn_t
(
*
floppy_irq_handler
)(
int
irq
,
void
*
dev_id
);
void
sparc_floppy_irq
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
pt_regs
*
old_regs
;
int
cpu
=
smp_processor_id
();
old_regs
=
set_irq_regs
(
regs
);
disable_pil_irq
(
irq
);
irq_enter
();
kstat_cpu
(
cpu
).
irqs
[
irq
]
++
;
floppy_irq_handler
(
irq
,
dev_id
);
irq_exit
();
enable_pil_irq
(
irq
);
set_irq_regs
(
old_regs
);
// XXX Eek, it's totally changed with preempt_count() and such
// if (softirq_pending(cpu))
// do_softirq();
}
int
sparc_floppy_request_irq
(
int
irq
,
unsigned
long
flags
,
irqreturn_t
(
*
irq_handler
)(
int
irq
,
void
*
))
{
floppy_irq_handler
=
irq_handler
;
return
request_fast_irq
(
irq
,
floppy_hardint
,
flags
,
"floppy"
);
}
EXPORT_SYMBOL
(
sparc_floppy_request_irq
);
#endif
int
request_irq
(
unsigned
int
irq
,
int
request_irq
(
unsigned
int
irq
,
irq_handler_t
handler
,
irq_handler_t
handler
,
unsigned
long
irqflags
,
const
char
*
devname
,
void
*
dev_id
)
unsigned
long
irqflags
,
const
char
*
devname
,
void
*
dev_id
)
...
...
arch/sparc/kernel/sparc_ksyms.c
浏览文件 @
0a808a31
...
@@ -143,7 +143,6 @@ EXPORT_SYMBOL(mstk48t02_regs);
...
@@ -143,7 +143,6 @@ EXPORT_SYMBOL(mstk48t02_regs);
EXPORT_SYMBOL
(
set_auxio
);
EXPORT_SYMBOL
(
set_auxio
);
EXPORT_SYMBOL
(
get_auxio
);
EXPORT_SYMBOL
(
get_auxio
);
#endif
#endif
EXPORT_SYMBOL
(
request_fast_irq
);
EXPORT_SYMBOL
(
io_remap_pfn_range
);
EXPORT_SYMBOL
(
io_remap_pfn_range
);
/* P3: iounit_xxx may be needed, sun4d users */
/* P3: iounit_xxx may be needed, sun4d users */
/* EXPORT_SYMBOL(iounit_map_dma_init); */
/* EXPORT_SYMBOL(iounit_map_dma_init); */
...
...
include/asm-sparc/floppy.h
浏览文件 @
0a808a31
...
@@ -48,7 +48,7 @@ struct sun_flpy_controller {
...
@@ -48,7 +48,7 @@ struct sun_flpy_controller {
/* You'll only ever find one controller on a SparcStation anyways. */
/* You'll only ever find one controller on a SparcStation anyways. */
static
struct
sun_flpy_controller
*
sun_fdc
=
NULL
;
static
struct
sun_flpy_controller
*
sun_fdc
=
NULL
;
volatile
unsigned
char
*
fdc_status
;
extern
volatile
unsigned
char
*
fdc_status
;
struct
sun_floppy_ops
{
struct
sun_floppy_ops
{
unsigned
char
(
*
fd_inb
)(
int
port
);
unsigned
char
(
*
fd_inb
)(
int
port
);
...
@@ -225,13 +225,13 @@ static void sun_82077_fd_outb(unsigned char value, int port)
...
@@ -225,13 +225,13 @@ static void sun_82077_fd_outb(unsigned char value, int port)
* underruns. If non-zero, doing_pdma encodes the direction of
* underruns. If non-zero, doing_pdma encodes the direction of
* the transfer for debugging. 1=read 2=write
* the transfer for debugging. 1=read 2=write
*/
*/
char
*
pdma_vaddr
;
extern
char
*
pdma_vaddr
;
unsigned
long
pdma_size
;
extern
unsigned
long
pdma_size
;
volatile
int
doing_pdma
=
0
;
extern
volatile
int
doing_pdma
;
/* This is software state */
/* This is software state */
char
*
pdma_base
=
NULL
;
extern
char
*
pdma_base
;
unsigned
long
pdma_areasize
;
extern
unsigned
long
pdma_areasize
;
/* Common routines to all controller types on the Sparc. */
/* Common routines to all controller types on the Sparc. */
static
__inline__
void
virtual_dma_init
(
void
)
static
__inline__
void
virtual_dma_init
(
void
)
...
@@ -281,7 +281,8 @@ static __inline__ void sun_fd_enable_dma(void)
...
@@ -281,7 +281,8 @@ static __inline__ void sun_fd_enable_dma(void)
}
}
/* Our low-level entry point in arch/sparc/kernel/entry.S */
/* Our low-level entry point in arch/sparc/kernel/entry.S */
irqreturn_t
floppy_hardint
(
int
irq
,
void
*
unused
);
extern
int
sparc_floppy_request_irq
(
int
irq
,
unsigned
long
flags
,
irqreturn_t
(
*
irq_handler
)(
int
irq
,
void
*
));
static
int
sun_fd_request_irq
(
void
)
static
int
sun_fd_request_irq
(
void
)
{
{
...
@@ -290,8 +291,9 @@ static int sun_fd_request_irq(void)
...
@@ -290,8 +291,9 @@ static int sun_fd_request_irq(void)
if
(
!
once
)
{
if
(
!
once
)
{
once
=
1
;
once
=
1
;
error
=
request_fast_irq
(
FLOPPY_IRQ
,
floppy_hardint
,
error
=
sparc_floppy_request_irq
(
FLOPPY_IRQ
,
IRQF_DISABLED
,
"floppy"
);
IRQF_DISABLED
,
floppy_interrupt
);
return
((
error
==
0
)
?
0
:
-
1
);
return
((
error
==
0
)
?
0
:
-
1
);
}
else
return
0
;
}
else
return
0
;
}
}
...
...
include/asm-sparc/irq.h
浏览文件 @
0a808a31
/* $Id: irq.h,v 1.32 2000/08/26 02:42:28 anton Exp $
/* irq.h: IRQ registers on the Sparc.
* irq.h: IRQ registers on the Sparc.
*
*
* Copyright (C) 1995
David S. Miller (davem@caip.rutgers.edu
)
* Copyright (C) 1995
, 2007 David S. Miller (davem@davemloft.net
)
*/
*/
#ifndef _SPARC_IRQ_H
#ifndef _SPARC_IRQ_H
...
@@ -13,6 +12,4 @@
...
@@ -13,6 +12,4 @@
#define irq_canonicalize(irq) (irq)
#define irq_canonicalize(irq) (irq)
extern
int
request_fast_irq
(
unsigned
int
irq
,
irq_handler_t
handler
,
unsigned
long
flags
,
__const__
char
*
devname
);
#endif
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录