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
5ab74722
Commit
5ab74722
authored
Jul 10, 2008
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86, VisWS: turn into generic arch, use generic mpparse code
Signed-off-by:
Ingo Molnar
<
mingo@elte.hu
>
parent
31ac409a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
102 additions
and
95 deletions
+102
-95
arch/x86/Kconfig
arch/x86/Kconfig
+2
-2
arch/x86/mach-visws/Makefile
arch/x86/mach-visws/Makefile
+0
-1
arch/x86/mach-visws/mpparse.c
arch/x86/mach-visws/mpparse.c
+0
-85
arch/x86/mach-visws/setup_visws.c
arch/x86/mach-visws/setup_visws.c
+100
-7
No files found.
arch/x86/Kconfig
View file @
5ab74722
...
@@ -238,7 +238,7 @@ if ACPI
...
@@ -238,7 +238,7 @@ if ACPI
config X86_MPPARSE
config X86_MPPARSE
def_bool y
def_bool y
bool "Enable MPS table"
bool "Enable MPS table"
depends on X86_LOCAL_APIC
&& !X86_VISWS
depends on X86_LOCAL_APIC
help
help
For old smp systems that do not have proper acpi support. Newer systems
For old smp systems that do not have proper acpi support. Newer systems
(esp with 64bit cpus) with acpi support, MADT and DSDT will override it
(esp with 64bit cpus) with acpi support, MADT and DSDT will override it
...
@@ -247,7 +247,7 @@ endif
...
@@ -247,7 +247,7 @@ endif
if !ACPI
if !ACPI
config X86_MPPARSE
config X86_MPPARSE
def_bool y
def_bool y
depends on X86_LOCAL_APIC
&& !X86_VISWS
depends on X86_LOCAL_APIC
endif
endif
choice
choice
...
...
arch/x86/mach-visws/Makefile
View file @
5ab74722
...
@@ -5,4 +5,3 @@
...
@@ -5,4 +5,3 @@
obj-y
:=
setup.o setup_visws.o traps.o
obj-y
:=
setup.o setup_visws.o traps.o
obj-$(CONFIG_X86_VISWS_APIC)
+=
visws_apic.o
obj-$(CONFIG_X86_VISWS_APIC)
+=
visws_apic.o
obj-$(CONFIG_X86_LOCAL_APIC)
+=
mpparse.o
arch/x86/mach-visws/mpparse.c
deleted
100644 → 0
View file @
31ac409a
#include <linux/init.h>
#include <linux/smp.h>
#include <asm/smp.h>
#include <asm/io.h>
#include "cobalt.h"
#include "mach_apic.h"
extern
unsigned
int
__cpuinitdata
maxcpus
;
/*
* The Visual Workstation is Intel MP compliant in the hardware
* sense, but it doesn't have a BIOS(-configuration table).
* No problem for Linux.
*/
static
void
__init
MP_processor_info
(
struct
mpc_config_processor
*
m
)
{
int
ver
,
logical_apicid
;
physid_mask_t
apic_cpus
;
if
(
!
(
m
->
mpc_cpuflag
&
CPU_ENABLED
))
return
;
logical_apicid
=
m
->
mpc_apicid
;
printk
(
KERN_INFO
"%sCPU #%d %u:%u APIC version %d
\n
"
,
m
->
mpc_cpuflag
&
CPU_BOOTPROCESSOR
?
"Bootup "
:
""
,
m
->
mpc_apicid
,
(
m
->
mpc_cpufeature
&
CPU_FAMILY_MASK
)
>>
8
,
(
m
->
mpc_cpufeature
&
CPU_MODEL_MASK
)
>>
4
,
m
->
mpc_apicver
);
if
(
m
->
mpc_cpuflag
&
CPU_BOOTPROCESSOR
)
boot_cpu_physical_apicid
=
m
->
mpc_apicid
;
ver
=
m
->
mpc_apicver
;
if
((
ver
>=
0x14
&&
m
->
mpc_apicid
>=
0xff
)
||
m
->
mpc_apicid
>=
0xf
)
{
printk
(
KERN_ERR
"Processor #%d INVALID. (Max ID: %d).
\n
"
,
m
->
mpc_apicid
,
MAX_APICS
);
return
;
}
apic_cpus
=
apicid_to_cpu_present
(
m
->
mpc_apicid
);
physids_or
(
phys_cpu_present_map
,
phys_cpu_present_map
,
apic_cpus
);
/*
* Validate version
*/
if
(
ver
==
0x0
)
{
printk
(
KERN_ERR
"BIOS bug, APIC version is 0 for CPU#%d! "
"fixing up to 0x10. (tell your hw vendor)
\n
"
,
m
->
mpc_apicid
);
ver
=
0x10
;
}
apic_version
[
m
->
mpc_apicid
]
=
ver
;
}
void
__init
find_smp_config
(
void
)
{
struct
mpc_config_processor
*
mp
=
phys_to_virt
(
CO_CPU_TAB_PHYS
);
unsigned
short
ncpus
=
readw
(
phys_to_virt
(
CO_CPU_NUM_PHYS
));
if
(
ncpus
>
CO_CPU_MAX
)
{
printk
(
KERN_WARNING
"find_visws_smp: got cpu count of %d at %p
\n
"
,
ncpus
,
mp
);
ncpus
=
CO_CPU_MAX
;
}
if
(
ncpus
>
maxcpus
)
ncpus
=
maxcpus
;
#ifdef CONFIG_X86_LOCAL_APIC
smp_found_config
=
1
;
#endif
while
(
ncpus
--
)
MP_processor_info
(
mp
++
);
mp_lapic_addr
=
APIC_DEFAULT_PHYS_BASE
;
}
void
__init
get_smp_config
(
void
)
{
}
arch/x86/mach-visws/setup_visws.c
View file @
5ab74722
...
@@ -13,12 +13,17 @@
...
@@ -13,12 +13,17 @@
#include <asm/reboot.h>
#include <asm/reboot.h>
#include <asm/setup.h>
#include <asm/setup.h>
#include <asm/e820.h>
#include <asm/e820.h>
#include <asm/smp.h>
#include <asm/io.h>
#include <asm/io.h>
#include <mach_ipi.h>
#include <mach_ipi.h>
#include "cobalt.h"
#include "cobalt.h"
#include "piix4.h"
#include "piix4.h"
#include "mach_apic.h"
#include <linux/init.h>
#include <linux/smp.h>
char
visws_board_type
=
-
1
;
char
visws_board_type
=
-
1
;
char
visws_board_rev
=
-
1
;
char
visws_board_rev
=
-
1
;
...
@@ -126,6 +131,88 @@ static void visws_machine_power_off(void)
...
@@ -126,6 +131,88 @@ static void visws_machine_power_off(void)
outl
(
PIIX_SPECIAL_STOP
,
0xCFC
);
outl
(
PIIX_SPECIAL_STOP
,
0xCFC
);
}
}
static
int
__init
visws_get_smp_config_quirk
(
unsigned
int
early
)
{
/*
* Prevent MP-table parsing by the generic code:
*/
return
1
;
}
extern
unsigned
int
__cpuinitdata
maxcpus
;
/*
* The Visual Workstation is Intel MP compliant in the hardware
* sense, but it doesn't have a BIOS(-configuration table).
* No problem for Linux.
*/
static
void
__init
MP_processor_info
(
struct
mpc_config_processor
*
m
)
{
int
ver
,
logical_apicid
;
physid_mask_t
apic_cpus
;
if
(
!
(
m
->
mpc_cpuflag
&
CPU_ENABLED
))
return
;
logical_apicid
=
m
->
mpc_apicid
;
printk
(
KERN_INFO
"%sCPU #%d %u:%u APIC version %d
\n
"
,
m
->
mpc_cpuflag
&
CPU_BOOTPROCESSOR
?
"Bootup "
:
""
,
m
->
mpc_apicid
,
(
m
->
mpc_cpufeature
&
CPU_FAMILY_MASK
)
>>
8
,
(
m
->
mpc_cpufeature
&
CPU_MODEL_MASK
)
>>
4
,
m
->
mpc_apicver
);
if
(
m
->
mpc_cpuflag
&
CPU_BOOTPROCESSOR
)
boot_cpu_physical_apicid
=
m
->
mpc_apicid
;
ver
=
m
->
mpc_apicver
;
if
((
ver
>=
0x14
&&
m
->
mpc_apicid
>=
0xff
)
||
m
->
mpc_apicid
>=
0xf
)
{
printk
(
KERN_ERR
"Processor #%d INVALID. (Max ID: %d).
\n
"
,
m
->
mpc_apicid
,
MAX_APICS
);
return
;
}
apic_cpus
=
apicid_to_cpu_present
(
m
->
mpc_apicid
);
physids_or
(
phys_cpu_present_map
,
phys_cpu_present_map
,
apic_cpus
);
/*
* Validate version
*/
if
(
ver
==
0x0
)
{
printk
(
KERN_ERR
"BIOS bug, APIC version is 0 for CPU#%d! "
"fixing up to 0x10. (tell your hw vendor)
\n
"
,
m
->
mpc_apicid
);
ver
=
0x10
;
}
apic_version
[
m
->
mpc_apicid
]
=
ver
;
}
int
__init
visws_find_smp_config_quirk
(
unsigned
int
reserve
)
{
struct
mpc_config_processor
*
mp
=
phys_to_virt
(
CO_CPU_TAB_PHYS
);
unsigned
short
ncpus
=
readw
(
phys_to_virt
(
CO_CPU_NUM_PHYS
));
if
(
ncpus
>
CO_CPU_MAX
)
{
printk
(
KERN_WARNING
"find_visws_smp: got cpu count of %d at %p
\n
"
,
ncpus
,
mp
);
ncpus
=
CO_CPU_MAX
;
}
if
(
ncpus
>
maxcpus
)
ncpus
=
maxcpus
;
#ifdef CONFIG_X86_LOCAL_APIC
smp_found_config
=
1
;
#endif
while
(
ncpus
--
)
MP_processor_info
(
mp
++
);
mp_lapic_addr
=
APIC_DEFAULT_PHYS_BASE
;
return
1
;
}
extern
int
visws_trap_init_quirk
(
void
);
extern
int
visws_trap_init_quirk
(
void
);
void
__init
visws_early_detect
(
void
)
void
__init
visws_early_detect
(
void
)
...
@@ -162,6 +249,12 @@ void __init visws_early_detect(void)
...
@@ -162,6 +249,12 @@ void __init visws_early_detect(void)
*/
*/
no_broadcast
=
0
;
no_broadcast
=
0
;
/*
* Override generic MP-table parsing:
*/
mach_get_smp_config_quirk
=
visws_get_smp_config_quirk
;
mach_find_smp_config_quirk
=
visws_find_smp_config_quirk
;
/*
/*
* Get Board rev.
* Get Board rev.
* First, we have to initialize the 307 part to allow us access
* First, we have to initialize the 307 part to allow us access
...
...
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