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
952ecef7
Commit
952ecef7
authored
Sep 28, 2005
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Plain Diff
Merge Stephen Rothwell's patches
parents
beeca087
252e75a5
Changes
48
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
410 additions
and
432 deletions
+410
-432
arch/powerpc/platforms/Makefile
arch/powerpc/platforms/Makefile
+7
-4
arch/powerpc/platforms/iseries/Makefile
arch/powerpc/platforms/iseries/Makefile
+7
-0
arch/powerpc/platforms/iseries/htab.c
arch/powerpc/platforms/iseries/htab.c
+13
-12
arch/powerpc/platforms/iseries/hvcall.S
arch/powerpc/platforms/iseries/hvcall.S
+8
-13
arch/powerpc/platforms/iseries/hvlog.c
arch/powerpc/platforms/iseries/hvlog.c
+0
-1
arch/powerpc/platforms/iseries/hvlpconfig.c
arch/powerpc/platforms/iseries/hvlpconfig.c
+0
-1
arch/powerpc/platforms/iseries/iommu.c
arch/powerpc/platforms/iseries/iommu.c
+16
-15
arch/powerpc/platforms/iseries/irq.c
arch/powerpc/platforms/iseries/irq.c
+0
-1
arch/powerpc/platforms/iseries/ksyms.c
arch/powerpc/platforms/iseries/ksyms.c
+27
-0
arch/powerpc/platforms/iseries/lpardata.c
arch/powerpc/platforms/iseries/lpardata.c
+9
-9
arch/powerpc/platforms/iseries/lpevents.c
arch/powerpc/platforms/iseries/lpevents.c
+67
-2
arch/powerpc/platforms/iseries/mf.c
arch/powerpc/platforms/iseries/mf.c
+60
-25
arch/powerpc/platforms/iseries/misc.S
arch/powerpc/platforms/iseries/misc.S
+55
-0
arch/powerpc/platforms/iseries/pci.c
arch/powerpc/platforms/iseries/pci.c
+82
-75
arch/powerpc/platforms/iseries/proc.c
arch/powerpc/platforms/iseries/proc.c
+6
-4
arch/powerpc/platforms/iseries/setup.c
arch/powerpc/platforms/iseries/setup.c
+2
-3
arch/powerpc/platforms/iseries/setup.h
arch/powerpc/platforms/iseries/setup.h
+0
-2
arch/powerpc/platforms/iseries/smp.c
arch/powerpc/platforms/iseries/smp.c
+8
-8
arch/powerpc/platforms/iseries/vio.c
arch/powerpc/platforms/iseries/vio.c
+0
-0
arch/powerpc/platforms/iseries/viopath.c
arch/powerpc/platforms/iseries/viopath.c
+1
-2
arch/powerpc/platforms/iseries/vpdinfo.c
arch/powerpc/platforms/iseries/vpdinfo.c
+1
-3
arch/ppc64/Makefile
arch/ppc64/Makefile
+1
-0
arch/ppc64/kernel/HvLpEvent.c
arch/ppc64/kernel/HvLpEvent.c
+0
-88
arch/ppc64/kernel/Makefile
arch/ppc64/kernel/Makefile
+0
-10
arch/ppc64/kernel/bpa_iommu.c
arch/ppc64/kernel/bpa_iommu.c
+1
-1
arch/ppc64/kernel/bpa_setup.c
arch/ppc64/kernel/bpa_setup.c
+1
-1
arch/ppc64/kernel/eeh.c
arch/ppc64/kernel/eeh.c
+1
-1
arch/ppc64/kernel/head.S
arch/ppc64/kernel/head.S
+1
-1
arch/ppc64/kernel/maple_pci.c
arch/ppc64/kernel/maple_pci.c
+1
-2
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/misc.S
+0
-38
arch/ppc64/kernel/pSeries_iommu.c
arch/ppc64/kernel/pSeries_iommu.c
+1
-1
arch/ppc64/kernel/pSeries_pci.c
arch/ppc64/kernel/pSeries_pci.c
+1
-2
arch/ppc64/kernel/pSeries_setup.c
arch/ppc64/kernel/pSeries_setup.c
+1
-1
arch/ppc64/kernel/pci.c
arch/ppc64/kernel/pci.c
+1
-2
arch/ppc64/kernel/pci_direct_iommu.c
arch/ppc64/kernel/pci_direct_iommu.c
+1
-2
arch/ppc64/kernel/pci_dn.c
arch/ppc64/kernel/pci_dn.c
+1
-2
arch/ppc64/kernel/pci_iommu.c
arch/ppc64/kernel/pci_iommu.c
+1
-7
arch/ppc64/kernel/pmac_pci.c
arch/ppc64/kernel/pmac_pci.c
+1
-1
arch/ppc64/kernel/ppc_ksyms.c
arch/ppc64/kernel/ppc_ksyms.c
+0
-20
arch/ppc64/kernel/rtas_pci.c
arch/ppc64/kernel/rtas_pci.c
+1
-2
arch/ppc64/kernel/rtc.c
arch/ppc64/kernel/rtc.c
+0
-37
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+1
-2
arch/ppc64/kernel/u3_iommu.c
arch/ppc64/kernel/u3_iommu.c
+1
-2
include/asm-powerpc/ppc-pci.h
include/asm-powerpc/ppc-pci.h
+3
-3
include/asm-ppc64/iSeries/iSeries_pci.h
include/asm-ppc64/iSeries/iSeries_pci.h
+6
-24
include/asm-ppc64/iommu.h
include/asm-ppc64/iommu.h
+2
-2
include/asm-ppc64/pci-bridge.h
include/asm-ppc64/pci-bridge.h
+10
-0
include/asm-ppc64/prom.h
include/asm-ppc64/prom.h
+3
-0
No files found.
arch/powerpc/platforms/Makefile
View file @
952ecef7
ifeq
($(CONFIG_PPC32),y)
obj-$(CONFIG_PPC_PMAC)
+=
powermac/
endif
obj-$(CONFIG_4xx)
+=
4xx/
obj-$(CONFIG_83xx)
+=
83xx/
obj-$(CONFIG_85xx)
+=
85xx/
obj-$(CONFIG_PPC_ISERIES)
+=
iseries/
arch/powerpc/platforms/iseries/Makefile
0 → 100644
View file @
952ecef7
obj-y
+=
hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o
\
hvcall.o proc.o htab.o iommu.o misc.o
obj-$(CONFIG_PCI)
+=
pci.o irq.o vpdinfo.o
obj-$(CONFIG_IBMVIO)
+=
vio.o
obj-$(CONFIG_SMP)
+=
smp.o
obj-$(CONFIG_VIOPATH)
+=
viopath.o
obj-$(CONFIG_MODULES)
+=
ksyms.o
arch/p
pc64/kernel/iSeries_
htab.c
→
arch/p
owerpc/platforms/iseries/
htab.c
View file @
952ecef7
...
...
@@ -18,7 +18,8 @@
#include <asm/abs_addr.h>
#include <linux/spinlock.h>
static
spinlock_t
iSeries_hlocks
[
64
]
__cacheline_aligned_in_smp
=
{
[
0
...
63
]
=
SPIN_LOCK_UNLOCKED
};
static
spinlock_t
iSeries_hlocks
[
64
]
__cacheline_aligned_in_smp
=
{
[
0
...
63
]
=
SPIN_LOCK_UNLOCKED
};
/*
* Very primitive algorithm for picking up a lock
...
...
arch/p
pc64/kernel/hvC
all.S
→
arch/p
owerpc/platforms/iseries/hvc
all.S
View file @
952ecef7
/*
*
arch
/
ppc64
/
kernel
/
hvCall
.
S
*
*
*
This
file
contains
the
code
to
perform
calls
to
the
*
iSeries
LPAR
hypervisor
*
...
...
@@ -94,5 +91,3 @@ _GLOBAL(HvCall7Ret16)
ld
r31
,-
16
(
r1
)
blr
arch/p
pc64/kernel/HvCall
.c
→
arch/p
owerpc/platforms/iseries/hvlog
.c
View file @
952ecef7
/*
* HvCall.c
* Copyright (C) 2001 Mike Corrigan IBM Corporation
*
* This program is free software; you can redistribute it and/or modify
...
...
arch/p
pc64/kernel/HvLpC
onfig.c
→
arch/p
owerpc/platforms/iseries/hvlpc
onfig.c
View file @
952ecef7
/*
* HvLpConfig.c
* Copyright (C) 2001 Kyle A. Lucke, IBM Corporation
*
* This program is free software; you can redistribute it and/or modify
...
...
arch/p
pc64/kernel/iSeries_
iommu.c
→
arch/p
owerpc/platforms/iseries/
iommu.c
View file @
952ecef7
/*
* arch/ppc64/kernel/iSeries_iommu.c
*
* Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
*
* Rewrite, cleanup:
...
...
@@ -91,15 +89,17 @@ static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages)
*/
static
struct
iommu_table
*
iommu_table_find
(
struct
iommu_table
*
tbl
)
{
struct
iSeries_Device_N
ode
*
dp
;
struct
device_n
ode
*
dp
;
list_for_each_entry
(
dp
,
&
iSeries_Global_Device_List
,
Device_List
)
{
if
((
dp
->
iommu_table
!=
NULL
)
&&
(
dp
->
iommu_table
->
it_type
==
TCE_PCI
)
&&
(
dp
->
iommu_table
->
it_offset
==
tbl
->
it_offset
)
&&
(
dp
->
iommu_table
->
it_index
==
tbl
->
it_index
)
&&
(
dp
->
iommu_table
->
it_size
==
tbl
->
it_size
))
return
dp
->
iommu_table
;
struct
iommu_table
*
it
=
PCI_DN
(
dp
)
->
iommu_table
;
if
((
it
!=
NULL
)
&&
(
it
->
it_type
==
TCE_PCI
)
&&
(
it
->
it_offset
==
tbl
->
it_offset
)
&&
(
it
->
it_index
==
tbl
->
it_index
)
&&
(
it
->
it_size
==
tbl
->
it_size
))
return
it
;
}
return
NULL
;
}
...
...
@@ -113,7 +113,7 @@ static struct iommu_table *iommu_table_find(struct iommu_table * tbl)
* 2. TCE table per Bus.
* 3. TCE Table per IOA.
*/
static
void
iommu_table_getparms
(
struct
iSeries_Device_Node
*
dn
,
static
void
iommu_table_getparms
(
struct
device_node
*
dn
,
struct
iommu_table
*
tbl
)
{
struct
iommu_table_cb
*
parms
;
...
...
@@ -125,7 +125,7 @@ static void iommu_table_getparms(struct iSeries_Device_Node* dn,
memset
(
parms
,
0
,
sizeof
(
*
parms
));
parms
->
itc_busno
=
ISERIES_BUS
(
dn
);
parms
->
itc_slotno
=
dn
->
LogicalSlot
;
parms
->
itc_slotno
=
PCI_DN
(
dn
)
->
LogicalSlot
;
parms
->
itc_virtbus
=
0
;
HvCallXm_getTceTableParms
(
ISERIES_HV_ADDR
(
parms
));
...
...
@@ -145,18 +145,19 @@ static void iommu_table_getparms(struct iSeries_Device_Node* dn,
}
void
iommu_devnode_init_iSeries
(
struct
iSeries_Device_N
ode
*
dn
)
void
iommu_devnode_init_iSeries
(
struct
device_n
ode
*
dn
)
{
struct
iommu_table
*
tbl
;
struct
pci_dn
*
pdn
=
PCI_DN
(
dn
);
tbl
=
kmalloc
(
sizeof
(
struct
iommu_table
),
GFP_KERNEL
);
iommu_table_getparms
(
dn
,
tbl
);
/* Look for existing tce table */
dn
->
iommu_table
=
iommu_table_find
(
tbl
);
if
(
dn
->
iommu_table
==
NULL
)
dn
->
iommu_table
=
iommu_init_table
(
tbl
);
p
dn
->
iommu_table
=
iommu_table_find
(
tbl
);
if
(
p
dn
->
iommu_table
==
NULL
)
p
dn
->
iommu_table
=
iommu_init_table
(
tbl
);
else
kfree
(
tbl
);
}
...
...
arch/p
pc64/kernel/iSeries_
irq.c
→
arch/p
owerpc/platforms/iseries/
irq.c
View file @
952ecef7
...
...
@@ -363,4 +363,3 @@ void virt_irq_init(void)
{
return
;
}
arch/powerpc/platforms/iseries/ksyms.c
0 → 100644
View file @
952ecef7
/*
* (C) 2001-2005 PPC 64 Team, IBM Corp
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/module.h>
#include <asm/hw_irq.h>
#include <asm/iSeries/HvCallSc.h>
EXPORT_SYMBOL
(
HvCall0
);
EXPORT_SYMBOL
(
HvCall1
);
EXPORT_SYMBOL
(
HvCall2
);
EXPORT_SYMBOL
(
HvCall3
);
EXPORT_SYMBOL
(
HvCall4
);
EXPORT_SYMBOL
(
HvCall5
);
EXPORT_SYMBOL
(
HvCall6
);
EXPORT_SYMBOL
(
HvCall7
);
#ifdef CONFIG_SMP
EXPORT_SYMBOL
(
local_get_flags
);
EXPORT_SYMBOL
(
local_irq_disable
);
EXPORT_SYMBOL
(
local_irq_restore
);
#endif
arch/p
pc64/kernel/LparD
ata.c
→
arch/p
owerpc/platforms/iseries/lpard
ata.c
View file @
952ecef7
arch/p
pc64/kernel/ItLpQueue
.c
→
arch/p
owerpc/platforms/iseries/lpevents
.c
View file @
952ecef7
/*
* ItLpQueue.c
* Copyright (C) 2001 Mike Corrigan IBM Corporation
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -19,6 +18,7 @@
#include <asm/iSeries/ItLpQueue.h>
#include <asm/iSeries/HvLpEvent.h>
#include <asm/iSeries/HvCallEvent.h>
#include <asm/iSeries/ItLpNaca.h>
/*
* The LpQueue is used to pass event data from the hypervisor to
...
...
@@ -43,7 +43,8 @@ static char *event_types[HvLpEvent_Type_NumTypes] = {
};
/* Array of LpEvent handler functions */
extern
LpEventHandler
lpEventHandler
[
HvLpEvent_Type_NumTypes
];
static
LpEventHandler
lpEventHandler
[
HvLpEvent_Type_NumTypes
];
static
unsigned
lpEventHandlerPaths
[
HvLpEvent_Type_NumTypes
];
static
struct
HvLpEvent
*
get_next_hvlpevent
(
void
)
{
...
...
@@ -199,6 +200,70 @@ void setup_hvlpevent_queue(void)
hvlpevent_queue
.
xIndex
=
0
;
}
/* Register a handler for an LpEvent type */
int
HvLpEvent_registerHandler
(
HvLpEvent_Type
eventType
,
LpEventHandler
handler
)
{
if
(
eventType
<
HvLpEvent_Type_NumTypes
)
{
lpEventHandler
[
eventType
]
=
handler
;
return
0
;
}
return
1
;
}
EXPORT_SYMBOL
(
HvLpEvent_registerHandler
);
int
HvLpEvent_unregisterHandler
(
HvLpEvent_Type
eventType
)
{
might_sleep
();
if
(
eventType
<
HvLpEvent_Type_NumTypes
)
{
if
(
!
lpEventHandlerPaths
[
eventType
])
{
lpEventHandler
[
eventType
]
=
NULL
;
/*
* We now sleep until all other CPUs have scheduled.
* This ensures that the deletion is seen by all
* other CPUs, and that the deleted handler isn't
* still running on another CPU when we return.
*/
synchronize_rcu
();
return
0
;
}
}
return
1
;
}
EXPORT_SYMBOL
(
HvLpEvent_unregisterHandler
);
/*
* lpIndex is the partition index of the target partition.
* needed only for VirtualIo, VirtualLan and SessionMgr. Zero
* indicates to use our partition index - for the other types.
*/
int
HvLpEvent_openPath
(
HvLpEvent_Type
eventType
,
HvLpIndex
lpIndex
)
{
if
((
eventType
<
HvLpEvent_Type_NumTypes
)
&&
lpEventHandler
[
eventType
])
{
if
(
lpIndex
==
0
)
lpIndex
=
itLpNaca
.
xLpIndex
;
HvCallEvent_openLpEventPath
(
lpIndex
,
eventType
);
++
lpEventHandlerPaths
[
eventType
];
return
0
;
}
return
1
;
}
int
HvLpEvent_closePath
(
HvLpEvent_Type
eventType
,
HvLpIndex
lpIndex
)
{
if
((
eventType
<
HvLpEvent_Type_NumTypes
)
&&
lpEventHandler
[
eventType
]
&&
lpEventHandlerPaths
[
eventType
])
{
if
(
lpIndex
==
0
)
lpIndex
=
itLpNaca
.
xLpIndex
;
HvCallEvent_closeLpEventPath
(
lpIndex
,
eventType
);
--
lpEventHandlerPaths
[
eventType
];
return
0
;
}
return
1
;
}
static
int
proc_lpevents_show
(
struct
seq_file
*
m
,
void
*
v
)
{
int
cpu
,
i
;
...
...
arch/p
pc64/kernel
/mf.c
→
arch/p
owerpc/platforms/iseries
/mf.c
View file @
952ecef7
/*
* mf.c
* Copyright (C) 2001 Troy D. Armstrong IBM Corporation
* Copyright (C) 2004-2005 Stephen Rothwell IBM Corporation
*
...
...
@@ -42,6 +41,10 @@
#include <asm/iSeries/HvLpConfig.h>
#include <asm/iSeries/ItLpQueue.h>
#include "setup.h"
extern
int
piranha_simulator
;
/*
* This is the structure layout for the Machine Facilites LPAR event
* flows.
...
...
@@ -1279,3 +1282,35 @@ static int __init mf_proc_init(void)
__initcall
(
mf_proc_init
);
#endif
/* CONFIG_PROC_FS */
/*
* Get the RTC from the virtual service processor
* This requires flowing LpEvents to the primary partition
*/
void
iSeries_get_rtc_time
(
struct
rtc_time
*
rtc_tm
)
{
if
(
piranha_simulator
)
return
;
mf_get_rtc
(
rtc_tm
);
rtc_tm
->
tm_mon
--
;
}
/*
* Set the RTC in the virtual service processor
* This requires flowing LpEvents to the primary partition
*/
int
iSeries_set_rtc_time
(
struct
rtc_time
*
tm
)
{
mf_set_rtc
(
tm
);
return
0
;
}
void
iSeries_get_boot_time
(
struct
rtc_time
*
tm
)
{
if
(
piranha_simulator
)
return
;
mf_get_boot_rtc
(
tm
);
tm
->
tm_mon
-=
1
;
}
arch/powerpc/platforms/iseries/misc.S
0 → 100644
View file @
952ecef7
/*
*
This
file
contains
miscellaneous
low
-
level
functions
.
*
Copyright
(
C
)
1995
-
2005
IBM
Corp
*
*
Largely
rewritten
by
Cort
Dougan
(
cort
@
cs
.
nmt
.
edu
)
*
and
Paul
Mackerras
.
*
Adapted
for
iSeries
by
Mike
Corrigan
(
mikejc
@
us
.
ibm
.
com
)
*
PPC64
updates
by
Dave
Engebretsen
(
engebret
@
us
.
ibm
.
com
)
*
*
This
program
is
free
software
; you can redistribute it and/or
*
modify
it
under
the
terms
of
the
GNU
General
Public
License
*
as
published
by
the
Free
Software
Foundation
; either version
*
2
of
the
License
,
or
(
at
your
option
)
any
later
version
.
*/
#include <asm/processor.h>
#include <asm/asm-offsets.h>
.
text
/*
unsigned
long
local_save_flags
(
void
)
*/
_GLOBAL
(
local_get_flags
)
lbz
r3
,
PACAPROCENABLED
(
r13
)
blr
/*
unsigned
long
local_irq_disable
(
void
)
*/
_GLOBAL
(
local_irq_disable
)
lbz
r3
,
PACAPROCENABLED
(
r13
)
li
r4
,
0
stb
r4
,
PACAPROCENABLED
(
r13
)
blr
/*
Done
*/
/*
void
local_irq_restore
(
unsigned
long
flags
)
*/
_GLOBAL
(
local_irq_restore
)
lbz
r5
,
PACAPROCENABLED
(
r13
)
/
*
Check
if
things
are
setup
the
way
we
want
_already_
.
*/
cmpw
0
,
r3
,
r5
beqlr
/
*
are
we
enabling
interrupts
?
*/
cmpdi
0
,
r3
,
0
stb
r3
,
PACAPROCENABLED
(
r13
)
beqlr
/
*
Check
pending
interrupts
*/
/
*
A
decrementer
,
IPI
or
PMC
interrupt
may
have
occurred
*
while
we
were
in
the
hypervisor
(
which
enables
)
*/
ld
r4
,
PACALPPACA
+
LPPACAANYINT
(
r13
)
cmpdi
r4
,
0
beqlr
/
*
*
Handle
pending
interrupts
in
interrupt
context
*/
li
r0
,
0x5555
sc
blr
arch/p
pc64/kernel/iSeries_
pci.c
→
arch/p
owerpc/platforms/iseries/
pci.c
View file @
952ecef7
This diff is collapsed.
Click to expand it.
arch/p
pc64/kernel/iSeries_
proc.c
→
arch/p
owerpc/platforms/iseries/
proc.c
View file @
952ecef7
/*
* iSeries_proc.c
* Copyright (C) 2001 Kyle A. Lucke IBM Corporation
* Copyright (C) 2001 Mike Corrigan & Dave Engebretsen IBM Corporation
*
...
...
@@ -68,12 +67,15 @@ static int proc_titantod_show(struct seq_file *m, void *v)
unsigned
long
tb_ticks
=
(
tb0
-
startTb
);
unsigned
long
titan_jiffies
=
titan_usec
/
(
1000000
/
HZ
);
unsigned
long
titan_jiff_usec
=
titan_jiffies
*
(
1000000
/
HZ
);
unsigned
long
titan_jiff_rem_usec
=
titan_usec
-
titan_jiff_usec
;
unsigned
long
titan_jiff_rem_usec
=
titan_usec
-
titan_jiff_usec
;
unsigned
long
tb_jiffies
=
tb_ticks
/
tb_ticks_per_jiffy
;
unsigned
long
tb_jiff_ticks
=
tb_jiffies
*
tb_ticks_per_jiffy
;
unsigned
long
tb_jiff_rem_ticks
=
tb_ticks
-
tb_jiff_ticks
;
unsigned
long
tb_jiff_rem_usec
=
tb_jiff_rem_ticks
/
tb_ticks_per_usec
;
unsigned
long
new_tb_ticks_per_jiffy
=
(
tb_ticks
*
(
1000000
/
HZ
))
/
titan_usec
;
unsigned
long
tb_jiff_rem_usec
=
tb_jiff_rem_ticks
/
tb_ticks_per_usec
;
unsigned
long
new_tb_ticks_per_jiffy
=
(
tb_ticks
*
(
1000000
/
HZ
))
/
titan_usec
;
seq_printf
(
m
,
" titan elapsed = %lu uSec
\n
"
,
titan_usec
);
seq_printf
(
m
,
" tb elapsed = %lu ticks
\n
"
,
tb_ticks
);
...
...
arch/p
pc64/kernel/iSeries_
setup.c
→
arch/p
owerpc/platforms/iseries/
setup.c
View file @
952ecef7
...
...
@@ -2,8 +2,6 @@
* Copyright (c) 2000 Mike Corrigan <mikejc@us.ibm.com>
* Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
*
* Module name: iSeries_setup.c
*
* Description:
* Architecture- / platform-specific boot-time initialization code for
* the IBM iSeries LPAR. Adapted from original code by Grant Erickson and
...
...
@@ -42,7 +40,6 @@
#include <asm/firmware.h>
#include <asm/time.h>
#include "iSeries_setup.h"
#include <asm/naca.h>
#include <asm/paca.h>
#include <asm/cache.h>
...
...
@@ -62,6 +59,8 @@
#include <asm/iSeries/ItVpdAreas.h>
#include <asm/iSeries/LparMap.h>
#include "setup.h"
extern
void
hvlog
(
char
*
fmt
,
...);
#ifdef DEBUG
...
...
arch/p
pc64/kernel/iSeries_
setup.h
→
arch/p
owerpc/platforms/iseries/
setup.h
View file @
952ecef7
...
...
@@ -2,8 +2,6 @@
* Copyright (c) 2000 Mike Corrigan <mikejc@us.ibm.com>
* Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
*
* Module name: as400_setup.h
*
* Description:
* Architecture- / platform-specific boot-time initialization code for
* the IBM AS/400 LPAR. Adapted from original code by Grant Erickson and
...
...
arch/p
pc64/kernel/iSeries_
smp.c
→
arch/p
owerpc/platforms/iseries/
smp.c
View file @
952ecef7
...
...
@@ -47,17 +47,17 @@
static
unsigned
long
iSeries_smp_message
[
NR_CPUS
];
void
iSeries_smp_message_recv
(
struct
pt_regs
*
regs
)
void
iSeries_smp_message_recv
(
struct
pt_regs
*
regs
)
{
int
cpu
=
smp_processor_id
();
int
msg
;
if
(
num_online_cpus
()
<
2
)
if
(
num_online_cpus
()
<
2
)
return
;
for
(
msg
=
0
;
msg
<
4
;
++
msg
)
if
(
test_and_clear_bit
(
msg
,
&
iSeries_smp_message
[
cpu
]
)
)
smp_message_recv
(
msg
,
regs
);
for
(
msg
=
0
;
msg
<
4
;
msg
++
)
if
(
test_and_clear_bit
(
msg
,
&
iSeries_smp_message
[
cpu
])
)
smp_message_recv
(
msg
,
regs
);
}
static
inline
void
smp_iSeries_do_message
(
int
cpu
,
int
msg
)
...
...
@@ -74,8 +74,8 @@ static void smp_iSeries_message_pass(int target, int msg)
smp_iSeries_do_message
(
target
,
msg
);
else
{
for_each_online_cpu
(
i
)
{
if
(
target
==
MSG_ALL_BUT_SELF
&&
i
==
smp_processor_id
(
))
if
(
(
target
==
MSG_ALL_BUT_SELF
)
&&
(
i
==
smp_processor_id
()
))
continue
;
smp_iSeries_do_message
(
i
,
msg
);
}
...
...
@@ -89,7 +89,7 @@ static int smp_iSeries_probe(void)
static
void
smp_iSeries_kick_cpu
(
int
nr
)
{
BUG_ON
(
nr
<
0
||
nr
>=
NR_CPUS
);
BUG_ON
(
(
nr
<
0
)
||
(
nr
>=
NR_CPUS
)
);
/* Verify that our partition has a processor nr */
if
(
paca
[
nr
].
lppaca
.
dyn_proc_status
>=
2
)
...
...
arch/p
pc64/kernel/iSeries_
vio.c
→
arch/p
owerpc/platforms/iseries/
vio.c
View file @
952ecef7
File moved
arch/p
pc64/kernel
/viopath.c
→
arch/p
owerpc/platforms/iseries
/viopath.c
View file @
952ecef7
/* -*- linux-c -*-
* arch/ppc64/kernel/viopath.c
*
* iSeries Virtual I/O Message Path code
*
...
...
@@ -7,7 +6,7 @@
* Ryan Arnold <ryanarn@us.ibm.com>
* Colin Devilbiss <devilbis@us.ibm.com>
*
* (C) Copyright 2000-200
3
IBM Corporation
* (C) Copyright 2000-200
5
IBM Corporation
*
* This code is used by the iSeries virtual disk, cd,
* tape, and console to communicate with OS/400 in another
...
...
arch/p
pc64/kernel/iSeries_VpdI
nfo.c
→
arch/p
owerpc/platforms/iseries/vpdi
nfo.c
View file @
952ecef7
/*
* File iSeries_vpdInfo.c created by Allan Trautman on Fri Feb 2 2001.
*
* This code gets the card location of the hardware
* Copyright (C) 2001 <Allan H Trautman> <IBM Corp>
* Copyright (C) 2005 Stephen Rothwel, IBM Corp
...
...
@@ -242,7 +240,7 @@ static void __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent,
*/
void
__init
iSeries_Device_Information
(
struct
pci_dev
*
PciDev
,
int
count
)
{
struct
iSeries_Device_N
ode
*
DevNode
=
PciDev
->
sysdata
;
struct
device_n
ode
*
DevNode
=
PciDev
->
sysdata
;
u16
bus
;
u8
frame
;
char
card
[
4
];
...
...
arch/ppc64/Makefile
View file @
952ecef7
...
...
@@ -84,6 +84,7 @@ head-y := arch/ppc64/kernel/head.o
libs-y
+=
arch
/ppc64/lib/
core-y
+=
arch
/ppc64/kernel/
core-y
+=
arch
/ppc64/mm/
core-y
+=
arch
/powerpc/platforms/
core-$(CONFIG_XMON)
+=
arch
/ppc64/xmon/
drivers-$(CONFIG_OPROFILE)
+=
arch
/powerpc/oprofile/
...
...
arch/ppc64/kernel/HvLpEvent.c
deleted
100644 → 0
View file @
beeca087
/*
* Copyright 2001 Mike Corrigan IBM Corp
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <asm/system.h>
#include <asm/iSeries/HvLpEvent.h>
#include <asm/iSeries/HvCallEvent.h>
#include <asm/iSeries/ItLpNaca.h>
/* Array of LpEvent handler functions */
LpEventHandler
lpEventHandler
[
HvLpEvent_Type_NumTypes
];
unsigned
lpEventHandlerPaths
[
HvLpEvent_Type_NumTypes
];
/* Register a handler for an LpEvent type */
int
HvLpEvent_registerHandler
(
HvLpEvent_Type
eventType
,
LpEventHandler
handler
)
{
int
rc
=
1
;
if
(
eventType
<
HvLpEvent_Type_NumTypes
)
{
lpEventHandler
[
eventType
]
=
handler
;
rc
=
0
;
}
return
rc
;
}
int
HvLpEvent_unregisterHandler
(
HvLpEvent_Type
eventType
)
{
int
rc
=
1
;
might_sleep
();
if
(
eventType
<
HvLpEvent_Type_NumTypes
)
{
if
(
!
lpEventHandlerPaths
[
eventType
]
)
{
lpEventHandler
[
eventType
]
=
NULL
;
rc
=
0
;
/* We now sleep until all other CPUs have scheduled. This ensures that
* the deletion is seen by all other CPUs, and that the deleted handler
* isn't still running on another CPU when we return. */
synchronize_rcu
();
}
}
return
rc
;
}
EXPORT_SYMBOL
(
HvLpEvent_registerHandler
);
EXPORT_SYMBOL
(
HvLpEvent_unregisterHandler
);
/* (lpIndex is the partition index of the target partition.
* needed only for VirtualIo, VirtualLan and SessionMgr. Zero
* indicates to use our partition index - for the other types)
*/
int
HvLpEvent_openPath
(
HvLpEvent_Type
eventType
,
HvLpIndex
lpIndex
)
{
int
rc
=
1
;
if
(
eventType
<
HvLpEvent_Type_NumTypes
&&
lpEventHandler
[
eventType
]
)
{
if
(
lpIndex
==
0
)
lpIndex
=
itLpNaca
.
xLpIndex
;
HvCallEvent_openLpEventPath
(
lpIndex
,
eventType
);
++
lpEventHandlerPaths
[
eventType
];
rc
=
0
;
}
return
rc
;
}
int
HvLpEvent_closePath
(
HvLpEvent_Type
eventType
,
HvLpIndex
lpIndex
)
{
int
rc
=
1
;
if
(
eventType
<
HvLpEvent_Type_NumTypes
&&
lpEventHandler
[
eventType
]
&&
lpEventHandlerPaths
[
eventType
]
)
{
if
(
lpIndex
==
0
)
lpIndex
=
itLpNaca
.
xLpIndex
;
HvCallEvent_closeLpEventPath
(
lpIndex
,
eventType
);
--
lpEventHandlerPaths
[
eventType
];
rc
=
0
;
}
return
rc
;
}
arch/ppc64/kernel/Makefile
View file @
952ecef7
...
...
@@ -16,17 +16,10 @@ obj-y += vdso32/ vdso64/
obj-$(CONFIG_PPC_OF)
+=
of_device.o
pci-obj-$(CONFIG_PPC_ISERIES)
+=
iSeries_pci.o iSeries_irq.o
\
iSeries_VpdInfo.o
pci-obj-$(CONFIG_PPC_MULTIPLATFORM)
+=
pci_dn.o pci_direct_iommu.o
obj-$(CONFIG_PCI)
+=
pci.o pci_iommu.o iomap.o
$
(
pci-obj-y
)
obj-$(CONFIG_PPC_ISERIES)
+=
HvCall.o HvLpConfig.o LparData.o
\
iSeries_setup.o ItLpQueue.o hvCall.o
\
mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o
\
iSeries_iommu.o
obj-$(CONFIG_PPC_MULTIPLATFORM)
+=
nvram.o i8259.o prom_init.o
obj-$(CONFIG_PPC_PSERIES)
+=
pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o
\
...
...
@@ -45,14 +38,12 @@ obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o
obj-$(CONFIG_PPC_RTAS)
+=
rtas.o rtas_pci.o
obj-$(CONFIG_RTAS_PROC)
+=
rtas-proc.o
obj-$(CONFIG_SCANLOG)
+=
scanlog.o
obj-$(CONFIG_VIOPATH)
+=
viopath.o
obj-$(CONFIG_LPARCFG)
+=
lparcfg.o
obj-$(CONFIG_HVC_CONSOLE)
+=
hvconsole.o
obj-$(CONFIG_BOOTX_TEXT)
+=
btext.o
obj-$(CONFIG_HVCS)
+=
hvcserver.o
vio-obj-$(CONFIG_PPC_PSERIES)
+=
pSeries_vio.o
vio-obj-$(CONFIG_PPC_ISERIES)
+=
iSeries_vio.o
obj-$(CONFIG_IBMVIO)
+=
vio.o
$
(
vio-obj-y
)
obj-$(CONFIG_XICS)
+=
xics.o
obj-$(CONFIG_MPIC)
+=
mpic.o
...
...
@@ -68,7 +59,6 @@ obj-$(CONFIG_U3_DART) += u3_iommu.o
ifdef
CONFIG_SMP
obj-$(CONFIG_PPC_PMAC)
+=
pmac_smp.o smp-tbsync.o
obj-$(CONFIG_PPC_ISERIES)
+=
iSeries_smp.o
obj-$(CONFIG_PPC_PSERIES)
+=
pSeries_smp.o
obj-$(CONFIG_PPC_BPA)
+=
pSeries_smp.o
obj-$(CONFIG_PPC_MAPLE)
+=
smp-tbsync.o
...
...
arch/ppc64/kernel/bpa_iommu.c
View file @
952ecef7
...
...
@@ -39,8 +39,8 @@
#include <asm/pmac_feature.h>
#include <asm/abs_addr.h>
#include <asm/system.h>
#include <asm/ppc-pci.h>
#include "pci.h"
#include "bpa_iommu.h"
static
inline
unsigned
long
...
...
arch/ppc64/kernel/bpa_setup.c
View file @
952ecef7
...
...
@@ -43,8 +43,8 @@
#include <asm/time.h>
#include <asm/nvram.h>
#include <asm/cputable.h>
#include <asm/ppc-pci.h>
#include "pci.h"
#include "bpa_iic.h"
#include "bpa_iommu.h"
...
...
arch/ppc64/kernel/eeh.c
View file @
952ecef7
...
...
@@ -33,7 +33,7 @@
#include <asm/rtas.h>
#include <asm/atomic.h>
#include <asm/systemcfg.h>
#include
"pci.h"
#include
<asm/ppc-pci.h>
#undef DEBUG
...
...
arch/ppc64/kernel/head.S
View file @
952ecef7
...
...
@@ -1253,7 +1253,7 @@ unrecov_slb:
*
*
On
iSeries
,
the
hypervisor
must
fill
in
at
least
one
entry
before
*
we
get
control
(
with
relocate
on
)
.
The
address
is
give
to
the
hv
*
as
a
page
number
(
see
xLparMap
in
LparD
ata
.
c
),
so
this
must
be
at
a
*
as
a
page
number
(
see
xLparMap
in
lpard
ata
.
c
),
so
this
must
be
at
a
*
fixed
address
(
the
linker
can
't compute (u64)&initial_stab >>
*
PAGE_SHIFT
)
.
*/
...
...
arch/ppc64/kernel/maple_pci.c
View file @
952ecef7
...
...
@@ -23,8 +23,7 @@
#include <asm/pci-bridge.h>
#include <asm/machdep.h>
#include <asm/iommu.h>
#include "pci.h"
#include <asm/ppc-pci.h>
#ifdef DEBUG
#define DBG(x...) printk(x)
...
...
arch/ppc64/kernel/misc.S
View file @
952ecef7
...
...
@@ -65,44 +65,6 @@ _GLOBAL(get_sp)
mr
r3
,
r1
blr
#ifdef CONFIG_PPC_ISERIES
/*
unsigned
long
local_save_flags
(
void
)
*/
_GLOBAL
(
local_get_flags
)
lbz
r3
,
PACAPROCENABLED
(
r13
)
blr
/*
unsigned
long
local_irq_disable
(
void
)
*/
_GLOBAL
(
local_irq_disable
)
lbz
r3
,
PACAPROCENABLED
(
r13
)
li
r4
,
0
stb
r4
,
PACAPROCENABLED
(
r13
)
blr
/*
Done
*/
/*
void
local_irq_restore
(
unsigned
long
flags
)
*/
_GLOBAL
(
local_irq_restore
)
lbz
r5
,
PACAPROCENABLED
(
r13
)
/
*
Check
if
things
are
setup
the
way
we
want
_already_
.
*/
cmpw
0
,
r3
,
r5
beqlr
/
*
are
we
enabling
interrupts
?
*/
cmpdi
0
,
r3
,
0
stb
r3
,
PACAPROCENABLED
(
r13
)
beqlr
/
*
Check
pending
interrupts
*/
/
*
A
decrementer
,
IPI
or
PMC
interrupt
may
have
occurred
*
while
we
were
in
the
hypervisor
(
which
enables
)
*/
ld
r4
,
PACALPPACA
+
LPPACAANYINT
(
r13
)
cmpdi
r4
,
0
beqlr
/
*
*
Handle
pending
interrupts
in
interrupt
context
*/
li
r0
,
0x5555
sc
blr
#endif /* CONFIG_PPC_ISERIES */
#ifdef CONFIG_IRQSTACKS
_GLOBAL
(
call_do_softirq
)
mflr
r0
...
...
arch/ppc64/kernel/pSeries_iommu.c
View file @
952ecef7
...
...
@@ -47,7 +47,7 @@
#include <asm/systemcfg.h>
#include <asm/firmware.h>
#include <asm/tce.h>
#include
"pci.h"
#include
<asm/ppc-pci.h>
#define DBG(fmt...)
...
...
arch/ppc64/kernel/pSeries_pci.c
View file @
952ecef7
...
...
@@ -29,8 +29,7 @@
#include <asm/pci-bridge.h>
#include <asm/prom.h>
#include "pci.h"
#include <asm/ppc-pci.h>
static
int
__initdata
s7a_workaround
=
-
1
;
...
...
arch/ppc64/kernel/pSeries_setup.c
View file @
952ecef7
...
...
@@ -63,9 +63,9 @@
#include <asm/firmware.h>
#include <asm/pmc.h>
#include <asm/mpic.h>
#include <asm/ppc-pci.h>
#include "i8259.h"
#include "pci.h"
#ifdef DEBUG
#define DBG(fmt...) udbg_printf(fmt)
...
...
arch/ppc64/kernel/pci.c
View file @
952ecef7
...
...
@@ -31,8 +31,7 @@
#include <asm/irq.h>
#include <asm/machdep.h>
#include <asm/udbg.h>
#include "pci.h"
#include <asm/ppc-pci.h>
#ifdef DEBUG
#define DBG(fmt...) udbg_printf(fmt)
...
...
arch/ppc64/kernel/pci_direct_iommu.c
View file @
952ecef7
...
...
@@ -27,8 +27,7 @@
#include <asm/machdep.h>
#include <asm/pmac_feature.h>
#include <asm/abs_addr.h>
#include "pci.h"
#include <asm/ppc-pci.h>
static
void
*
pci_direct_alloc_coherent
(
struct
device
*
hwdev
,
size_t
size
,
dma_addr_t
*
dma_handle
,
unsigned
int
__nocast
flag
)
...
...
arch/ppc64/kernel/pci_dn.c
View file @
952ecef7
...
...
@@ -30,8 +30,7 @@
#include <asm/prom.h>
#include <asm/pci-bridge.h>
#include <asm/pSeries_reconfig.h>
#include "pci.h"
#include <asm/ppc-pci.h>
/*
* Traverse_func that inits the PCI fields of the device node.
...
...
arch/ppc64/kernel/pci_iommu.c
View file @
952ecef7
...
...
@@ -37,7 +37,7 @@
#include <asm/iommu.h>
#include <asm/pci-bridge.h>
#include <asm/machdep.h>
#include
"pci.h"
#include
<asm/ppc-pci.h>
#ifdef CONFIG_PPC_ISERIES
#include <asm/iSeries/iSeries_pci.h>
...
...
@@ -61,13 +61,7 @@ static inline struct iommu_table *devnode_table(struct device *dev)
}
else
pdev
=
to_pci_dev
(
dev
);
#ifdef CONFIG_PPC_ISERIES
return
ISERIES_DEVNODE
(
pdev
)
->
iommu_table
;
#endif
/* CONFIG_PPC_ISERIES */
#ifdef CONFIG_PPC_MULTIPLATFORM
return
PCI_DN
(
PCI_GET_DN
(
pdev
))
->
iommu_table
;
#endif
/* CONFIG_PPC_MULTIPLATFORM */
}
...
...
arch/ppc64/kernel/pmac_pci.c
View file @
952ecef7
...
...
@@ -27,8 +27,8 @@
#include <asm/machdep.h>
#include <asm/pmac_feature.h>
#include <asm/iommu.h>
#include <asm/ppc-pci.h>
#include "pci.h"
#include "pmac.h"
#define DEBUG
...
...
arch/ppc64/kernel/ppc_ksyms.c
View file @
952ecef7
...
...
@@ -19,7 +19,6 @@
#include <asm/hw_irq.h>
#include <asm/abs_addr.h>
#include <asm/cacheflush.h>
#include <asm/iSeries/HvCallSc.h>
EXPORT_SYMBOL
(
strcpy
);
EXPORT_SYMBOL
(
strncpy
);
...
...
@@ -46,17 +45,6 @@ EXPORT_SYMBOL(__strnlen_user);
EXPORT_SYMBOL
(
reloc_offset
);
#ifdef CONFIG_PPC_ISERIES
EXPORT_SYMBOL
(
HvCall0
);
EXPORT_SYMBOL
(
HvCall1
);
EXPORT_SYMBOL
(
HvCall2
);
EXPORT_SYMBOL
(
HvCall3
);
EXPORT_SYMBOL
(
HvCall4
);
EXPORT_SYMBOL
(
HvCall5
);
EXPORT_SYMBOL
(
HvCall6
);
EXPORT_SYMBOL
(
HvCall7
);
#endif
EXPORT_SYMBOL
(
_insb
);
EXPORT_SYMBOL
(
_outsb
);
EXPORT_SYMBOL
(
_insw
);
...
...
@@ -77,14 +65,6 @@ EXPORT_SYMBOL(giveup_altivec);
EXPORT_SYMBOL
(
__flush_icache_range
);
EXPORT_SYMBOL
(
flush_dcache_range
);
#ifdef CONFIG_SMP
#ifdef CONFIG_PPC_ISERIES
EXPORT_SYMBOL
(
local_get_flags
);
EXPORT_SYMBOL
(
local_irq_disable
);
EXPORT_SYMBOL
(
local_irq_restore
);
#endif
#endif
EXPORT_SYMBOL
(
memcpy
);
EXPORT_SYMBOL
(
memset
);
EXPORT_SYMBOL
(
memmove
);
...
...
arch/ppc64/kernel/rtas_pci.c
View file @
952ecef7
...
...
@@ -39,8 +39,7 @@
#include <asm/iommu.h>
#include <asm/rtas.h>
#include <asm/mpic.h>
#include "pci.h"
#include <asm/ppc-pci.h>
/* RTAS tokens */
static
int
read_pci_config
;
...
...
arch/ppc64/kernel/rtc.c
View file @
952ecef7
...
...
@@ -43,11 +43,8 @@
#include <asm/time.h>
#include <asm/rtas.h>
#include <asm/iSeries/mf.h>
#include <asm/machdep.h>
extern
int
piranha_simulator
;
/*
* We sponge a minor off of the misc major. No need slurping
* up another valuable major dev number for this. If you add
...
...
@@ -265,40 +262,6 @@ static int rtc_read_proc(char *page, char **start, off_t off,
return
len
;
}
#ifdef CONFIG_PPC_ISERIES
/*
* Get the RTC from the virtual service processor
* This requires flowing LpEvents to the primary partition
*/
void
iSeries_get_rtc_time
(
struct
rtc_time
*
rtc_tm
)
{
if
(
piranha_simulator
)
return
;
mf_get_rtc
(
rtc_tm
);
rtc_tm
->
tm_mon
--
;
}
/*
* Set the RTC in the virtual service processor
* This requires flowing LpEvents to the primary partition
*/
int
iSeries_set_rtc_time
(
struct
rtc_time
*
tm
)
{
mf_set_rtc
(
tm
);
return
0
;
}
void
iSeries_get_boot_time
(
struct
rtc_time
*
tm
)
{
if
(
piranha_simulator
)
return
;
mf_get_boot_rtc
(
tm
);
tm
->
tm_mon
-=
1
;
}
#endif
#ifdef CONFIG_PPC_RTAS
#define MAX_RTC_WAIT 5000
/* 5 sec */
#define RTAS_CLOCK_BUSY (-2)
...
...
arch/ppc64/kernel/sys_ppc32.c
View file @
952ecef7
...
...
@@ -53,8 +53,7 @@
#include <asm/time.h>
#include <asm/mmu_context.h>
#include <asm/systemcfg.h>
#include "pci.h"
#include <asm/ppc-pci.h>
/* readdir & getdents */
#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
...
...
arch/ppc64/kernel/u3_iommu.c
View file @
952ecef7
...
...
@@ -45,8 +45,7 @@
#include <asm/cacheflush.h>
#include <asm/lmb.h>
#include <asm/dart.h>
#include "pci.h"
#include <asm/ppc-pci.h>
extern
int
iommu_force_on
;
...
...
arch/ppc64/kernel/
pci.h
→
include/asm-powerpc/ppc-
pci.h
View file @
952ecef7
...
...
@@ -6,8 +6,8 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef _
_PPC_KERNEL_PCI_H__
#define _
_PPC_KERNEL_PCI_H__
#ifndef _
ASM_POWERPC_PPC_PCI_H
#define _
ASM_POWERPC_PPC_PCI_H
#include <linux/pci.h>
#include <asm/pci-bridge.h>
...
...
@@ -51,4 +51,4 @@ extern unsigned long pci_probe_only;
extern
unsigned
long
pci_assign_all_buses
;
extern
int
pci_read_irq_line
(
struct
pci_dev
*
pci_dev
);
#endif
/* _
_PPC_KERNEL_PCI_H__
*/
#endif
/* _
ASM_POWERPC_PPC_PCI_H
*/
include/asm-ppc64/iSeries/iSeries_pci.h
View file @
952ecef7
...
...
@@ -30,21 +30,19 @@
* End Change Activity
*/
#include <asm/iSeries/HvCallPci.h>
#include <asm/abs_addr.h>
#include <asm/prom.h>
#include <asm/pci-bridge.h>
struct
pci_dev
;
/* For Forward Reference */
struct
iSeries_Device_Node
;
/*
* Gets iSeries Bus, SubBus, DevFn using
iSeries_Device_N
ode structure
* Gets iSeries Bus, SubBus, DevFn using
device_n
ode structure
*/
#define ISERIES_BUS(DevPtr) DevPtr->DsaAddr.Dsa.busNumber
#define ISERIES_SUBBUS(DevPtr) DevPtr->DsaAddr.Dsa.subBusNumber
#define ISERIES_DEVICE(DevPtr) DevPtr->DsaAddr.Dsa.deviceId
#define ISERIES_DSA(DevPtr) DevPtr->DsaAddr.DsaAddr
#define ISERIES_DEVNODE(PciDev) ((struct iSeries_Device_Node *)PciDev->sysdata)
#define ISERIES_BUS(DevPtr) PCI_DN(DevPtr)->DsaAddr.Dsa.busNumber
#define ISERIES_SUBBUS(DevPtr) PCI_DN(DevPtr)->DsaAddr.Dsa.subBusNumber
#define ISERIES_DEVNODE(PciDev) ((struct device_node *)PciDev->sysdata)
#define EADsMaxAgents 7
...
...
@@ -67,22 +65,6 @@ struct iSeries_Device_Node;
#define ISERIES_HV_ADDR(virtaddr) \
(0x8000000000000000 | virt_to_abs(virtaddr))
/*
* iSeries Device Information
*/
struct
iSeries_Device_Node
{
struct
list_head
Device_List
;
struct
pci_dev
*
PciDev
;
union
HvDsaMap
DsaAddr
;
/* Direct Select Address */
/* busNumber, subBusNumber, */
/* deviceId, barNumber */
int
DevFn
;
/* Linux devfn */
int
Irq
;
/* Assigned IRQ */
int
Flags
;
/* Possible flags(disable/bist)*/
u8
LogicalSlot
;
/* Hv Slot Index for Tces */
struct
iommu_table
*
iommu_table
;
/* Device TCE Table */
};
extern
void
iSeries_Device_Information
(
struct
pci_dev
*
,
int
);
#endif
/* _ISERIES_64_PCI_H */
include/asm-ppc64/iommu.h
View file @
952ecef7
...
...
@@ -49,6 +49,7 @@ struct iommu_table {
};
struct
scatterlist
;
struct
device_node
;
#ifdef CONFIG_PPC_MULTIPLATFORM
...
...
@@ -70,9 +71,8 @@ extern void iommu_devnode_init_pSeries(struct device_node *dn);
#ifdef CONFIG_PPC_ISERIES
struct
iSeries_Device_Node
;
/* Creates table for an individual device node */
extern
void
iommu_devnode_init_iSeries
(
struct
iSeries_Device_N
ode
*
dn
);
extern
void
iommu_devnode_init_iSeries
(
struct
device_n
ode
*
dn
);
#endif
/* CONFIG_PPC_ISERIES */
...
...
include/asm-ppc64/pci-bridge.h
View file @
952ecef7
...
...
@@ -4,6 +4,8 @@
#include <linux/pci.h>
#include <asm/iSeries/HvCallPci.h>
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -71,6 +73,14 @@ struct pci_dn {
struct
iommu_table
*
iommu_table
;
/* for phb's or bridges */
struct
pci_dev
*
pcidev
;
/* back-pointer to the pci device */
struct
device_node
*
node
;
/* back-pointer to the device_node */
#ifdef CONFIG_PPC_ISERIES
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 */
#endif
u32
config_space
[
16
];
/* saved PCI config space */
};
...
...
include/asm-ppc64/prom.h
View file @
952ecef7
...
...
@@ -137,6 +137,9 @@ struct device_node {
struct
kref
kref
;
unsigned
long
_flags
;
void
*
data
;
#ifdef CONFIG_PPC_ISERIES
struct
list_head
Device_List
;
#endif
};
extern
struct
device_node
*
of_chosen
;
...
...
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