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
4cc0e3b1
Commit
4cc0e3b1
authored
Apr 24, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: put machine type into naca from Don Reed
parent
f105d55b
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
44 additions
and
61 deletions
+44
-61
arch/ppc64/kernel/LparData.c
arch/ppc64/kernel/LparData.c
+0
-4
arch/ppc64/kernel/chrp_setup.c
arch/ppc64/kernel/chrp_setup.c
+2
-2
arch/ppc64/kernel/eeh.c
arch/ppc64/kernel/eeh.c
+1
-1
arch/ppc64/kernel/htab.c
arch/ppc64/kernel/htab.c
+2
-2
arch/ppc64/kernel/pSeries_pci.c
arch/ppc64/kernel/pSeries_pci.c
+1
-1
arch/ppc64/kernel/pci_dma.c
arch/ppc64/kernel/pci_dma.c
+4
-4
arch/ppc64/kernel/ppc_ksyms.c
arch/ppc64/kernel/ppc_ksyms.c
+0
-4
arch/ppc64/kernel/prom.c
arch/ppc64/kernel/prom.c
+8
-7
arch/ppc64/kernel/rtas-proc.c
arch/ppc64/kernel/rtas-proc.c
+1
-1
arch/ppc64/kernel/setup.c
arch/ppc64/kernel/setup.c
+10
-11
arch/ppc64/kernel/smp.c
arch/ppc64/kernel/smp.c
+1
-1
arch/ppc64/kernel/udbg.c
arch/ppc64/kernel/udbg.c
+2
-4
arch/ppc64/kernel/xics.c
arch/ppc64/kernel/xics.c
+2
-2
arch/ppc64/xmon/xmon.c
arch/ppc64/xmon/xmon.c
+2
-2
include/asm-ppc64/iSeries/HvReleaseData.h
include/asm-ppc64/iSeries/HvReleaseData.h
+1
-1
include/asm-ppc64/naca.h
include/asm-ppc64/naca.h
+3
-1
include/asm-ppc64/processor.h
include/asm-ppc64/processor.h
+4
-13
No files found.
arch/ppc64/kernel/LparData.c
View file @
4cc0e3b1
...
@@ -220,10 +220,6 @@ struct ItVpdAreas itVpdAreas = {
...
@@ -220,10 +220,6 @@ struct ItVpdAreas itVpdAreas = {
}
}
};
};
/* Data area used in flush_hash_page */
long
long
flush_hash_page_hpte
[
2
];
struct
msChunks
msChunks
=
{
0
,
0
,
0
,
0
,
NULL
};
struct
msChunks
msChunks
=
{
0
,
0
,
0
,
0
,
NULL
};
/* Depending on whether this is called from iSeries or pSeries setup
/* Depending on whether this is called from iSeries or pSeries setup
...
...
arch/ppc64/kernel/chrp_setup.c
View file @
4cc0e3b1
...
@@ -251,7 +251,7 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -251,7 +251,7 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
#endif /* CONFIG_BLK_DEV_INITRD */
#endif /* CONFIG_BLK_DEV_INITRD */
#endif
#endif
ppc_md
.
ppc_machine
=
_machine
;
ppc_md
.
ppc_machine
=
naca
->
platform
;
ppc_md
.
setup_arch
=
chrp_setup_arch
;
ppc_md
.
setup_arch
=
chrp_setup_arch
;
ppc_md
.
setup_residual
=
NULL
;
ppc_md
.
setup_residual
=
NULL
;
...
@@ -315,7 +315,7 @@ chrp_progress(char *s, unsigned short hex)
...
@@ -315,7 +315,7 @@ chrp_progress(char *s, unsigned short hex)
if
(
hex
)
if
(
hex
)
udbg_printf
(
"<chrp_progress> %s
\n
"
,
s
);
udbg_printf
(
"<chrp_progress> %s
\n
"
,
s
);
if
(
!
rtas
.
base
||
(
_machine
!=
_MACH_pSeries
))
if
(
!
rtas
.
base
||
(
naca
->
platform
!=
PLATFORM_PSERIES
))
return
;
return
;
if
(
max_width
==
0
)
{
if
(
max_width
==
0
)
{
...
...
arch/ppc64/kernel/eeh.c
View file @
4cc0e3b1
...
@@ -121,7 +121,7 @@ void eeh_init(void) {
...
@@ -121,7 +121,7 @@ void eeh_init(void) {
ibm_set_eeh_option
=
rtas_token
(
"ibm,set-eeh-option"
);
ibm_set_eeh_option
=
rtas_token
(
"ibm,set-eeh-option"
);
ibm_set_slot_reset
=
rtas_token
(
"ibm,set-slot-reset"
);
ibm_set_slot_reset
=
rtas_token
(
"ibm,set-slot-reset"
);
ibm_read_slot_reset_state
=
rtas_token
(
"ibm,read-slot-reset-state"
);
ibm_read_slot_reset_state
=
rtas_token
(
"ibm,read-slot-reset-state"
);
if
(
ibm_set_eeh_option
!=
RTAS_UNKNOWN_SERVICE
&&
_machine
==
_MACH_pSeriesLP
)
if
(
ibm_set_eeh_option
!=
RTAS_UNKNOWN_SERVICE
&&
naca
->
platform
==
PLATFORM_PSERIES_LPAR
)
eeh_implemented
=
1
;
eeh_implemented
=
1
;
if
(
eeh_force_off
>
eeh_force_on
)
{
if
(
eeh_force_off
>
eeh_force_on
)
{
...
...
arch/ppc64/kernel/htab.c
View file @
4cc0e3b1
...
@@ -83,7 +83,7 @@ create_pte_mapping(unsigned long start, unsigned long end,
...
@@ -83,7 +83,7 @@ create_pte_mapping(unsigned long start, unsigned long end,
for
(
addr
=
start
;
addr
<
end
;
addr
+=
step
)
{
for
(
addr
=
start
;
addr
<
end
;
addr
+=
step
)
{
unsigned
long
vsid
=
get_kernel_vsid
(
addr
);
unsigned
long
vsid
=
get_kernel_vsid
(
addr
);
unsigned
long
va
=
(
vsid
<<
28
)
|
(
addr
&
0xfffffff
);
unsigned
long
va
=
(
vsid
<<
28
)
|
(
addr
&
0xfffffff
);
if
(
_machine
==
_MACH_pSeriesLP
)
if
(
naca
->
platform
==
PLATFORM_PSERIES_LPAR
)
pSeries_lpar_make_pte
(
htab
,
va
,
pSeries_lpar_make_pte
(
htab
,
va
,
(
unsigned
long
)
__v2a
(
addr
),
mode
,
mask
,
large
);
(
unsigned
long
)
__v2a
(
addr
),
mode
,
mask
,
large
);
else
else
...
@@ -118,7 +118,7 @@ htab_initialize(void)
...
@@ -118,7 +118,7 @@ htab_initialize(void)
_htab_data
->
htab_num_ptegs
=
pteg_count
;
_htab_data
->
htab_num_ptegs
=
pteg_count
;
_htab_data
->
htab_hash_mask
=
pteg_count
-
1
;
_htab_data
->
htab_hash_mask
=
pteg_count
-
1
;
if
(
_machine
==
_MACH_pSeries
)
{
if
(
naca
->
platform
==
PLATFORM_PSERIES
)
{
/* Find storage for the HPT. Must be contiguous in
/* Find storage for the HPT. Must be contiguous in
* the absolute address space.
* the absolute address space.
*/
*/
...
...
arch/ppc64/kernel/pSeries_pci.c
View file @
4cc0e3b1
...
@@ -518,7 +518,7 @@ alloc_phb(struct device_node *dev, char *model, unsigned int addr_size_words)
...
@@ -518,7 +518,7 @@ alloc_phb(struct device_node *dev, char *model, unsigned int addr_size_words)
phb
=
pci_alloc_pci_controller
(
"PHB SW"
,
phb_type_speedwagon
);
phb
=
pci_alloc_pci_controller
(
"PHB SW"
,
phb_type_speedwagon
);
if
(
phb
==
NULL
)
return
NULL
;
if
(
phb
==
NULL
)
return
NULL
;
if
(
_machine
==
_MACH_pSeries
)
{
if
(
naca
->
platform
==
PLATFORM_PSERIES
)
{
phb
->
cfg_addr
=
(
volatile
unsigned
long
*
)
phb
->
cfg_addr
=
(
volatile
unsigned
long
*
)
ioremap
(
reg_struct
.
address
+
0x140
,
PAGE_SIZE
);
ioremap
(
reg_struct
.
address
+
0x140
,
PAGE_SIZE
);
phb
->
cfg_data
=
(
char
*
)(
phb
->
cfg_addr
-
0x02
);
/* minus is correct */
phb
->
cfg_data
=
(
char
*
)(
phb
->
cfg_addr
-
0x02
);
/* minus is correct */
...
...
arch/ppc64/kernel/pci_dma.c
View file @
4cc0e3b1
...
@@ -137,7 +137,7 @@ static inline struct TceTable *get_tce_table(struct pci_dev *dev)
...
@@ -137,7 +137,7 @@ static inline struct TceTable *get_tce_table(struct pci_dev *dev)
dev
=
ppc64_isabridge_dev
;
dev
=
ppc64_isabridge_dev
;
if
(
!
dev
)
if
(
!
dev
)
return
NULL
;
return
NULL
;
if
(
(
_machine
==
_MACH_iSeries
)
&&
(
dev
->
bus
)
)
if
(
(
naca
->
platform
==
PLATFORM_ISERIES_LPAR
)
&&
(
dev
->
bus
)
)
return
tceTables
[
dev
->
bus
->
number
];
return
tceTables
[
dev
->
bus
->
number
];
/* On the iSeries, the virtual bus will take this path. There is a */
/* On the iSeries, the virtual bus will take this path. There is a */
/* fake pci_dev and dev_node built and used. */
/* fake pci_dev and dev_node built and used. */
...
@@ -765,7 +765,7 @@ void create_tce_tables(void) {
...
@@ -765,7 +765,7 @@ void create_tce_tables(void) {
struct
pci_dev
*
dev
;
struct
pci_dev
*
dev
;
struct
device_node
*
dn
,
*
mydn
;
struct
device_node
*
dn
,
*
mydn
;
if
(
_machine
==
_MACH_pSeriesLP
)
if
(
naca
->
platform
==
PLATFORM_PSERIES_LPAR
)
create_tce_tables_for_busesLP
(
&
pci_root_buses
);
create_tce_tables_for_busesLP
(
&
pci_root_buses
);
else
else
create_tce_tables_for_buses
(
&
pci_root_buses
);
create_tce_tables_for_buses
(
&
pci_root_buses
);
...
@@ -799,7 +799,7 @@ void create_pci_bus_tce_table( unsigned long token ) {
...
@@ -799,7 +799,7 @@ void create_pci_bus_tce_table( unsigned long token ) {
newTceTable
=
kmalloc
(
sizeof
(
struct
TceTable
),
GFP_KERNEL
);
newTceTable
=
kmalloc
(
sizeof
(
struct
TceTable
),
GFP_KERNEL
);
if
(
_machine
==
_MACH_iSeries
)
{
if
(
naca
->
platform
==
PLATFORM_ISERIES_LPAR
)
{
if
(
token
>
254
)
{
if
(
token
>
254
)
{
printk
(
"PCI: Bus TCE table failed, invalid bus number %lu
\n
"
,
token
);
printk
(
"PCI: Bus TCE table failed, invalid bus number %lu
\n
"
,
token
);
return
;
return
;
...
@@ -860,7 +860,7 @@ void create_pci_bus_tce_table( unsigned long token ) {
...
@@ -860,7 +860,7 @@ void create_pci_bus_tce_table( unsigned long token ) {
dn
=
(
struct
device_node
*
)
token
;
dn
=
(
struct
device_node
*
)
token
;
phb
=
dn
->
phb
;
phb
=
dn
->
phb
;
if
(
_machine
==
_MACH_pSeries
)
if
(
naca
->
platform
==
PLATFORM_PSERIES
)
getTceTableParmsPSeries
(
phb
,
dn
,
newTceTable
);
getTceTableParmsPSeries
(
phb
,
dn
,
newTceTable
);
else
else
getTceTableParmsPSeriesLP
(
phb
,
dn
,
newTceTable
);
getTceTableParmsPSeriesLP
(
phb
,
dn
,
newTceTable
);
...
...
arch/ppc64/kernel/ppc_ksyms.c
View file @
4cc0e3b1
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
#include <linux/sched.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/nvram.h>
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#include <linux/console.h>
#include <linux/console.h>
#include <linux/irq.h>
#include <linux/irq.h>
...
@@ -225,9 +224,6 @@ EXPORT_SYMBOL(__no_use_cli);
...
@@ -225,9 +224,6 @@ EXPORT_SYMBOL(__no_use_cli);
#endif
#endif
#endif
#endif
#ifndef CONFIG_MACH_SPECIFIC
EXPORT_SYMBOL
(
_machine
);
#endif
EXPORT_SYMBOL
(
ppc_md
);
EXPORT_SYMBOL
(
ppc_md
);
EXPORT_SYMBOL
(
find_devices
);
EXPORT_SYMBOL
(
find_devices
);
...
...
arch/ppc64/kernel/prom.c
View file @
4cc0e3b1
...
@@ -376,7 +376,7 @@ prom_initialize_naca(unsigned long mem)
...
@@ -376,7 +376,7 @@ prom_initialize_naca(unsigned long mem)
_naca
->
iCacheL1LogLineSize
=
__ilog2
(
size
);
_naca
->
iCacheL1LogLineSize
=
__ilog2
(
size
);
_naca
->
iCacheL1LinesPerPage
=
PAGE_SIZE
/
size
;
_naca
->
iCacheL1LinesPerPage
=
PAGE_SIZE
/
size
;
if
(
RELOC
(
_machine
)
==
_MACH_pSeriesLP
)
{
if
(
_naca
->
platform
==
PLATFORM_PSERIES_LPAR
)
{
u32
pft_size
[
2
];
u32
pft_size
[
2
];
call_prom
(
RELOC
(
"getprop"
),
4
,
1
,
node
,
call_prom
(
RELOC
(
"getprop"
),
4
,
1
,
node
,
RELOC
(
"ibm,pft-size"
),
RELOC
(
"ibm,pft-size"
),
...
@@ -451,7 +451,7 @@ prom_initialize_naca(unsigned long mem)
...
@@ -451,7 +451,7 @@ prom_initialize_naca(unsigned long mem)
_naca
->
physicalMemorySize
=
lmb_phys_mem_size
();
_naca
->
physicalMemorySize
=
lmb_phys_mem_size
();
if
(
RELOC
(
_machine
)
==
_MACH_pSeries
)
{
if
(
_naca
->
platform
==
PLATFORM_PSERIES
)
{
unsigned
long
rnd_mem_size
,
pteg_count
;
unsigned
long
rnd_mem_size
,
pteg_count
;
/* round mem_size up to next power of 2 */
/* round mem_size up to next power of 2 */
...
@@ -522,8 +522,8 @@ prom_initialize_naca(unsigned long mem)
...
@@ -522,8 +522,8 @@ prom_initialize_naca(unsigned long mem)
prom_print_hex
(
_naca
->
interrupt_controller
);
prom_print_hex
(
_naca
->
interrupt_controller
);
prom_print_nl
();
prom_print_nl
();
prom_print
(
RELOC
(
"
_machine
= 0x"
));
prom_print
(
RELOC
(
"
naca->platform
= 0x"
));
prom_print_hex
(
RELOC
(
_machine
)
);
prom_print_hex
(
_naca
->
platform
);
prom_print_nl
();
prom_print_nl
();
prom_print
(
RELOC
(
"prom_initialize_naca: end...
\n
"
));
prom_print
(
RELOC
(
"prom_initialize_naca: end...
\n
"
));
...
@@ -626,6 +626,7 @@ prom_instantiate_rtas(unsigned long mem)
...
@@ -626,6 +626,7 @@ prom_instantiate_rtas(unsigned long mem)
unsigned
long
offset
=
reloc_offset
();
unsigned
long
offset
=
reloc_offset
();
struct
prom_t
*
_prom
=
PTRRELOC
(
&
prom
);
struct
prom_t
*
_prom
=
PTRRELOC
(
&
prom
);
struct
rtas_t
*
_rtas
=
PTRRELOC
(
&
rtas
);
struct
rtas_t
*
_rtas
=
PTRRELOC
(
&
rtas
);
struct
naca_struct
*
_naca
=
RELOC
(
naca
);
ihandle
prom_rtas
;
ihandle
prom_rtas
;
u32
getprop_rval
;
u32
getprop_rval
;
...
@@ -642,7 +643,7 @@ prom_instantiate_rtas(unsigned long mem)
...
@@ -642,7 +643,7 @@ prom_instantiate_rtas(unsigned long mem)
RELOC
(
"ibm,hypertas-functions"
),
RELOC
(
"ibm,hypertas-functions"
),
hypertas_funcs
,
hypertas_funcs
,
sizeof
(
hypertas_funcs
)))
>
0
)
{
sizeof
(
hypertas_funcs
)))
>
0
)
{
RELOC
(
_machine
)
=
_MACH_pSeriesLP
;
_naca
->
platform
=
PLATFORM_PSERIES_LPAR
;
}
}
call_prom
(
RELOC
(
"getprop"
),
call_prom
(
RELOC
(
"getprop"
),
...
@@ -1241,7 +1242,7 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp,
...
@@ -1241,7 +1242,7 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp,
struct
prom_t
*
_prom
=
PTRRELOC
(
&
prom
);
struct
prom_t
*
_prom
=
PTRRELOC
(
&
prom
);
/* Default machine type. */
/* Default machine type. */
RELOC
(
_machine
)
=
_MACH_pSeries
;
_naca
->
platform
=
PLATFORM_PSERIES
;
/* Reset klimit to take into account the embedded system map */
/* Reset klimit to take into account the embedded system map */
if
(
RELOC
(
embedded_sysmap_end
))
if
(
RELOC
(
embedded_sysmap_end
))
RELOC
(
klimit
)
=
__va
(
PAGE_ALIGN
(
RELOC
(
embedded_sysmap_end
)));
RELOC
(
klimit
)
=
__va
(
PAGE_ALIGN
(
RELOC
(
embedded_sysmap_end
)));
...
@@ -1413,7 +1414,7 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp,
...
@@ -1413,7 +1414,7 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp,
lmb_reserve
(
0
,
__pa
(
RELOC
(
klimit
)));
lmb_reserve
(
0
,
__pa
(
RELOC
(
klimit
)));
if
(
RELOC
(
_machine
)
==
_MACH_pSeries
)
if
(
_naca
->
platform
==
PLATFORM_PSERIES
)
prom_initialize_tce_table
();
prom_initialize_tce_table
();
if
((
long
)
call_prom
(
RELOC
(
"getprop"
),
4
,
1
,
if
((
long
)
call_prom
(
RELOC
(
"getprop"
),
4
,
1
,
...
...
arch/ppc64/kernel/rtas-proc.c
View file @
4cc0e3b1
...
@@ -200,7 +200,7 @@ void proc_rtas_init(void)
...
@@ -200,7 +200,7 @@ void proc_rtas_init(void)
struct
proc_dir_entry
*
entry
;
struct
proc_dir_entry
*
entry
;
rtas_node
=
find_devices
(
"rtas"
);
rtas_node
=
find_devices
(
"rtas"
);
if
((
rtas_node
==
0
)
||
(
_machine
==
_MACH_iSeries
))
{
if
((
rtas_node
==
0
)
||
(
naca
->
platform
==
PLATFORM_ISERIES_LPAR
))
{
return
;
return
;
}
}
...
...
arch/ppc64/kernel/setup.c
View file @
4cc0e3b1
...
@@ -76,8 +76,6 @@ void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -76,8 +76,6 @@ void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned
long
r6
,
unsigned
long
r7
);
unsigned
long
r6
,
unsigned
long
r7
);
int
parse_bootinfo
(
void
);
int
parse_bootinfo
(
void
);
int
_machine
=
_MACH_unknown
;
#ifdef CONFIG_MAGIC_SYSRQ
#ifdef CONFIG_MAGIC_SYSRQ
unsigned
long
SYSRQ_KEY
;
unsigned
long
SYSRQ_KEY
;
#endif
/* CONFIG_MAGIC_SYSRQ */
#endif
/* CONFIG_MAGIC_SYSRQ */
...
@@ -134,14 +132,15 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -134,14 +132,15 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
/* pSeries systems are identified in prom.c via OF. */
/* pSeries systems are identified in prom.c via OF. */
if
(
itLpNaca
.
xLparInstalled
==
1
)
if
(
itLpNaca
.
xLparInstalled
==
1
)
_machine
=
_MACH_iSeries
;
naca
->
platform
=
PLATFORM_ISERIES_LPAR
;
switch
(
_machine
)
{
case
_MACH_iSeries
:
switch
(
naca
->
platform
)
{
case
PLATFORM_ISERIES_LPAR
:
iSeries_init_early
();
iSeries_init_early
();
break
;
break
;
#ifdef CONFIG_PPC_PSERIES
#ifdef CONFIG_PPC_PSERIES
case
_MACH_pSeries
:
case
PLATFORM_PSERIES
:
pSeries_init_early
();
pSeries_init_early
();
#ifdef CONFIG_BLK_DEV_INITRD
#ifdef CONFIG_BLK_DEV_INITRD
initrd_start
=
initrd_end
=
0
;
initrd_start
=
initrd_end
=
0
;
...
@@ -149,7 +148,7 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -149,7 +148,7 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
parse_bootinfo
();
parse_bootinfo
();
break
;
break
;
case
_MACH_pSeriesLP
:
case
PLATFORM_PSERIES_LPAR
:
pSeriesLP_init_early
();
pSeriesLP_init_early
();
#ifdef CONFIG_BLK_DEV_INITRD
#ifdef CONFIG_BLK_DEV_INITRD
initrd_start
=
initrd_end
=
0
;
initrd_start
=
initrd_end
=
0
;
...
@@ -220,15 +219,15 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -220,15 +219,15 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
udbg_puts
(
"
\n
-----------------------------------------------------
\n
"
);
udbg_puts
(
"
\n
-----------------------------------------------------
\n
"
);
if
(
_machine
&
_MACH_pSeries
)
{
if
(
naca
->
platform
&
PLATFORM_PSERIES
)
{
finish_device_tree
();
finish_device_tree
();
chrp_init
(
r3
,
r4
,
r5
,
r6
,
r7
);
chrp_init
(
r3
,
r4
,
r5
,
r6
,
r7
);
}
}
mm_init_ppc64
();
mm_init_ppc64
();
switch
(
_machine
)
{
switch
(
naca
->
platform
)
{
case
_MACH_iSeries
:
case
PLATFORM_ISERIES_LPAR
:
iSeries_init
();
iSeries_init
();
break
;
break
;
default:
default:
...
@@ -313,7 +312,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
...
@@ -313,7 +312,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
* Assume here that all clock rates are the same in a
* Assume here that all clock rates are the same in a
* smp system. -- Cort
* smp system. -- Cort
*/
*/
if
(
_machine
!=
_MACH_iSeries
)
{
if
(
naca
->
platform
!=
PLATFORM_ISERIES_LPAR
)
{
struct
device_node
*
cpu_node
;
struct
device_node
*
cpu_node
;
int
*
fp
;
int
*
fp
;
...
...
arch/ppc64/kernel/smp.c
View file @
4cc0e3b1
...
@@ -262,7 +262,7 @@ smp_chrp_setup_cpu(int cpu_nr)
...
@@ -262,7 +262,7 @@ smp_chrp_setup_cpu(int cpu_nr)
static
atomic_t
ready
=
ATOMIC_INIT
(
1
);
static
atomic_t
ready
=
ATOMIC_INIT
(
1
);
static
volatile
int
frozen
=
0
;
static
volatile
int
frozen
=
0
;
if
(
_machine
==
_MACH_pSeriesLP
)
{
if
(
naca
->
platform
==
PLATFORM_PSERIES_LPAR
)
{
/* timebases already synced under the hypervisor. */
/* timebases already synced under the hypervisor. */
paca
[
cpu_nr
].
next_jiffy_update_tb
=
tb_last_stamp
=
get_tb
();
paca
[
cpu_nr
].
next_jiffy_update_tb
=
tb_last_stamp
=
get_tb
();
if
(
cpu_nr
==
0
)
{
if
(
cpu_nr
==
0
)
{
...
...
arch/ppc64/kernel/udbg.c
View file @
4cc0e3b1
...
@@ -23,8 +23,6 @@
...
@@ -23,8 +23,6 @@
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/machdep.h>
#include <asm/machdep.h>
extern
int
_machine
;
struct
NS16550
{
struct
NS16550
{
/* this struct must be packed */
/* this struct must be packed */
unsigned
char
rbr
;
/* 0 */
unsigned
char
rbr
;
/* 0 */
...
@@ -86,7 +84,7 @@ udbg_putc(unsigned char c)
...
@@ -86,7 +84,7 @@ udbg_putc(unsigned char c)
/* wait for idle */
;
/* wait for idle */
;
udbg_comport
->
thr
=
'\r'
;
eieio
();
udbg_comport
->
thr
=
'\r'
;
eieio
();
}
}
}
else
if
(
_machine
==
_MACH_iSeries
)
{
}
else
if
(
naca
->
platform
==
PLATFORM_ISERIES_LPAR
)
{
/* ToDo: switch this via ppc_md */
/* ToDo: switch this via ppc_md */
printk
(
"%c"
,
c
);
printk
(
"%c"
,
c
);
}
}
...
@@ -180,7 +178,7 @@ udbg_puthex(unsigned long val)
...
@@ -180,7 +178,7 @@ udbg_puthex(unsigned long val)
void
void
udbg_printSP
(
const
char
*
s
)
udbg_printSP
(
const
char
*
s
)
{
{
if
(
_machine
==
_MACH_pSeries
)
{
if
(
naca
->
platform
==
PLATFORM_PSERIES
)
{
unsigned
long
sp
;
unsigned
long
sp
;
asm
(
"mr %0,1"
:
"=r"
(
sp
)
:
);
asm
(
"mr %0,1"
:
"=r"
(
sp
)
:
);
if
(
s
)
if
(
s
)
...
...
arch/ppc64/kernel/xics.c
View file @
4cc0e3b1
...
@@ -369,7 +369,7 @@ xics_init_IRQ( void )
...
@@ -369,7 +369,7 @@ xics_init_IRQ( void )
xics_irq_8259_cascade
=
virt_irq_create_mapping
(
xics_irq_8259_cascade_real
);
xics_irq_8259_cascade
=
virt_irq_create_mapping
(
xics_irq_8259_cascade_real
);
}
}
if
(
_machine
==
_MACH_pSeries
)
{
if
(
naca
->
platform
==
PLATFORM_PSERIES
)
{
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
for
(
i
=
0
;
i
<
naca
->
processorCount
;
++
i
)
{
for
(
i
=
0
;
i
<
naca
->
processorCount
;
++
i
)
{
xics_info
.
per_cpu
[
i
]
=
xics_info
.
per_cpu
[
i
]
=
...
@@ -383,7 +383,7 @@ xics_init_IRQ( void )
...
@@ -383,7 +383,7 @@ xics_init_IRQ( void )
/* actually iSeries does not use any of xics...but it has link dependencies
/* actually iSeries does not use any of xics...but it has link dependencies
* for now, except this new one...
* for now, except this new one...
*/
*/
}
else
if
(
_machine
==
_MACH_pSeriesLP
)
{
}
else
if
(
naca
->
platform
==
PLATFORM_PSERIES_LPAR
)
{
ops
=
&
pSeriesLP_ops
;
ops
=
&
pSeriesLP_ops
;
#endif
#endif
}
}
...
...
arch/ppc64/xmon/xmon.c
View file @
4cc0e3b1
...
@@ -538,7 +538,7 @@ insert_bpts()
...
@@ -538,7 +538,7 @@ insert_bpts()
int
i
;
int
i
;
struct
bpt
*
bp
;
struct
bpt
*
bp
;
if
(
_machine
!=
_MACH_pSeries
)
if
(
naca
->
platform
!=
PLATFORM_PSERIES
)
return
;
return
;
bp
=
bpts
;
bp
=
bpts
;
for
(
i
=
0
;
i
<
NBPTS
;
++
i
,
++
bp
)
{
for
(
i
=
0
;
i
<
NBPTS
;
++
i
,
++
bp
)
{
...
@@ -569,7 +569,7 @@ remove_bpts()
...
@@ -569,7 +569,7 @@ remove_bpts()
struct
bpt
*
bp
;
struct
bpt
*
bp
;
unsigned
instr
;
unsigned
instr
;
if
(
_machine
!=
_MACH_pSeries
)
if
(
naca
->
platform
!=
PLATFORM_PSERIES
)
return
;
return
;
if
(
!
__is_processor
(
PV_POWER4
))
{
if
(
!
__is_processor
(
PV_POWER4
))
{
set_dabr
(
0
);
set_dabr
(
0
);
...
...
include/asm-ppc64/iSeries/HvReleaseData.h
View file @
4cc0e3b1
...
@@ -52,7 +52,7 @@ struct HvReleaseData
...
@@ -52,7 +52,7 @@ struct HvReleaseData
u32
xDesc
;
// Descriptor "HvRD" ebcdic x00-x03
u32
xDesc
;
// Descriptor "HvRD" ebcdic x00-x03
u16
xSize
;
// Size of this control block x04-x05
u16
xSize
;
// Size of this control block x04-x05
u16
xVpdAreasPtrOffset
;
// Offset in NACA of ItVpdAreas x06-x07
u16
xVpdAreasPtrOffset
;
// Offset in NACA of ItVpdAreas x06-x07
struct
naca
*
xSlicNacaAddr
;
// Virtual address of SLIC NACA
x08-x0F
struct
naca
_struct
*
xSlicNacaAddr
;
// Virt addr of SLIC NACA
x08-x0F
u32
xMsNucDataOffset
;
// Offset of Linux Mapping Data x10-x13
u32
xMsNucDataOffset
;
// Offset of Linux Mapping Data x10-x13
u32
xRsvd1
;
// Reserved x14-x17
u32
xRsvd1
;
// Reserved x14-x17
u16
xTagsMode
:
1
;
// 0 == tags active, 1 == tags inactive
u16
xTagsMode
:
1
;
// 0 == tags active, 1 == tags inactive
...
...
include/asm-ppc64/naca.h
View file @
4cc0e3b1
...
@@ -30,7 +30,9 @@ struct naca_struct {
...
@@ -30,7 +30,9 @@ struct naca_struct {
u64
pftSize
;
/* Log base 2 of page table size */
u64
pftSize
;
/* Log base 2 of page table size */
u64
serialPortAddr
;
/* Phyical address of serial port */
u64
serialPortAddr
;
/* Phyical address of serial port */
u8
interrupt_controller
;
/* Type of interrupt controller */
u8
interrupt_controller
;
/* Type of interrupt controller */
u8
resv0
[
6
];
/* Padding */
u8
resv0
;
/* Type of interrupt controller */
u16
platform
;
/* Platform flags */
u8
resv1
[
12
];
/* Padding */
};
};
extern
struct
naca_struct
*
naca
;
extern
struct
naca_struct
*
naca
;
...
...
include/asm-ppc64/processor.h
View file @
4cc0e3b1
...
@@ -490,18 +490,10 @@
...
@@ -490,18 +490,10 @@
#define PV_630 0x0040
#define PV_630 0x0040
#define PV_630p 0x0041
#define PV_630p 0x0041
/* Platforms supported by PPC64. _machine is actually a set of flags */
/* Platforms supported by PPC64 */
#define _MACH_pSeriesHW 0x00010000
#define PLATFORM_PSERIES 0x0100
#define _MACH_iSeriesHW 0x00020000
#define PLATFORM_PSERIES_LPAR 0x0101
#define _MACH_LPAR 0x00000001
#define PLATFORM_ISERIES_LPAR 0x0201
#define _MACH_unknown 0x00000000
#define _MACH_pSeries (_MACH_pSeriesHW)
#define _MACH_pSeriesLP (_MACH_pSeriesHW | _MACH_LPAR)
#define _MACH_iSeries (_MACH_iSeriesHW | _MACH_LPAR)
/* Compat defines for drivers */
#define _MACH_Pmac 0xf0000000
/* bogus value */
/*
/*
* List of interrupt controllers.
* List of interrupt controllers.
...
@@ -609,7 +601,6 @@ GLUE(GLUE(.LT,NAME),_procname_end):
...
@@ -609,7 +601,6 @@ GLUE(GLUE(.LT,NAME),_procname_end):
asm volatile("mfasr %0" : "=r" (rval)); rval;})
asm volatile("mfasr %0" : "=r" (rval)); rval;})
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLY__
extern
int
_machine
;
extern
int
have_of
;
extern
int
have_of
;
struct
task_struct
;
struct
task_struct
;
...
...
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