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
nexedi
linux
Commits
38953d39
Commit
38953d39
authored
Feb 27, 2014
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge back earlier 'acpi-processor' material.
parents
f3ca4164
328281b1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
29 deletions
+61
-29
arch/ia64/kernel/acpi.c
arch/ia64/kernel/acpi.c
+0
-4
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/acpi/boot.c
+0
-4
drivers/acpi/processor_core.c
drivers/acpi/processor_core.c
+57
-21
include/linux/acpi.h
include/linux/acpi.h
+4
-0
No files found.
arch/ia64/kernel/acpi.c
View file @
38953d39
...
@@ -54,10 +54,6 @@
...
@@ -54,10 +54,6 @@
#include <asm/sal.h>
#include <asm/sal.h>
#include <asm/cyclone.h>
#include <asm/cyclone.h>
#define BAD_MADT_ENTRY(entry, end) ( \
(!entry) || (unsigned long)entry + sizeof(*entry) > end || \
((struct acpi_subtable_header *)entry)->length < sizeof(*entry))
#define PREFIX "ACPI: "
#define PREFIX "ACPI: "
unsigned
int
acpi_cpei_override
;
unsigned
int
acpi_cpei_override
;
...
...
arch/x86/kernel/acpi/boot.c
View file @
38953d39
...
@@ -53,10 +53,6 @@ EXPORT_SYMBOL(acpi_disabled);
...
@@ -53,10 +53,6 @@ EXPORT_SYMBOL(acpi_disabled);
# include <asm/proto.h>
# include <asm/proto.h>
#endif
/* X86 */
#endif
/* X86 */
#define BAD_MADT_ENTRY(entry, end) ( \
(!entry) || (unsigned long)entry + sizeof(*entry) > end || \
((struct acpi_subtable_header *)entry)->length < sizeof(*entry))
#define PREFIX "ACPI: "
#define PREFIX "ACPI: "
int
acpi_noirq
;
/* skip ACPI IRQ initialization */
int
acpi_noirq
;
/* skip ACPI IRQ initialization */
...
...
drivers/acpi/processor_core.c
View file @
38953d39
...
@@ -19,24 +19,6 @@
...
@@ -19,24 +19,6 @@
#define _COMPONENT ACPI_PROCESSOR_COMPONENT
#define _COMPONENT ACPI_PROCESSOR_COMPONENT
ACPI_MODULE_NAME
(
"processor_core"
);
ACPI_MODULE_NAME
(
"processor_core"
);
static
int
__init
set_no_mwait
(
const
struct
dmi_system_id
*
id
)
{
printk
(
KERN_NOTICE
PREFIX
"%s detected - "
"disabling mwait for CPU C-states
\n
"
,
id
->
ident
);
boot_option_idle_override
=
IDLE_NOMWAIT
;
return
0
;
}
static
struct
dmi_system_id
processor_idle_dmi_table
[]
__initdata
=
{
{
set_no_mwait
,
"Extensa 5220"
,
{
DMI_MATCH
(
DMI_BIOS_VENDOR
,
"Phoenix Technologies LTD"
),
DMI_MATCH
(
DMI_SYS_VENDOR
,
"Acer"
),
DMI_MATCH
(
DMI_PRODUCT_VERSION
,
"0100"
),
DMI_MATCH
(
DMI_BOARD_NAME
,
"Columbia"
)
},
NULL
},
{},
};
static
int
map_lapic_id
(
struct
acpi_subtable_header
*
entry
,
static
int
map_lapic_id
(
struct
acpi_subtable_header
*
entry
,
u32
acpi_id
,
int
*
apic_id
)
u32
acpi_id
,
int
*
apic_id
)
{
{
...
@@ -89,6 +71,28 @@ static int map_lsapic_id(struct acpi_subtable_header *entry,
...
@@ -89,6 +71,28 @@ static int map_lsapic_id(struct acpi_subtable_header *entry,
return
0
;
return
0
;
}
}
static
int
map_gic_id
(
struct
acpi_subtable_header
*
entry
,
int
device_declaration
,
u32
acpi_id
,
int
*
apic_id
)
{
struct
acpi_madt_generic_interrupt
*
gic
=
(
struct
acpi_madt_generic_interrupt
*
)
entry
;
if
(
!
(
gic
->
flags
&
ACPI_MADT_ENABLED
))
return
-
ENODEV
;
/*
* In the GIC interrupt model, logical processors are
* required to have a Processor Device object in the DSDT,
* so we should check device_declaration here
*/
if
(
device_declaration
&&
(
gic
->
uid
==
acpi_id
))
{
*
apic_id
=
gic
->
gic_id
;
return
0
;
}
return
-
EINVAL
;
}
static
int
map_madt_entry
(
int
type
,
u32
acpi_id
)
static
int
map_madt_entry
(
int
type
,
u32
acpi_id
)
{
{
unsigned
long
madt_end
,
entry
;
unsigned
long
madt_end
,
entry
;
...
@@ -124,6 +128,9 @@ static int map_madt_entry(int type, u32 acpi_id)
...
@@ -124,6 +128,9 @@ static int map_madt_entry(int type, u32 acpi_id)
}
else
if
(
header
->
type
==
ACPI_MADT_TYPE_LOCAL_SAPIC
)
{
}
else
if
(
header
->
type
==
ACPI_MADT_TYPE_LOCAL_SAPIC
)
{
if
(
!
map_lsapic_id
(
header
,
type
,
acpi_id
,
&
apic_id
))
if
(
!
map_lsapic_id
(
header
,
type
,
acpi_id
,
&
apic_id
))
break
;
break
;
}
else
if
(
header
->
type
==
ACPI_MADT_TYPE_GENERIC_INTERRUPT
)
{
if
(
!
map_gic_id
(
header
,
type
,
acpi_id
,
&
apic_id
))
break
;
}
}
entry
+=
header
->
length
;
entry
+=
header
->
length
;
}
}
...
@@ -154,6 +161,8 @@ static int map_mat_entry(acpi_handle handle, int type, u32 acpi_id)
...
@@ -154,6 +161,8 @@ static int map_mat_entry(acpi_handle handle, int type, u32 acpi_id)
map_lapic_id
(
header
,
acpi_id
,
&
apic_id
);
map_lapic_id
(
header
,
acpi_id
,
&
apic_id
);
}
else
if
(
header
->
type
==
ACPI_MADT_TYPE_LOCAL_SAPIC
)
{
}
else
if
(
header
->
type
==
ACPI_MADT_TYPE_LOCAL_SAPIC
)
{
map_lsapic_id
(
header
,
type
,
acpi_id
,
&
apic_id
);
map_lsapic_id
(
header
,
type
,
acpi_id
,
&
apic_id
);
}
else
if
(
header
->
type
==
ACPI_MADT_TYPE_GENERIC_INTERRUPT
)
{
map_gic_id
(
header
,
type
,
acpi_id
,
&
apic_id
);
}
}
exit:
exit:
...
@@ -323,7 +332,7 @@ static struct acpi_object_list *acpi_processor_alloc_pdc(void)
...
@@ -323,7 +332,7 @@ static struct acpi_object_list *acpi_processor_alloc_pdc(void)
* _PDC is required for a BIOS-OS handshake for most of the newer
* _PDC is required for a BIOS-OS handshake for most of the newer
* ACPI processor features.
* ACPI processor features.
*/
*/
static
int
static
acpi_status
acpi_processor_eval_pdc
(
acpi_handle
handle
,
struct
acpi_object_list
*
pdc_in
)
acpi_processor_eval_pdc
(
acpi_handle
handle
,
struct
acpi_object_list
*
pdc_in
)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
...
@@ -379,16 +388,43 @@ early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv)
...
@@ -379,16 +388,43 @@ early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv)
return
AE_OK
;
return
AE_OK
;
}
}
void
__init
acpi_early_processor_set_pdc
(
void
)
#if defined(CONFIG_X86) || defined(CONFIG_IA64)
static
int
__init
set_no_mwait
(
const
struct
dmi_system_id
*
id
)
{
pr_notice
(
PREFIX
"%s detected - disabling mwait for CPU C-states
\n
"
,
id
->
ident
);
boot_option_idle_override
=
IDLE_NOMWAIT
;
return
0
;
}
static
struct
dmi_system_id
processor_idle_dmi_table
[]
__initdata
=
{
{
set_no_mwait
,
"Extensa 5220"
,
{
DMI_MATCH
(
DMI_BIOS_VENDOR
,
"Phoenix Technologies LTD"
),
DMI_MATCH
(
DMI_SYS_VENDOR
,
"Acer"
),
DMI_MATCH
(
DMI_PRODUCT_VERSION
,
"0100"
),
DMI_MATCH
(
DMI_BOARD_NAME
,
"Columbia"
)
},
NULL
},
{},
};
static
void
__init
processor_dmi_check
(
void
)
{
{
/*
/*
* Check whether the system is DMI table. If yes, OSPM
* Check whether the system is DMI table. If yes, OSPM
* should not use mwait for CPU-states.
* should not use mwait for CPU-states.
*/
*/
dmi_check_system
(
processor_idle_dmi_table
);
dmi_check_system
(
processor_idle_dmi_table
);
}
#else
static
inline
void
processor_dmi_check
(
void
)
{}
#endif
void
__init
acpi_early_processor_set_pdc
(
void
)
{
processor_dmi_check
();
acpi_walk_namespace
(
ACPI_TYPE_PROCESSOR
,
ACPI_ROOT_OBJECT
,
acpi_walk_namespace
(
ACPI_TYPE_PROCESSOR
,
ACPI_ROOT_OBJECT
,
ACPI_UINT32_MAX
,
ACPI_UINT32_MAX
,
early_init_pdc
,
NULL
,
NULL
,
NULL
);
early_init_pdc
,
NULL
,
NULL
,
NULL
);
acpi_get_devices
(
"ACPI0007"
,
early_init_pdc
,
NULL
,
NULL
);
acpi_get_devices
(
ACPI_PROCESSOR_DEVICE_HID
,
early_init_pdc
,
NULL
,
NULL
);
}
}
include/linux/acpi.h
View file @
38953d39
...
@@ -108,6 +108,10 @@ static inline void acpi_initrd_override(void *data, size_t size)
...
@@ -108,6 +108,10 @@ static inline void acpi_initrd_override(void *data, size_t size)
}
}
#endif
#endif
#define BAD_MADT_ENTRY(entry, end) ( \
(!entry) || (unsigned long)entry + sizeof(*entry) > end || \
((struct acpi_subtable_header *)entry)->length < sizeof(*entry))
char
*
__acpi_map_table
(
unsigned
long
phys_addr
,
unsigned
long
size
);
char
*
__acpi_map_table
(
unsigned
long
phys_addr
,
unsigned
long
size
);
void
__acpi_unmap_table
(
char
*
map
,
unsigned
long
size
);
void
__acpi_unmap_table
(
char
*
map
,
unsigned
long
size
);
int
early_acpi_boot_init
(
void
);
int
early_acpi_boot_init
(
void
);
...
...
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