Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
7a77ce94
Commit
7a77ce94
authored
Sep 13, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: first cut at new iomap interfaces.
Only the EEH case (pSeries) handled for now.
parent
cf126d33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
4 deletions
+68
-4
arch/ppc64/Kconfig
arch/ppc64/Kconfig
+0
-4
arch/ppc64/kernel/eeh.c
arch/ppc64/kernel/eeh.c
+68
-0
No files found.
arch/ppc64/Kconfig
View file @
7a77ce94
...
@@ -24,10 +24,6 @@ config GENERIC_ISA_DMA
...
@@ -24,10 +24,6 @@ config GENERIC_ISA_DMA
bool
bool
default y
default y
config GENERIC_IOMAP
bool
default y
config HAVE_DEC_LOCK
config HAVE_DEC_LOCK
bool
bool
default y
default y
...
...
arch/ppc64/kernel/eeh.c
View file @
7a77ce94
...
@@ -704,6 +704,74 @@ void eeh_remove_device(struct pci_dev *dev)
...
@@ -704,6 +704,74 @@ void eeh_remove_device(struct pci_dev *dev)
}
}
EXPORT_SYMBOL
(
eeh_remove_device
);
EXPORT_SYMBOL
(
eeh_remove_device
);
unsigned
int
fastcall
ioread8
(
void
__iomem
*
addr
)
{
return
readb
(
addr
);
}
unsigned
int
fastcall
ioread16
(
void
__iomem
*
addr
)
{
return
readw
(
addr
);
}
unsigned
int
fastcall
ioread32
(
void
__iomem
*
addr
)
{
return
readl
(
addr
);
}
void
fastcall
iowrite8
(
u8
val
,
void
__iomem
*
addr
)
{
writeb
(
val
,
addr
);
}
void
fastcall
iowrite16
(
u16
val
,
void
__iomem
*
addr
)
{
writew
(
val
,
addr
);
}
void
fastcall
iowrite32
(
u32
val
,
void
__iomem
*
addr
)
{
writel
(
val
,
addr
);
}
void
__iomem
*
ioport_map
(
unsigned
long
port
,
unsigned
int
len
)
{
if
(
_IO_IS_VALID
(
port
))
return
NULL
;
return
(
void
__iomem
*
)
IO_ADDR_TO_TOKEN
(
port
+
pci_io_base
);
}
void
ioport_unmap
(
void
__iomem
*
addr
)
{
/* Nothing to do */
}
void
__iomem
*
pci_iomap
(
struct
pci_dev
*
dev
,
int
bar
,
unsigned
long
max
)
{
unsigned
long
start
=
pci_resource_start
(
dev
,
bar
);
unsigned
long
len
=
pci_resource_len
(
dev
,
bar
);
unsigned
long
flags
=
pci_resource_flags
(
dev
,
bar
);
if
(
!
len
)
return
NULL
;
if
(
max
&&
len
>
max
)
len
=
max
;
if
(
flags
&
IORESOURCE_IO
)
return
ioport_map
(
start
,
len
);
if
(
flags
&
IORESOURCE_MEM
)
{
void
__iomem
*
vaddr
=
(
void
__iomem
*
)
start
;
if
(
dev
&&
eeh_subsystem_enabled
)
{
struct
device_node
*
dn
=
pci_device_to_OF_node
(
dev
);
if
(
dn
&&
!
(
dn
->
eeh_mode
&
EEH_MODE_NOCHECK
))
return
(
void
__iomem
*
)
IO_ADDR_TO_TOKEN
(
vaddr
);
}
return
vaddr
;
}
/* What? */
return
NULL
;
}
void
pci_iounmap
(
struct
pci_dev
*
dev
,
void
__iomem
*
addr
)
{
/* Nothing to do */
}
/*
/*
* If EEH is implemented, find the PCI device using given phys addr
* If EEH is implemented, find the PCI device using given phys addr
* and check to see if eeh failure checking is disabled.
* and check to see if eeh failure checking is disabled.
...
...
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