Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
20f48ccf
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
20f48ccf
编写于
10月 14, 2005
作者:
S
Stephen Rothwell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
powerpc: eliminate DsaAddr from pci_dn
Signed-off-by:
N
Stephen Rothwell
<
sfr@canb.auug.org.au
>
上级
bffa8fc3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
23 addition
and
262 deletion
+23
-262
arch/powerpc/platforms/iseries/iommu.c
arch/powerpc/platforms/iseries/iommu.c
+1
-1
arch/powerpc/platforms/iseries/pci.c
arch/powerpc/platforms/iseries/pci.c
+7
-13
arch/powerpc/platforms/iseries/pci.h
arch/powerpc/platforms/iseries/pci.h
+13
-0
arch/powerpc/platforms/iseries/vpdinfo.c
arch/powerpc/platforms/iseries/vpdinfo.c
+2
-2
include/asm-ppc64/iSeries/HvCallPci.h
include/asm-ppc64/iSeries/HvCallPci.h
+0
-243
include/asm-ppc64/pci-bridge.h
include/asm-ppc64/pci-bridge.h
+0
-3
未找到文件。
arch/powerpc/platforms/iseries/iommu.c
浏览文件 @
20f48ccf
...
...
@@ -124,7 +124,7 @@ static void iommu_table_getparms(struct pci_dn *pdn,
memset
(
parms
,
0
,
sizeof
(
*
parms
));
parms
->
itc_busno
=
pdn
->
DsaAddr
.
Dsa
.
busNumber
;
parms
->
itc_busno
=
pdn
->
busno
;
parms
->
itc_slotno
=
pdn
->
LogicalSlot
;
parms
->
itc_virtbus
=
0
;
...
...
arch/powerpc/platforms/iseries/pci.c
浏览文件 @
20f48ccf
...
...
@@ -223,13 +223,8 @@ static struct device_node *build_device_node(HvBusNumber Bus,
node
->
data
=
pdn
;
pdn
->
node
=
node
;
list_add_tail
(
&
pdn
->
Device_List
,
&
iSeries_Global_Device_List
);
#if 0
pdn->DsaAddr = ((u64)Bus << 48) + ((u64)SubBus << 40) + ((u64)0x10 << 32);
#endif
pdn
->
DsaAddr
.
DsaAddr
=
0
;
pdn
->
DsaAddr
.
Dsa
.
busNumber
=
Bus
;
pdn
->
DsaAddr
.
Dsa
.
subBusNumber
=
SubBus
;
pdn
->
DsaAddr
.
Dsa
.
deviceId
=
0x10
;
pdn
->
busno
=
Bus
;
pdn
->
bussubno
=
SubBus
;
pdn
->
devfn
=
PCI_DEVFN
(
ISERIES_ENCODE_DEVICE
(
AgentId
),
Function
);
return
node
;
}
...
...
@@ -554,8 +549,7 @@ static struct device_node *find_Device_Node(int bus, int devfn)
struct
pci_dn
*
pdn
;
list_for_each_entry
(
pdn
,
&
iSeries_Global_Device_List
,
Device_List
)
{
if
((
bus
==
pdn
->
DsaAddr
.
Dsa
.
busNumber
)
&&
(
devfn
==
pdn
->
devfn
))
if
((
bus
==
pdn
->
busno
)
&&
(
devfn
==
pdn
->
devfn
))
return
pdn
->
node
;
}
return
NULL
;
...
...
@@ -612,7 +606,7 @@ static int iSeries_pci_read_config(struct pci_bus *bus, unsigned int devfn,
}
fn
=
hv_cfg_read_func
[(
size
-
1
)
&
3
];
HvCall3Ret16
(
fn
,
&
ret
,
PCI_DN
(
node
)
->
DsaAddr
.
DsaAddr
,
offset
,
0
);
HvCall3Ret16
(
fn
,
&
ret
,
iseries_ds_addr
(
node
)
,
offset
,
0
);
if
(
ret
.
rc
!=
0
)
{
*
val
=
~
0
;
...
...
@@ -640,7 +634,7 @@ static int iSeries_pci_write_config(struct pci_bus *bus, unsigned int devfn,
return
PCIBIOS_BAD_REGISTER_NUMBER
;
fn
=
hv_cfg_write_func
[(
size
-
1
)
&
3
];
ret
=
HvCall4
(
fn
,
PCI_DN
(
node
)
->
DsaAddr
.
DsaAddr
,
offset
,
val
,
0
);
ret
=
HvCall4
(
fn
,
iseries_ds_addr
(
node
)
,
offset
,
val
,
0
);
if
(
ret
!=
0
)
return
PCIBIOS_DEVICE_NOT_FOUND
;
...
...
@@ -671,7 +665,7 @@ static int CheckReturnCode(char *TextHdr, struct device_node *DevNode,
++
Pci_Error_Count
;
(
*
retry
)
++
;
printk
(
"PCI: %s: Device 0x%04X:%02X I/O Error(%2d): 0x%04X
\n
"
,
TextHdr
,
pdn
->
DsaAddr
.
Dsa
.
busNumber
,
pdn
->
devfn
,
TextHdr
,
pdn
->
busno
,
pdn
->
devfn
,
*
retry
,
(
int
)
ret
);
/*
* Bump the retry and check for retry count exceeded.
...
...
@@ -712,7 +706,7 @@ static inline struct device_node *xlate_iomm_address(
if
(
DevNode
!=
NULL
)
{
int
barnum
=
iobar_table
[
TableIndex
];
*
dsaptr
=
PCI_DN
(
DevNode
)
->
DsaAddr
.
DsaAddr
|
(
barnum
<<
24
);
*
dsaptr
=
iseries_ds_addr
(
DevNode
)
|
(
barnum
<<
24
);
*
BarOffsetPtr
=
BaseIoAddr
%
IOMM_TABLE_ENTRY_SIZE
;
}
else
panic
(
"PCI: Invalid PCI IoAddress detected!
\n
"
);
...
...
arch/powerpc/platforms/iseries/pci.h
浏览文件 @
20f48ccf
...
...
@@ -30,6 +30,8 @@
* End Change Activity
*/
#include <asm/pci-bridge.h>
struct
pci_dev
;
/* For Forward Reference */
/*
...
...
@@ -45,6 +47,17 @@ struct pci_dev; /* For Forward Reference */
#define ISERIES_GET_DEVICE_FROM_SUBBUS(subbus) ((subbus >> 5) & 0x7)
#define ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus) ((subbus >> 2) & 0x7)
/*
* Generate a Direct Select Address for the Hypervisor
*/
static
inline
u64
iseries_ds_addr
(
struct
device_node
*
node
)
{
struct
pci_dn
*
pdn
=
PCI_DN
(
node
);
return
((
u64
)
pdn
->
busno
<<
48
)
+
((
u64
)
pdn
->
bussubno
<<
40
)
+
((
u64
)
0x10
<<
32
);
}
extern
void
iSeries_Device_Information
(
struct
pci_dev
*
,
int
);
#endif
/* _PLATFORMS_ISERIES_PCI_H */
arch/powerpc/platforms/iseries/vpdinfo.c
浏览文件 @
20f48ccf
...
...
@@ -258,8 +258,8 @@ void __init iSeries_Device_Information(struct pci_dev *PciDev, int count)
}
pdn
=
PCI_DN
(
DevNode
);
bus
=
pdn
->
DsaAddr
.
Dsa
.
busNumber
;
subbus
=
pdn
->
DsaAddr
.
Dsa
.
subBusNumber
;
bus
=
pdn
->
busno
;
subbus
=
pdn
->
bussubno
;
agent
=
ISERIES_PCI_AGENTID
(
ISERIES_GET_DEVICE_FROM_SUBBUS
(
subbus
),
ISERIES_GET_FUNCTION_FROM_SUBBUS
(
subbus
));
iSeries_Get_Location_Code
(
bus
,
agent
,
&
frame
,
card
);
...
...
include/asm-ppc64/iSeries/HvCallPci.h
浏览文件 @
20f48ccf
...
...
@@ -126,25 +126,6 @@ enum HvCallPci_VpdType {
#define HvCallPciUnmaskInterrupts HvCallPci + 49
#define HvCallPciGetBusUnitInfo HvCallPci + 50
static
inline
u64
HvCallPci_configLoad8
(
u16
busNumber
,
u8
subBusNumber
,
u8
deviceId
,
u32
offset
,
u8
*
value
)
{
struct
HvCallPci_DsaAddr
dsa
;
struct
HvCallPci_LoadReturn
retVal
;
*
((
u64
*
)
&
dsa
)
=
0
;
dsa
.
busNumber
=
busNumber
;
dsa
.
subBusNumber
=
subBusNumber
;
dsa
.
deviceId
=
deviceId
;
HvCall3Ret16
(
HvCallPciConfigLoad8
,
&
retVal
,
*
(
u64
*
)
&
dsa
,
offset
,
0
);
*
value
=
retVal
.
value
;
return
retVal
.
rc
;
}
static
inline
u64
HvCallPci_configLoad16
(
u16
busNumber
,
u8
subBusNumber
,
u8
deviceId
,
u32
offset
,
u16
*
value
)
{
...
...
@@ -164,25 +145,6 @@ static inline u64 HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber,
return
retVal
.
rc
;
}
static
inline
u64
HvCallPci_configLoad32
(
u16
busNumber
,
u8
subBusNumber
,
u8
deviceId
,
u32
offset
,
u32
*
value
)
{
struct
HvCallPci_DsaAddr
dsa
;
struct
HvCallPci_LoadReturn
retVal
;
*
((
u64
*
)
&
dsa
)
=
0
;
dsa
.
busNumber
=
busNumber
;
dsa
.
subBusNumber
=
subBusNumber
;
dsa
.
deviceId
=
deviceId
;
HvCall3Ret16
(
HvCallPciConfigLoad32
,
&
retVal
,
*
(
u64
*
)
&
dsa
,
offset
,
0
);
*
value
=
retVal
.
value
;
return
retVal
.
rc
;
}
static
inline
u64
HvCallPci_configStore8
(
u16
busNumber
,
u8
subBusNumber
,
u8
deviceId
,
u32
offset
,
u8
value
)
{
...
...
@@ -197,186 +159,6 @@ static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber,
return
HvCall4
(
HvCallPciConfigStore8
,
*
(
u64
*
)
&
dsa
,
offset
,
value
,
0
);
}
static
inline
u64
HvCallPci_configStore16
(
u16
busNumber
,
u8
subBusNumber
,
u8
deviceId
,
u32
offset
,
u16
value
)
{
struct
HvCallPci_DsaAddr
dsa
;
*
((
u64
*
)
&
dsa
)
=
0
;
dsa
.
busNumber
=
busNumber
;
dsa
.
subBusNumber
=
subBusNumber
;
dsa
.
deviceId
=
deviceId
;
return
HvCall4
(
HvCallPciConfigStore16
,
*
(
u64
*
)
&
dsa
,
offset
,
value
,
0
);
}
static
inline
u64
HvCallPci_configStore32
(
u16
busNumber
,
u8
subBusNumber
,
u8
deviceId
,
u32
offset
,
u32
value
)
{
struct
HvCallPci_DsaAddr
dsa
;
*
((
u64
*
)
&
dsa
)
=
0
;
dsa
.
busNumber
=
busNumber
;
dsa
.
subBusNumber
=
subBusNumber
;
dsa
.
deviceId
=
deviceId
;
return
HvCall4
(
HvCallPciConfigStore32
,
*
(
u64
*
)
&
dsa
,
offset
,
value
,
0
);
}
static
inline
u64
HvCallPci_barLoad8
(
u16
busNumberParm
,
u8
subBusParm
,
u8
deviceIdParm
,
u8
barNumberParm
,
u64
offsetParm
,
u8
*
valueParm
)
{
struct
HvCallPci_DsaAddr
dsa
;
struct
HvCallPci_LoadReturn
retVal
;
*
((
u64
*
)
&
dsa
)
=
0
;
dsa
.
busNumber
=
busNumberParm
;
dsa
.
subBusNumber
=
subBusParm
;
dsa
.
deviceId
=
deviceIdParm
;
dsa
.
barNumber
=
barNumberParm
;
HvCall3Ret16
(
HvCallPciBarLoad8
,
&
retVal
,
*
(
u64
*
)
&
dsa
,
offsetParm
,
0
);
*
valueParm
=
retVal
.
value
;
return
retVal
.
rc
;
}
static
inline
u64
HvCallPci_barLoad16
(
u16
busNumberParm
,
u8
subBusParm
,
u8
deviceIdParm
,
u8
barNumberParm
,
u64
offsetParm
,
u16
*
valueParm
)
{
struct
HvCallPci_DsaAddr
dsa
;
struct
HvCallPci_LoadReturn
retVal
;
*
((
u64
*
)
&
dsa
)
=
0
;
dsa
.
busNumber
=
busNumberParm
;
dsa
.
subBusNumber
=
subBusParm
;
dsa
.
deviceId
=
deviceIdParm
;
dsa
.
barNumber
=
barNumberParm
;
HvCall3Ret16
(
HvCallPciBarLoad16
,
&
retVal
,
*
(
u64
*
)
&
dsa
,
offsetParm
,
0
);
*
valueParm
=
retVal
.
value
;
return
retVal
.
rc
;
}
static
inline
u64
HvCallPci_barLoad32
(
u16
busNumberParm
,
u8
subBusParm
,
u8
deviceIdParm
,
u8
barNumberParm
,
u64
offsetParm
,
u32
*
valueParm
)
{
struct
HvCallPci_DsaAddr
dsa
;
struct
HvCallPci_LoadReturn
retVal
;
*
((
u64
*
)
&
dsa
)
=
0
;
dsa
.
busNumber
=
busNumberParm
;
dsa
.
subBusNumber
=
subBusParm
;
dsa
.
deviceId
=
deviceIdParm
;
dsa
.
barNumber
=
barNumberParm
;
HvCall3Ret16
(
HvCallPciBarLoad32
,
&
retVal
,
*
(
u64
*
)
&
dsa
,
offsetParm
,
0
);
*
valueParm
=
retVal
.
value
;
return
retVal
.
rc
;
}
static
inline
u64
HvCallPci_barLoad64
(
u16
busNumberParm
,
u8
subBusParm
,
u8
deviceIdParm
,
u8
barNumberParm
,
u64
offsetParm
,
u64
*
valueParm
)
{
struct
HvCallPci_DsaAddr
dsa
;
struct
HvCallPci_LoadReturn
retVal
;
*
((
u64
*
)
&
dsa
)
=
0
;
dsa
.
busNumber
=
busNumberParm
;
dsa
.
subBusNumber
=
subBusParm
;
dsa
.
deviceId
=
deviceIdParm
;
dsa
.
barNumber
=
barNumberParm
;
HvCall3Ret16
(
HvCallPciBarLoad64
,
&
retVal
,
*
(
u64
*
)
&
dsa
,
offsetParm
,
0
);
*
valueParm
=
retVal
.
value
;
return
retVal
.
rc
;
}
static
inline
u64
HvCallPci_barStore8
(
u16
busNumberParm
,
u8
subBusParm
,
u8
deviceIdParm
,
u8
barNumberParm
,
u64
offsetParm
,
u8
valueParm
)
{
struct
HvCallPci_DsaAddr
dsa
;
*
((
u64
*
)
&
dsa
)
=
0
;
dsa
.
busNumber
=
busNumberParm
;
dsa
.
subBusNumber
=
subBusParm
;
dsa
.
deviceId
=
deviceIdParm
;
dsa
.
barNumber
=
barNumberParm
;
return
HvCall4
(
HvCallPciBarStore8
,
*
(
u64
*
)
&
dsa
,
offsetParm
,
valueParm
,
0
);
}
static
inline
u64
HvCallPci_barStore16
(
u16
busNumberParm
,
u8
subBusParm
,
u8
deviceIdParm
,
u8
barNumberParm
,
u64
offsetParm
,
u16
valueParm
)
{
struct
HvCallPci_DsaAddr
dsa
;
*
((
u64
*
)
&
dsa
)
=
0
;
dsa
.
busNumber
=
busNumberParm
;
dsa
.
subBusNumber
=
subBusParm
;
dsa
.
deviceId
=
deviceIdParm
;
dsa
.
barNumber
=
barNumberParm
;
return
HvCall4
(
HvCallPciBarStore16
,
*
(
u64
*
)
&
dsa
,
offsetParm
,
valueParm
,
0
);
}
static
inline
u64
HvCallPci_barStore32
(
u16
busNumberParm
,
u8
subBusParm
,
u8
deviceIdParm
,
u8
barNumberParm
,
u64
offsetParm
,
u32
valueParm
)
{
struct
HvCallPci_DsaAddr
dsa
;
*
((
u64
*
)
&
dsa
)
=
0
;
dsa
.
busNumber
=
busNumberParm
;
dsa
.
subBusNumber
=
subBusParm
;
dsa
.
deviceId
=
deviceIdParm
;
dsa
.
barNumber
=
barNumberParm
;
return
HvCall4
(
HvCallPciBarStore32
,
*
(
u64
*
)
&
dsa
,
offsetParm
,
valueParm
,
0
);
}
static
inline
u64
HvCallPci_barStore64
(
u16
busNumberParm
,
u8
subBusParm
,
u8
deviceIdParm
,
u8
barNumberParm
,
u64
offsetParm
,
u64
valueParm
)
{
struct
HvCallPci_DsaAddr
dsa
;
*
((
u64
*
)
&
dsa
)
=
0
;
dsa
.
busNumber
=
busNumberParm
;
dsa
.
subBusNumber
=
subBusParm
;
dsa
.
deviceId
=
deviceIdParm
;
dsa
.
barNumber
=
barNumberParm
;
return
HvCall4
(
HvCallPciBarStore64
,
*
(
u64
*
)
&
dsa
,
offsetParm
,
valueParm
,
0
);
}
static
inline
u64
HvCallPci_eoi
(
u16
busNumberParm
,
u8
subBusParm
,
u8
deviceIdParm
)
{
...
...
@@ -437,20 +219,6 @@ static inline u64 HvCallPci_unmaskFisr(u16 busNumberParm, u8 subBusParm,
return
HvCall2
(
HvCallPciUnmaskFisr
,
*
(
u64
*
)
&
dsa
,
fisrMask
);
}
static
inline
u64
HvCallPci_setSlotReset
(
u16
busNumberParm
,
u8
subBusParm
,
u8
deviceIdParm
,
u64
onNotOff
)
{
struct
HvCallPci_DsaAddr
dsa
;
*
((
u64
*
)
&
dsa
)
=
0
;
dsa
.
busNumber
=
busNumberParm
;
dsa
.
subBusNumber
=
subBusParm
;
dsa
.
deviceId
=
deviceIdParm
;
return
HvCall2
(
HvCallPciSetSlotReset
,
*
(
u64
*
)
&
dsa
,
onNotOff
);
}
static
inline
u64
HvCallPci_getDeviceInfo
(
u16
busNumberParm
,
u8
subBusParm
,
u8
deviceNumberParm
,
u64
parms
,
u32
sizeofParms
)
{
...
...
@@ -519,15 +287,4 @@ static inline int HvCallPci_getBusVpd(u16 busNumParm, u64 destParm,
return
xRc
&
0xFFFF
;
}
static
inline
int
HvCallPci_getBusAdapterVpd
(
u16
busNumParm
,
u64
destParm
,
u16
sizeParm
)
{
u64
xRc
=
HvCall4
(
HvCallPciGetCardVpd
,
busNumParm
,
destParm
,
sizeParm
,
HvCallPci_BusAdapterVpd
);
if
(
xRc
==
-
1
)
return
-
1
;
else
return
xRc
&
0xFFFF
;
}
#endif
/* _HVCALLPCI_H */
include/asm-ppc64/pci-bridge.h
浏览文件 @
20f48ccf
...
...
@@ -77,9 +77,6 @@ struct pci_dn {
struct
device_node
*
node
;
/* back-pointer to the device_node */
#ifdef CONFIG_PPC_ISERIES
struct
list_head
Device_List
;
union
HvDsaMap
DsaAddr
;
/* Direct Select Address */
/* busNumber, subBusNumber, */
/* deviceId, barNumber */
int
Irq
;
/* Assigned IRQ */
int
Flags
;
/* Possible flags(disable/bist)*/
u8
LogicalSlot
;
/* Hv Slot Index for Tces */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录