Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
dc1544ea
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dc1544ea
编写于
5月 28, 2010
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'bjorn-pci-root-v4-2.6.35' into release
上级
6e320ec1
57283776
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
50 addition
and
32 deletion
+50
-32
arch/ia64/pci/pci.c
arch/ia64/pci/pci.c
+4
-1
arch/x86/pci/acpi.c
arch/x86/pci/acpi.c
+4
-1
drivers/acpi/pci_root.c
drivers/acpi/pci_root.c
+40
-27
include/acpi/acpi_bus.h
include/acpi/acpi_bus.h
+1
-1
include/acpi/acpi_drivers.h
include/acpi/acpi_drivers.h
+1
-2
未找到文件。
arch/ia64/pci/pci.c
浏览文件 @
dc1544ea
...
...
@@ -335,8 +335,11 @@ pcibios_setup_root_windows(struct pci_bus *bus, struct pci_controller *ctrl)
}
struct
pci_bus
*
__devinit
pci_acpi_scan_root
(
struct
acpi_
device
*
device
,
int
domain
,
int
bus
)
pci_acpi_scan_root
(
struct
acpi_
pci_root
*
root
)
{
struct
acpi_device
*
device
=
root
->
device
;
int
domain
=
root
->
segment
;
int
bus
=
root
->
secondary
.
start
;
struct
pci_controller
*
controller
;
unsigned
int
windows
=
0
;
struct
pci_bus
*
pbus
;
...
...
arch/x86/pci/acpi.c
浏览文件 @
dc1544ea
...
...
@@ -224,8 +224,11 @@ get_current_resources(struct acpi_device *device, int busnum,
return
;
}
struct
pci_bus
*
__devinit
pci_acpi_scan_root
(
struct
acpi_
device
*
device
,
int
domain
,
int
busnum
)
struct
pci_bus
*
__devinit
pci_acpi_scan_root
(
struct
acpi_
pci_root
*
root
)
{
struct
acpi_device
*
device
=
root
->
device
;
int
domain
=
root
->
segment
;
int
busnum
=
root
->
secondary
.
start
;
struct
pci_bus
*
bus
;
struct
pci_sysdata
*
sd
;
int
node
;
...
...
drivers/acpi/pci_root.c
浏览文件 @
dc1544ea
...
...
@@ -120,7 +120,8 @@ acpi_handle acpi_get_pci_rootbridge_handle(unsigned int seg, unsigned int bus)
struct
acpi_pci_root
*
root
;
list_for_each_entry
(
root
,
&
acpi_pci_roots
,
node
)
if
((
root
->
segment
==
(
u16
)
seg
)
&&
(
root
->
bus_nr
==
(
u16
)
bus
))
if
((
root
->
segment
==
(
u16
)
seg
)
&&
(
root
->
secondary
.
start
==
(
u16
)
bus
))
return
root
->
device
->
handle
;
return
NULL
;
}
...
...
@@ -154,7 +155,7 @@ EXPORT_SYMBOL_GPL(acpi_is_root_bridge);
static
acpi_status
get_root_bridge_busnr_callback
(
struct
acpi_resource
*
resource
,
void
*
data
)
{
int
*
busnr
=
data
;
struct
resource
*
res
=
data
;
struct
acpi_resource_address64
address
;
if
(
resource
->
type
!=
ACPI_RESOURCE_TYPE_ADDRESS16
&&
...
...
@@ -164,28 +165,27 @@ get_root_bridge_busnr_callback(struct acpi_resource *resource, void *data)
acpi_resource_to_address64
(
resource
,
&
address
);
if
((
address
.
address_length
>
0
)
&&
(
address
.
resource_type
==
ACPI_BUS_NUMBER_RANGE
))
*
busnr
=
address
.
minimum
;
(
address
.
resource_type
==
ACPI_BUS_NUMBER_RANGE
))
{
res
->
start
=
address
.
minimum
;
res
->
end
=
address
.
minimum
+
address
.
address_length
-
1
;
}
return
AE_OK
;
}
static
acpi_status
try_get_root_bridge_busnr
(
acpi_handle
handle
,
unsigned
long
long
*
bu
s
)
struct
resource
*
re
s
)
{
acpi_status
status
;
int
busnum
;
busnum
=
-
1
;
res
->
start
=
-
1
;
status
=
acpi_walk_resources
(
handle
,
METHOD_NAME__CRS
,
get_root_bridge_busnr_callback
,
&
busnum
);
get_root_bridge_busnr_callback
,
res
);
if
(
ACPI_FAILURE
(
status
))
return
status
;
/* Check if we really get a bus number from _CRS */
if
(
busnum
==
-
1
)
if
(
res
->
start
==
-
1
)
return
AE_ERROR
;
*
bus
=
busnum
;
return
AE_OK
;
}
...
...
@@ -429,34 +429,47 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
struct
acpi_device
*
child
;
u32
flags
,
base_flags
;
root
=
kzalloc
(
sizeof
(
struct
acpi_pci_root
),
GFP_KERNEL
);
if
(
!
root
)
return
-
ENOMEM
;
segment
=
0
;
status
=
acpi_evaluate_integer
(
device
->
handle
,
METHOD_NAME__SEG
,
NULL
,
&
segment
);
if
(
ACPI_FAILURE
(
status
)
&&
status
!=
AE_NOT_FOUND
)
{
printk
(
KERN_ERR
PREFIX
"can't evaluate _SEG
\n
"
);
return
-
ENODEV
;
result
=
-
ENODEV
;
goto
end
;
}
/* Check _CRS first, then _BBN. If no _BBN, default to zero. */
bus
=
0
;
status
=
try_get_root_bridge_busnr
(
device
->
handle
,
&
bus
);
root
->
secondary
.
flags
=
IORESOURCE_BUS
;
status
=
try_get_root_bridge_busnr
(
device
->
handle
,
&
root
->
secondary
);
if
(
ACPI_FAILURE
(
status
))
{
/*
* We need both the start and end of the downstream bus range
* to interpret _CBA (MMCONFIG base address), so it really is
* supposed to be in _CRS. If we don't find it there, all we
* can do is assume [_BBN-0xFF] or [0-0xFF].
*/
root
->
secondary
.
end
=
0xFF
;
printk
(
KERN_WARNING
FW_BUG
PREFIX
"no secondary bus range in _CRS
\n
"
);
status
=
acpi_evaluate_integer
(
device
->
handle
,
METHOD_NAME__BBN
,
NULL
,
&
bus
);
if
(
ACPI_FAILURE
(
status
)
&&
status
!=
AE_NOT_FOUND
)
{
printk
(
KERN_ERR
PREFIX
"no bus number in _CRS and can't evaluate _BBN
\n
"
);
return
-
ENODEV
;
if
(
ACPI_SUCCESS
(
status
))
root
->
secondary
.
start
=
bus
;
else
if
(
status
==
AE_NOT_FOUND
)
root
->
secondary
.
start
=
0
;
else
{
printk
(
KERN_ERR
PREFIX
"can't evaluate _BBN
\n
"
);
result
=
-
ENODEV
;
goto
end
;
}
}
root
=
kzalloc
(
sizeof
(
struct
acpi_pci_root
),
GFP_KERNEL
);
if
(
!
root
)
return
-
ENOMEM
;
INIT_LIST_HEAD
(
&
root
->
node
);
root
->
device
=
device
;
root
->
segment
=
segment
&
0xFFFF
;
root
->
bus_nr
=
bus
&
0xFF
;
strcpy
(
acpi_device_name
(
device
),
ACPI_PCI_ROOT_DEVICE_NAME
);
strcpy
(
acpi_device_class
(
device
),
ACPI_PCI_ROOT_CLASS
);
device
->
driver_data
=
root
;
...
...
@@ -475,9 +488,9 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
/* TBD: Locking */
list_add_tail
(
&
root
->
node
,
&
acpi_pci_roots
);
printk
(
KERN_INFO
PREFIX
"%s [%s] (
%04x:%02x
)
\n
"
,
printk
(
KERN_INFO
PREFIX
"%s [%s] (
domain %04x %pR
)
\n
"
,
acpi_device_name
(
device
),
acpi_device_bid
(
device
),
root
->
segment
,
root
->
bus_nr
);
root
->
segment
,
&
root
->
secondary
);
/*
* Scan the Root Bridge
...
...
@@ -486,11 +499,11 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
* PCI namespace does not get created until this call is made (and
* thus the root bridge's pci_dev does not exist).
*/
root
->
bus
=
pci_acpi_scan_root
(
device
,
segment
,
bus
);
root
->
bus
=
pci_acpi_scan_root
(
root
);
if
(
!
root
->
bus
)
{
printk
(
KERN_ERR
PREFIX
"Bus %04x:%02x not present in PCI namespace
\n
"
,
root
->
segment
,
root
->
bus_nr
);
root
->
segment
,
(
unsigned
int
)
root
->
secondary
.
start
);
result
=
-
ENODEV
;
goto
end
;
}
...
...
include/acpi/acpi_bus.h
浏览文件 @
dc1544ea
...
...
@@ -373,7 +373,7 @@ struct acpi_pci_root {
struct
acpi_pci_id
id
;
struct
pci_bus
*
bus
;
u16
segment
;
u8
bus_nr
;
struct
resource
secondary
;
/* downstream bus range */
u32
osc_support_set
;
/* _OSC state of support bits */
u32
osc_control_set
;
/* _OSC state of control bits */
...
...
include/acpi/acpi_drivers.h
浏览文件 @
dc1544ea
...
...
@@ -104,8 +104,7 @@ int acpi_pci_bind_root(struct acpi_device *device);
/* Arch-defined function to add a bus to the system */
struct
pci_bus
*
pci_acpi_scan_root
(
struct
acpi_device
*
device
,
int
domain
,
int
bus
);
struct
pci_bus
*
pci_acpi_scan_root
(
struct
acpi_pci_root
*
root
);
void
pci_acpi_crs_quirks
(
void
);
/* --------------------------------------------------------------------------
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录