Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
OpenBMC Firmware
talos-obmc-linux
Commits
adb2705a
Commit
adb2705a
authored
19 years ago
by
Linus Torvalds
Browse files
Options
Download
Plain Diff
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
parents
f340c0d1
8644d2a4
Changes
69
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
223 additions
and
42 deletions
+223
-42
drivers/pci/probe.c
drivers/pci/probe.c
+22
-7
drivers/pci/proc.c
drivers/pci/proc.c
+10
-4
drivers/pci/remove.c
drivers/pci/remove.c
+9
-5
drivers/pci/setup-bus.c
drivers/pci/setup-bus.c
+4
-1
drivers/scsi/3w-9xxx.c
drivers/scsi/3w-9xxx.c
+3
-5
drivers/scsi/3w-xxxx.c
drivers/scsi/3w-xxxx.c
+3
-5
drivers/scsi/ipr.c
drivers/scsi/ipr.c
+4
-6
drivers/scsi/megaraid.c
drivers/scsi/megaraid.c
+3
-5
include/acpi/acpi_bus.h
include/acpi/acpi_bus.h
+16
-1
include/acpi/acpi_drivers.h
include/acpi/acpi_drivers.h
+1
-0
include/asm-alpha/pci.h
include/asm-alpha/pci.h
+19
-0
include/asm-arm/pci.h
include/asm-arm/pci.h
+10
-0
include/asm-frv/pci.h
include/asm-frv/pci.h
+10
-0
include/asm-i386/pci.h
include/asm-i386/pci.h
+10
-0
include/asm-ia64/iosapic.h
include/asm-ia64/iosapic.h
+9
-3
include/asm-ia64/pci.h
include/asm-ia64/pci.h
+19
-0
include/asm-mips/pci.h
include/asm-mips/pci.h
+10
-0
include/asm-parisc/pci.h
include/asm-parisc/pci.h
+19
-0
include/asm-ppc/pci.h
include/asm-ppc/pci.h
+16
-0
include/asm-ppc64/pci.h
include/asm-ppc64/pci.h
+26
-0
No files found.
drivers/pci/probe.c
View file @
adb2705a
...
@@ -374,8 +374,11 @@ struct pci_bus * __devinit pci_add_new_bus(struct pci_bus *parent, struct pci_de
...
@@ -374,8 +374,11 @@ struct pci_bus * __devinit pci_add_new_bus(struct pci_bus *parent, struct pci_de
struct
pci_bus
*
child
;
struct
pci_bus
*
child
;
child
=
pci_alloc_child_bus
(
parent
,
dev
,
busnr
);
child
=
pci_alloc_child_bus
(
parent
,
dev
,
busnr
);
if
(
child
)
if
(
child
)
{
spin_lock
(
&
pci_bus_lock
);
list_add_tail
(
&
child
->
node
,
&
parent
->
children
);
list_add_tail
(
&
child
->
node
,
&
parent
->
children
);
spin_unlock
(
&
pci_bus_lock
);
}
return
child
;
return
child
;
}
}
...
@@ -411,7 +414,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
...
@@ -411,7 +414,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
{
{
struct
pci_bus
*
child
;
struct
pci_bus
*
child
;
int
is_cardbus
=
(
dev
->
hdr_type
==
PCI_HEADER_TYPE_CARDBUS
);
int
is_cardbus
=
(
dev
->
hdr_type
==
PCI_HEADER_TYPE_CARDBUS
);
u32
buses
;
u32
buses
,
i
;
u16
bctl
;
u16
bctl
;
pci_read_config_dword
(
dev
,
PCI_PRIMARY_BUS
,
&
buses
);
pci_read_config_dword
(
dev
,
PCI_PRIMARY_BUS
,
&
buses
);
...
@@ -447,7 +450,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
...
@@ -447,7 +450,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
return
max
;
return
max
;
}
}
child
=
pci_a
lloc_child
_bus
(
bus
,
dev
,
busnr
);
child
=
pci_a
dd_new
_bus
(
bus
,
dev
,
busnr
);
if
(
!
child
)
if
(
!
child
)
return
max
;
return
max
;
child
->
primary
=
buses
&
0xFF
;
child
->
primary
=
buses
&
0xFF
;
...
@@ -470,7 +473,11 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
...
@@ -470,7 +473,11 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
/* Clear errors */
/* Clear errors */
pci_write_config_word
(
dev
,
PCI_STATUS
,
0xffff
);
pci_write_config_word
(
dev
,
PCI_STATUS
,
0xffff
);
child
=
pci_alloc_child_bus
(
bus
,
dev
,
++
max
);
/* Prevent assigning a bus number that already exists.
* This can happen when a bridge is hot-plugged */
if
(
pci_find_bus
(
pci_domain_nr
(
bus
),
max
+
1
))
return
max
;
child
=
pci_add_new_bus
(
bus
,
dev
,
++
max
);
buses
=
(
buses
&
0xff000000
)
buses
=
(
buses
&
0xff000000
)
|
((
unsigned
int
)(
child
->
primary
)
<<
0
)
|
((
unsigned
int
)(
child
->
primary
)
<<
0
)
|
((
unsigned
int
)(
child
->
secondary
)
<<
8
)
|
((
unsigned
int
)(
child
->
secondary
)
<<
8
)
...
@@ -501,7 +508,11 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
...
@@ -501,7 +508,11 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
* as cards with a PCI-to-PCI bridge can be
* as cards with a PCI-to-PCI bridge can be
* inserted later.
* inserted later.
*/
*/
max
+=
CARDBUS_RESERVE_BUSNR
;
for
(
i
=
0
;
i
<
CARDBUS_RESERVE_BUSNR
;
i
++
)
if
(
pci_find_bus
(
pci_domain_nr
(
bus
),
max
+
i
+
1
))
break
;
max
+=
i
;
}
}
/*
/*
* Set the subordinate bus number to its real value.
* Set the subordinate bus number to its real value.
...
@@ -757,7 +768,9 @@ pci_scan_single_device(struct pci_bus *bus, int devfn)
...
@@ -757,7 +768,9 @@ pci_scan_single_device(struct pci_bus *bus, int devfn)
* and the bus list for fixup functions, etc.
* and the bus list for fixup functions, etc.
*/
*/
INIT_LIST_HEAD
(
&
dev
->
global_list
);
INIT_LIST_HEAD
(
&
dev
->
global_list
);
spin_lock
(
&
pci_bus_lock
);
list_add_tail
(
&
dev
->
bus_list
,
&
bus
->
devices
);
list_add_tail
(
&
dev
->
bus_list
,
&
bus
->
devices
);
spin_unlock
(
&
pci_bus_lock
);
return
dev
;
return
dev
;
}
}
...
@@ -878,7 +891,9 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
...
@@ -878,7 +891,9 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
pr_debug
(
"PCI: Bus %04x:%02x already known
\n
"
,
pci_domain_nr
(
b
),
bus
);
pr_debug
(
"PCI: Bus %04x:%02x already known
\n
"
,
pci_domain_nr
(
b
),
bus
);
goto
err_out
;
goto
err_out
;
}
}
spin_lock
(
&
pci_bus_lock
);
list_add_tail
(
&
b
->
node
,
&
pci_root_buses
);
list_add_tail
(
&
b
->
node
,
&
pci_root_buses
);
spin_unlock
(
&
pci_bus_lock
);
memset
(
dev
,
0
,
sizeof
(
*
dev
));
memset
(
dev
,
0
,
sizeof
(
*
dev
));
dev
->
parent
=
parent
;
dev
->
parent
=
parent
;
...
@@ -911,8 +926,6 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
...
@@ -911,8 +926,6 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
b
->
subordinate
=
pci_scan_child_bus
(
b
);
b
->
subordinate
=
pci_scan_child_bus
(
b
);
pci_bus_add_devices
(
b
);
return
b
;
return
b
;
sys_create_link_err:
sys_create_link_err:
...
@@ -922,7 +935,9 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
...
@@ -922,7 +935,9 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
class_dev_reg_err:
class_dev_reg_err:
device_unregister
(
dev
);
device_unregister
(
dev
);
dev_reg_err:
dev_reg_err:
spin_lock
(
&
pci_bus_lock
);
list_del
(
&
b
->
node
);
list_del
(
&
b
->
node
);
spin_unlock
(
&
pci_bus_lock
);
err_out:
err_out:
kfree
(
dev
);
kfree
(
dev
);
kfree
(
b
);
kfree
(
b
);
...
...
This diff is collapsed.
Click to expand it.
drivers/pci/proc.c
View file @
adb2705a
...
@@ -355,14 +355,20 @@ static int show_device(struct seq_file *m, void *v)
...
@@ -355,14 +355,20 @@ static int show_device(struct seq_file *m, void *v)
dev
->
device
,
dev
->
device
,
dev
->
irq
);
dev
->
irq
);
/* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */
/* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */
for
(
i
=
0
;
i
<
7
;
i
++
)
for
(
i
=
0
;
i
<
7
;
i
++
)
{
u64
start
,
end
;
pci_resource_to_user
(
dev
,
i
,
&
dev
->
resource
[
i
],
&
start
,
&
end
);
seq_printf
(
m
,
LONG_FORMAT
,
seq_printf
(
m
,
LONG_FORMAT
,
dev
->
resource
[
i
].
start
|
((
unsigned
long
)
start
)
|
(
dev
->
resource
[
i
].
flags
&
PCI_REGION_FLAG_MASK
));
(
dev
->
resource
[
i
].
flags
&
PCI_REGION_FLAG_MASK
));
for
(
i
=
0
;
i
<
7
;
i
++
)
}
for
(
i
=
0
;
i
<
7
;
i
++
)
{
u64
start
,
end
;
pci_resource_to_user
(
dev
,
i
,
&
dev
->
resource
[
i
],
&
start
,
&
end
);
seq_printf
(
m
,
LONG_FORMAT
,
seq_printf
(
m
,
LONG_FORMAT
,
dev
->
resource
[
i
].
start
<
dev
->
resource
[
i
].
end
?
dev
->
resource
[
i
].
start
<
dev
->
resource
[
i
].
end
?
dev
->
resource
[
i
].
end
-
dev
->
resource
[
i
].
start
+
1
:
0
);
(
unsigned
long
)(
end
-
start
)
+
1
:
0
);
}
seq_putc
(
m
,
'\t'
);
seq_putc
(
m
,
'\t'
);
if
(
drv
)
if
(
drv
)
seq_printf
(
m
,
"%s"
,
drv
->
name
);
seq_printf
(
m
,
"%s"
,
drv
->
name
);
...
...
This diff is collapsed.
Click to expand it.
drivers/pci/remove.c
View file @
adb2705a
...
@@ -18,17 +18,21 @@ static void pci_free_resources(struct pci_dev *dev)
...
@@ -18,17 +18,21 @@ static void pci_free_resources(struct pci_dev *dev)
static
void
pci_destroy_dev
(
struct
pci_dev
*
dev
)
static
void
pci_destroy_dev
(
struct
pci_dev
*
dev
)
{
{
pci_proc_detach_device
(
dev
);
if
(
!
list_empty
(
&
dev
->
global_list
))
{
pci_remove_sysfs_dev_files
(
dev
);
pci_proc_detach_device
(
dev
);
device_unregister
(
&
dev
->
dev
);
pci_remove_sysfs_dev_files
(
dev
);
device_unregister
(
&
dev
->
dev
);
spin_lock
(
&
pci_bus_lock
);
list_del
(
&
dev
->
global_list
);
dev
->
global_list
.
next
=
dev
->
global_list
.
prev
=
NULL
;
spin_unlock
(
&
pci_bus_lock
);
}
/* Remove the device from the device lists, and prevent any further
/* Remove the device from the device lists, and prevent any further
* list accesses from this device */
* list accesses from this device */
spin_lock
(
&
pci_bus_lock
);
spin_lock
(
&
pci_bus_lock
);
list_del
(
&
dev
->
bus_list
);
list_del
(
&
dev
->
bus_list
);
list_del
(
&
dev
->
global_list
);
dev
->
bus_list
.
next
=
dev
->
bus_list
.
prev
=
NULL
;
dev
->
bus_list
.
next
=
dev
->
bus_list
.
prev
=
NULL
;
dev
->
global_list
.
next
=
dev
->
global_list
.
prev
=
NULL
;
spin_unlock
(
&
pci_bus_lock
);
spin_unlock
(
&
pci_bus_lock
);
pci_free_resources
(
dev
);
pci_free_resources
(
dev
);
...
...
This diff is collapsed.
Click to expand it.
drivers/pci/setup-bus.c
View file @
adb2705a
...
@@ -72,7 +72,10 @@ pbus_assign_resources_sorted(struct pci_bus *bus)
...
@@ -72,7 +72,10 @@ pbus_assign_resources_sorted(struct pci_bus *bus)
for
(
list
=
head
.
next
;
list
;)
{
for
(
list
=
head
.
next
;
list
;)
{
res
=
list
->
res
;
res
=
list
->
res
;
idx
=
res
-
&
list
->
dev
->
resource
[
0
];
idx
=
res
-
&
list
->
dev
->
resource
[
0
];
pci_assign_resource
(
list
->
dev
,
idx
);
if
(
pci_assign_resource
(
list
->
dev
,
idx
))
{
res
->
start
=
0
;
res
->
flags
=
0
;
}
tmp
=
list
;
tmp
=
list
;
list
=
list
->
next
;
list
=
list
->
next
;
kfree
(
tmp
);
kfree
(
tmp
);
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/3w-9xxx.c
View file @
adb2705a
...
@@ -1916,9 +1916,9 @@ static void __twa_shutdown(TW_Device_Extension *tw_dev)
...
@@ -1916,9 +1916,9 @@ static void __twa_shutdown(TW_Device_Extension *tw_dev)
}
/* End __twa_shutdown() */
}
/* End __twa_shutdown() */
/* Wrapper for __twa_shutdown */
/* Wrapper for __twa_shutdown */
static
void
twa_shutdown
(
struct
dev
ice
*
dev
)
static
void
twa_shutdown
(
struct
pci_
dev
*
p
dev
)
{
{
struct
Scsi_Host
*
host
=
pci_get_drvdata
(
to_pci_dev
(
dev
)
);
struct
Scsi_Host
*
host
=
pci_get_drvdata
(
pdev
);
TW_Device_Extension
*
tw_dev
=
(
TW_Device_Extension
*
)
host
->
hostdata
;
TW_Device_Extension
*
tw_dev
=
(
TW_Device_Extension
*
)
host
->
hostdata
;
__twa_shutdown
(
tw_dev
);
__twa_shutdown
(
tw_dev
);
...
@@ -2140,9 +2140,7 @@ static struct pci_driver twa_driver = {
...
@@ -2140,9 +2140,7 @@ static struct pci_driver twa_driver = {
.
id_table
=
twa_pci_tbl
,
.
id_table
=
twa_pci_tbl
,
.
probe
=
twa_probe
,
.
probe
=
twa_probe
,
.
remove
=
twa_remove
,
.
remove
=
twa_remove
,
.
driver
=
{
.
shutdown
=
twa_shutdown
.
shutdown
=
twa_shutdown
}
};
};
/* This function is called on driver initialization */
/* This function is called on driver initialization */
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/3w-xxxx.c
View file @
adb2705a
...
@@ -2264,9 +2264,9 @@ static void __tw_shutdown(TW_Device_Extension *tw_dev)
...
@@ -2264,9 +2264,9 @@ static void __tw_shutdown(TW_Device_Extension *tw_dev)
}
/* End __tw_shutdown() */
}
/* End __tw_shutdown() */
/* Wrapper for __tw_shutdown */
/* Wrapper for __tw_shutdown */
static
void
tw_shutdown
(
struct
dev
ice
*
dev
)
static
void
tw_shutdown
(
struct
pci_
dev
*
p
dev
)
{
{
struct
Scsi_Host
*
host
=
pci_get_drvdata
(
to_pci_dev
(
dev
)
);
struct
Scsi_Host
*
host
=
pci_get_drvdata
(
pdev
);
TW_Device_Extension
*
tw_dev
=
(
TW_Device_Extension
*
)
host
->
hostdata
;
TW_Device_Extension
*
tw_dev
=
(
TW_Device_Extension
*
)
host
->
hostdata
;
__tw_shutdown
(
tw_dev
);
__tw_shutdown
(
tw_dev
);
...
@@ -2451,9 +2451,7 @@ static struct pci_driver tw_driver = {
...
@@ -2451,9 +2451,7 @@ static struct pci_driver tw_driver = {
.
id_table
=
tw_pci_tbl
,
.
id_table
=
tw_pci_tbl
,
.
probe
=
tw_probe
,
.
probe
=
tw_probe
,
.
remove
=
tw_remove
,
.
remove
=
tw_remove
,
.
driver
=
{
.
shutdown
=
tw_shutdown
,
.
shutdown
=
tw_shutdown
}
};
};
/* This function is called on driver initialization */
/* This function is called on driver initialization */
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/ipr.c
View file @
adb2705a
...
@@ -6012,7 +6012,7 @@ static int __devinit ipr_probe(struct pci_dev *pdev,
...
@@ -6012,7 +6012,7 @@ static int __devinit ipr_probe(struct pci_dev *pdev,
/**
/**
* ipr_shutdown - Shutdown handler.
* ipr_shutdown - Shutdown handler.
* @dev: device struct
* @
p
dev:
pci
device struct
*
*
* This function is invoked upon system shutdown/reboot. It will issue
* This function is invoked upon system shutdown/reboot. It will issue
* an adapter shutdown to the adapter to flush the write cache.
* an adapter shutdown to the adapter to flush the write cache.
...
@@ -6020,9 +6020,9 @@ static int __devinit ipr_probe(struct pci_dev *pdev,
...
@@ -6020,9 +6020,9 @@ static int __devinit ipr_probe(struct pci_dev *pdev,
* Return value:
* Return value:
* none
* none
**/
**/
static void ipr_shutdown(struct dev
ice
*dev)
static void ipr_shutdown(struct
pci_
dev *
p
dev)
{
{
struct ipr_ioa_cfg *ioa_cfg = pci_get_drvdata(
to_pci_dev(dev)
);
struct ipr_ioa_cfg *ioa_cfg = pci_get_drvdata(
pdev
);
unsigned long lock_flags = 0;
unsigned long lock_flags = 0;
spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
...
@@ -6068,9 +6068,7 @@ static struct pci_driver ipr_driver = {
...
@@ -6068,9 +6068,7 @@ static struct pci_driver ipr_driver = {
.id_table = ipr_pci_table,
.id_table = ipr_pci_table,
.probe = ipr_probe,
.probe = ipr_probe,
.remove = ipr_remove,
.remove = ipr_remove,
.driver = {
.shutdown = ipr_shutdown,
.shutdown = ipr_shutdown,
},
};
};
/**
/**
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/megaraid.c
View file @
adb2705a
...
@@ -5036,9 +5036,9 @@ megaraid_remove_one(struct pci_dev *pdev)
...
@@ -5036,9 +5036,9 @@ megaraid_remove_one(struct pci_dev *pdev)
}
}
static void
static void
megaraid_shutdown(struct dev
ice
*dev)
megaraid_shutdown(struct
pci_
dev *
p
dev)
{
{
struct Scsi_Host *host = pci_get_drvdata(
to_pci_dev(dev)
);
struct Scsi_Host *host = pci_get_drvdata(
pdev
);
adapter_t *adapter = (adapter_t *)host->hostdata;
adapter_t *adapter = (adapter_t *)host->hostdata;
__megaraid_shutdown(adapter);
__megaraid_shutdown(adapter);
...
@@ -5070,9 +5070,7 @@ static struct pci_driver megaraid_pci_driver = {
...
@@ -5070,9 +5070,7 @@ static struct pci_driver megaraid_pci_driver = {
.id_table = megaraid_pci_tbl,
.id_table = megaraid_pci_tbl,
.probe = megaraid_probe_one,
.probe = megaraid_probe_one,
.remove = __devexit_p(megaraid_remove_one),
.remove = __devexit_p(megaraid_remove_one),
.driver = {
.shutdown = megaraid_shutdown,
.shutdown = megaraid_shutdown,
},
};
};
static int __init megaraid_init(void)
static int __init megaraid_init(void)
...
...
This diff is collapsed.
Click to expand it.
include/acpi/acpi_bus.h
View file @
adb2705a
...
@@ -108,6 +108,21 @@ typedef int (*acpi_op_unbind) (struct acpi_device *device);
...
@@ -108,6 +108,21 @@ typedef int (*acpi_op_unbind) (struct acpi_device *device);
typedef
int
(
*
acpi_op_match
)
(
struct
acpi_device
*
device
,
typedef
int
(
*
acpi_op_match
)
(
struct
acpi_device
*
device
,
struct
acpi_driver
*
driver
);
struct
acpi_driver
*
driver
);
struct
acpi_bus_ops
{
u32
acpi_op_add
:
1
;
u32
acpi_op_remove
:
1
;
u32
acpi_op_lock
:
1
;
u32
acpi_op_start
:
1
;
u32
acpi_op_stop
:
1
;
u32
acpi_op_suspend
:
1
;
u32
acpi_op_resume
:
1
;
u32
acpi_op_scan
:
1
;
u32
acpi_op_bind
:
1
;
u32
acpi_op_unbind
:
1
;
u32
acpi_op_match
:
1
;
u32
reserved
:
21
;
};
struct
acpi_device_ops
{
struct
acpi_device_ops
{
acpi_op_add
add
;
acpi_op_add
add
;
acpi_op_remove
remove
;
acpi_op_remove
remove
;
...
@@ -327,9 +342,9 @@ int acpi_bus_generate_event (struct acpi_device *device, u8 type, int data);
...
@@ -327,9 +342,9 @@ int acpi_bus_generate_event (struct acpi_device *device, u8 type, int data);
int
acpi_bus_receive_event
(
struct
acpi_bus_event
*
event
);
int
acpi_bus_receive_event
(
struct
acpi_bus_event
*
event
);
int
acpi_bus_register_driver
(
struct
acpi_driver
*
driver
);
int
acpi_bus_register_driver
(
struct
acpi_driver
*
driver
);
int
acpi_bus_unregister_driver
(
struct
acpi_driver
*
driver
);
int
acpi_bus_unregister_driver
(
struct
acpi_driver
*
driver
);
int
acpi_bus_scan
(
struct
acpi_device
*
start
);
int
acpi_bus_add
(
struct
acpi_device
**
child
,
struct
acpi_device
*
parent
,
int
acpi_bus_add
(
struct
acpi_device
**
child
,
struct
acpi_device
*
parent
,
acpi_handle
handle
,
int
type
);
acpi_handle
handle
,
int
type
);
int
acpi_bus_start
(
struct
acpi_device
*
device
);
int
acpi_match_ids
(
struct
acpi_device
*
device
,
char
*
ids
);
int
acpi_match_ids
(
struct
acpi_device
*
device
,
char
*
ids
);
...
...
This diff is collapsed.
Click to expand it.
include/acpi/acpi_drivers.h
View file @
adb2705a
...
@@ -68,6 +68,7 @@ void acpi_pci_irq_del_prt (int segment, int bus);
...
@@ -68,6 +68,7 @@ void acpi_pci_irq_del_prt (int segment, int bus);
struct
pci_bus
;
struct
pci_bus
;
acpi_status
acpi_get_pci_id
(
acpi_handle
handle
,
struct
acpi_pci_id
*
id
);
int
acpi_pci_bind
(
struct
acpi_device
*
device
);
int
acpi_pci_bind
(
struct
acpi_device
*
device
);
int
acpi_pci_unbind
(
struct
acpi_device
*
device
);
int
acpi_pci_unbind
(
struct
acpi_device
*
device
);
int
acpi_pci_bind_root
(
struct
acpi_device
*
device
,
struct
acpi_pci_id
*
id
,
struct
pci_bus
*
bus
);
int
acpi_pci_bind_root
(
struct
acpi_device
*
device
,
struct
acpi_pci_id
*
id
,
struct
pci_bus
*
bus
);
...
...
This diff is collapsed.
Click to expand it.
include/asm-alpha/pci.h
View file @
adb2705a
...
@@ -223,6 +223,25 @@ pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr,
...
@@ -223,6 +223,25 @@ pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr,
/* Nothing to do. */
/* Nothing to do. */
}
}
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
unsigned
long
cacheline_size
;
u8
byte
;
pci_read_config_byte
(
pdev
,
PCI_CACHE_LINE_SIZE
,
&
byte
);
if
(
byte
==
0
)
cacheline_size
=
1024
;
else
cacheline_size
=
(
int
)
byte
*
4
;
*
strat
=
PCI_DMA_BURST_BOUNDARY
;
*
strategy_parameter
=
cacheline_size
;
}
#endif
/* TODO: integrate with include/asm-generic/pci.h ? */
/* TODO: integrate with include/asm-generic/pci.h ? */
static
inline
int
pci_get_legacy_ide_irq
(
struct
pci_dev
*
dev
,
int
channel
)
static
inline
int
pci_get_legacy_ide_irq
(
struct
pci_dev
*
dev
,
int
channel
)
{
{
...
...
This diff is collapsed.
Click to expand it.
include/asm-arm/pci.h
View file @
adb2705a
...
@@ -42,6 +42,16 @@ static inline void pcibios_penalize_isa_irq(int irq)
...
@@ -42,6 +42,16 @@ static inline void pcibios_penalize_isa_irq(int irq)
#define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME)
#define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME)
#define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL))
#define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL))
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
*
strat
=
PCI_DMA_BURST_INFINITY
;
*
strategy_parameter
=
~
0UL
;
}
#endif
#define HAVE_PCI_MMAP
#define HAVE_PCI_MMAP
extern
int
pci_mmap_page_range
(
struct
pci_dev
*
dev
,
struct
vm_area_struct
*
vma
,
extern
int
pci_mmap_page_range
(
struct
pci_dev
*
dev
,
struct
vm_area_struct
*
vma
,
enum
pci_mmap_state
mmap_state
,
int
write_combine
);
enum
pci_mmap_state
mmap_state
,
int
write_combine
);
...
...
This diff is collapsed.
Click to expand it.
include/asm-frv/pci.h
View file @
adb2705a
...
@@ -57,6 +57,16 @@ extern void pci_free_consistent(struct pci_dev *hwdev, size_t size,
...
@@ -57,6 +57,16 @@ extern void pci_free_consistent(struct pci_dev *hwdev, size_t size,
*/
*/
#define PCI_DMA_BUS_IS_PHYS (1)
#define PCI_DMA_BUS_IS_PHYS (1)
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
*
strat
=
PCI_DMA_BURST_INFINITY
;
*
strategy_parameter
=
~
0UL
;
}
#endif
/*
/*
* These are pretty much arbitary with the CoMEM implementation.
* These are pretty much arbitary with the CoMEM implementation.
* We have the whole address space to ourselves.
* We have the whole address space to ourselves.
...
...
This diff is collapsed.
Click to expand it.
include/asm-i386/pci.h
View file @
adb2705a
...
@@ -99,6 +99,16 @@ static inline void pcibios_add_platform_entries(struct pci_dev *dev)
...
@@ -99,6 +99,16 @@ static inline void pcibios_add_platform_entries(struct pci_dev *dev)
{
{
}
}
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
*
strat
=
PCI_DMA_BURST_INFINITY
;
*
strategy_parameter
=
~
0UL
;
}
#endif
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
/* implement the pci_ DMA API in terms of the generic device dma_ one */
/* implement the pci_ DMA API in terms of the generic device dma_ one */
...
...
This diff is collapsed.
Click to expand it.
include/asm-ia64/iosapic.h
View file @
adb2705a
...
@@ -71,8 +71,11 @@ static inline void iosapic_eoi(char __iomem *iosapic, u32 vector)
...
@@ -71,8 +71,11 @@ static inline void iosapic_eoi(char __iomem *iosapic, u32 vector)
}
}
extern
void
__init
iosapic_system_init
(
int
pcat_compat
);
extern
void
__init
iosapic_system_init
(
int
pcat_compat
);
extern
void
__
init
iosapic_init
(
unsigned
long
address
,
extern
int
__dev
init
iosapic_init
(
unsigned
long
address
,
unsigned
int
gsi_base
);
unsigned
int
gsi_base
);
#ifdef CONFIG_HOTPLUG
extern
int
iosapic_remove
(
unsigned
int
gsi_base
);
#endif
/* CONFIG_HOTPLUG */
extern
int
gsi_to_vector
(
unsigned
int
gsi
);
extern
int
gsi_to_vector
(
unsigned
int
gsi
);
extern
int
gsi_to_irq
(
unsigned
int
gsi
);
extern
int
gsi_to_irq
(
unsigned
int
gsi
);
extern
void
iosapic_enable_intr
(
unsigned
int
vector
);
extern
void
iosapic_enable_intr
(
unsigned
int
vector
);
...
@@ -94,11 +97,14 @@ extern unsigned int iosapic_version (char __iomem *addr);
...
@@ -94,11 +97,14 @@ extern unsigned int iosapic_version (char __iomem *addr);
extern
void
iosapic_pci_fixup
(
int
);
extern
void
iosapic_pci_fixup
(
int
);
#ifdef CONFIG_NUMA
#ifdef CONFIG_NUMA
extern
void
__init
map_iosapic_to_node
(
unsigned
int
,
int
);
extern
void
__
dev
init
map_iosapic_to_node
(
unsigned
int
,
int
);
#endif
#endif
#else
#else
#define iosapic_system_init(pcat_compat) do { } while (0)
#define iosapic_system_init(pcat_compat) do { } while (0)
#define iosapic_init(address,gsi_base) do { } while (0)
#define iosapic_init(address,gsi_base) (-EINVAL)
#ifdef CONFIG_HOTPLUG
#define iosapic_remove(gsi_base) (-ENODEV)
#endif
/* CONFIG_HOTPLUG */
#define iosapic_register_intr(gsi,polarity,trigger) (gsi)
#define iosapic_register_intr(gsi,polarity,trigger) (gsi)
#define iosapic_unregister_intr(irq) do { } while (0)
#define iosapic_unregister_intr(irq) do { } while (0)
#define iosapic_override_isa_irq(isa_irq,gsi,polarity,trigger) do { } while (0)
#define iosapic_override_isa_irq(isa_irq,gsi,polarity,trigger) do { } while (0)
...
...
This diff is collapsed.
Click to expand it.
include/asm-ia64/pci.h
View file @
adb2705a
...
@@ -82,6 +82,25 @@ extern int pcibios_prep_mwi (struct pci_dev *);
...
@@ -82,6 +82,25 @@ extern int pcibios_prep_mwi (struct pci_dev *);
#define sg_dma_len(sg) ((sg)->dma_length)
#define sg_dma_len(sg) ((sg)->dma_length)
#define sg_dma_address(sg) ((sg)->dma_address)
#define sg_dma_address(sg) ((sg)->dma_address)
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
unsigned
long
cacheline_size
;
u8
byte
;
pci_read_config_byte
(
pdev
,
PCI_CACHE_LINE_SIZE
,
&
byte
);
if
(
byte
==
0
)
cacheline_size
=
1024
;
else
cacheline_size
=
(
int
)
byte
*
4
;
*
strat
=
PCI_DMA_BURST_MULTIPLE
;
*
strategy_parameter
=
cacheline_size
;
}
#endif
#define HAVE_PCI_MMAP
#define HAVE_PCI_MMAP
extern
int
pci_mmap_page_range
(
struct
pci_dev
*
dev
,
struct
vm_area_struct
*
vma
,
extern
int
pci_mmap_page_range
(
struct
pci_dev
*
dev
,
struct
vm_area_struct
*
vma
,
enum
pci_mmap_state
mmap_state
,
int
write_combine
);
enum
pci_mmap_state
mmap_state
,
int
write_combine
);
...
...
This diff is collapsed.
Click to expand it.
include/asm-mips/pci.h
View file @
adb2705a
...
@@ -130,6 +130,16 @@ extern void pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev,
...
@@ -130,6 +130,16 @@ extern void pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev,
extern
void
pci_dac_dma_sync_single_for_device
(
struct
pci_dev
*
pdev
,
extern
void
pci_dac_dma_sync_single_for_device
(
struct
pci_dev
*
pdev
,
dma64_addr_t
dma_addr
,
size_t
len
,
int
direction
);
dma64_addr_t
dma_addr
,
size_t
len
,
int
direction
);
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
*
strat
=
PCI_DMA_BURST_INFINITY
;
*
strategy_parameter
=
~
0UL
;
}
#endif
extern
void
pcibios_resource_to_bus
(
struct
pci_dev
*
dev
,
extern
void
pcibios_resource_to_bus
(
struct
pci_dev
*
dev
,
struct
pci_bus_region
*
region
,
struct
resource
*
res
);
struct
pci_bus_region
*
region
,
struct
resource
*
res
);
...
...
This diff is collapsed.
Click to expand it.
include/asm-parisc/pci.h
View file @
adb2705a
...
@@ -230,6 +230,25 @@ extern inline void pcibios_register_hba(struct pci_hba_data *x)
...
@@ -230,6 +230,25 @@ extern inline void pcibios_register_hba(struct pci_hba_data *x)
/* export the pci_ DMA API in terms of the dma_ one */
/* export the pci_ DMA API in terms of the dma_ one */
#include <asm-generic/pci-dma-compat.h>
#include <asm-generic/pci-dma-compat.h>
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
unsigned
long
cacheline_size
;
u8
byte
;
pci_read_config_byte
(
pdev
,
PCI_CACHE_LINE_SIZE
,
&
byte
);
if
(
byte
==
0
)
cacheline_size
=
1024
;
else
cacheline_size
=
(
int
)
byte
*
4
;
*
strat
=
PCI_DMA_BURST_MULTIPLE
;
*
strategy_parameter
=
cacheline_size
;
}
#endif
extern
void
extern
void
pcibios_resource_to_bus
(
struct
pci_dev
*
dev
,
struct
pci_bus_region
*
region
,
pcibios_resource_to_bus
(
struct
pci_dev
*
dev
,
struct
pci_bus_region
*
region
,
struct
resource
*
res
);
struct
resource
*
res
);
...
...
This diff is collapsed.
Click to expand it.
include/asm-ppc/pci.h
View file @
adb2705a
...
@@ -69,6 +69,16 @@ extern unsigned long pci_bus_to_phys(unsigned int ba, int busnr);
...
@@ -69,6 +69,16 @@ extern unsigned long pci_bus_to_phys(unsigned int ba, int busnr);
#define pci_unmap_len(PTR, LEN_NAME) (0)
#define pci_unmap_len(PTR, LEN_NAME) (0)
#define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
#define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
*
strat
=
PCI_DMA_BURST_INFINITY
;
*
strategy_parameter
=
~
0UL
;
}
#endif
/*
/*
* At present there are very few 32-bit PPC machines that can have
* At present there are very few 32-bit PPC machines that can have
* memory above the 4GB point, and we don't support that.
* memory above the 4GB point, and we don't support that.
...
@@ -103,6 +113,12 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file,
...
@@ -103,6 +113,12 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file,
unsigned
long
size
,
unsigned
long
size
,
pgprot_t
prot
);
pgprot_t
prot
);
#define HAVE_ARCH_PCI_RESOURCE_TO_USER
extern
void
pci_resource_to_user
(
const
struct
pci_dev
*
dev
,
int
bar
,
const
struct
resource
*
rsrc
,
u64
*
start
,
u64
*
end
);
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
#endif
/* __PPC_PCI_H */
#endif
/* __PPC_PCI_H */
This diff is collapsed.
Click to expand it.
include/asm-ppc64/pci.h
View file @
adb2705a
...
@@ -78,6 +78,25 @@ static inline int pci_dac_dma_supported(struct pci_dev *hwdev,u64 mask)
...
@@ -78,6 +78,25 @@ static inline int pci_dac_dma_supported(struct pci_dev *hwdev,u64 mask)
return
0
;
return
0
;
}
}
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
unsigned
long
cacheline_size
;
u8
byte
;
pci_read_config_byte
(
pdev
,
PCI_CACHE_LINE_SIZE
,
&
byte
);
if
(
byte
==
0
)
cacheline_size
=
1024
;
else
cacheline_size
=
(
int
)
byte
*
4
;
*
strat
=
PCI_DMA_BURST_MULTIPLE
;
*
strategy_parameter
=
cacheline_size
;
}
#endif
extern
int
pci_domain_nr
(
struct
pci_bus
*
bus
);
extern
int
pci_domain_nr
(
struct
pci_bus
*
bus
);
/* Decide whether to display the domain number in /proc */
/* Decide whether to display the domain number in /proc */
...
@@ -136,6 +155,13 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file,
...
@@ -136,6 +155,13 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file,
unsigned
long
size
,
unsigned
long
size
,
pgprot_t
prot
);
pgprot_t
prot
);
#ifdef CONFIG_PPC_MULTIPLATFORM
#define HAVE_ARCH_PCI_RESOURCE_TO_USER
extern
void
pci_resource_to_user
(
const
struct
pci_dev
*
dev
,
int
bar
,
const
struct
resource
*
rsrc
,
u64
*
start
,
u64
*
end
);
#endif
/* CONFIG_PPC_MULTIPLATFORM */
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment