Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 241694
b: refs/heads/master
c: 885b976
h: refs/heads/master
v: v3
  • Loading branch information
Huang Ying authored and Len Brown committed Mar 22, 2011
1 parent 0438740 commit a1baa3e
Show file tree
Hide file tree
Showing 39 changed files with 2,315 additions and 2,437 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 05534c9ffc9d5d950b14de8ba49a7609dc59b0b8
refs/heads/master: 885b976fada5bc6595a9fd3e67e3cb1a3d11f50b
6 changes: 3 additions & 3 deletions trunk/arch/ia64/include/asm/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ static inline const char *acpi_get_sysname (void)
int acpi_request_vector (u32 int_type);
int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);

/* Low-level suspend routine. */
extern int acpi_suspend_lowlevel(void);

/* routines for saving/restoring kernel state */
extern int acpi_save_state_mem(void);
extern void acpi_restore_state_mem(void);
extern unsigned long acpi_wakeup_address;

/*
Expand Down
14 changes: 12 additions & 2 deletions trunk/arch/ia64/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,8 +1034,18 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)
EXPORT_SYMBOL(acpi_unregister_ioapic);

/*
* acpi_suspend_lowlevel() - save kernel state and suspend.
* acpi_save_state_mem() - save kernel state
*
* TBD when when IA64 starts to support suspend...
*/
int acpi_suspend_lowlevel(void) { return 0; }
int acpi_save_state_mem(void) { return 0; }

/*
* acpi_restore_state()
*/
void acpi_restore_state_mem(void) {}

/*
* do_suspend_lowlevel()
*/
void do_suspend_lowlevel(void) {}
5 changes: 3 additions & 2 deletions trunk/arch/x86/include/asm/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ static inline void acpi_disable_pci(void)
acpi_noirq_set();
}

/* Low-level suspend routine. */
extern int acpi_suspend_lowlevel(void);
/* routines for saving/restoring kernel state */
extern int acpi_save_state_mem(void);
extern void acpi_restore_state_mem(void);

extern unsigned long acpi_wakeup_address;

Expand Down
13 changes: 10 additions & 3 deletions trunk/arch/x86/kernel/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ static char temp_stack[4096];
#endif

/**
* acpi_suspend_lowlevel - save kernel state
* acpi_save_state_mem - save kernel state
*
* Create an identity mapped page table and copy the wakeup routine to
* low memory.
*
* Note that this is too late to change acpi_wakeup_address.
*/
int acpi_suspend_lowlevel(void)
int acpi_save_state_mem(void)
{
struct wakeup_header *header;

Expand Down Expand Up @@ -107,10 +107,17 @@ int acpi_suspend_lowlevel(void)
saved_magic = 0x123456789abcdef0L;
#endif /* CONFIG_64BIT */

do_suspend_lowlevel();
return 0;
}

/*
* acpi_restore_state - undo effects of acpi_save_state_mem
*/
void acpi_restore_state_mem(void)
{
}


/**
* acpi_reserve_wakeup_memory - do _very_ early ACPI initialisation
*
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/x86/kernel/acpi/sleep.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ extern char swsusp_pg_dir[PAGE_SIZE];

extern unsigned long acpi_copy_wakeup_routine(unsigned long);
extern void wakeup_long64(void);

extern void do_suspend_lowlevel(void);
42 changes: 26 additions & 16 deletions trunk/arch/x86/kernel/cpu/mcheck/mce-apei.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,24 +106,34 @@ int apei_write_mce(struct mce *m)
ssize_t apei_read_mce(struct mce *m, u64 *record_id)
{
struct cper_mce_record rcd;
ssize_t len;

len = erst_read_next(&rcd.hdr, sizeof(rcd));
if (len <= 0)
return len;
/* Can not skip other records in storage via ERST unless clear them */
else if (len != sizeof(rcd) ||
uuid_le_cmp(rcd.hdr.creator_id, CPER_CREATOR_MCE)) {
if (printk_ratelimit())
pr_warning(
"MCE-APEI: Can not skip the unknown record in ERST");
return -EIO;
}

int rc, pos;

rc = erst_get_record_id_begin(&pos);
if (rc)
return rc;
retry:
rc = erst_get_record_id_next(&pos, record_id);
if (rc)
goto out;
/* no more record */
if (*record_id == APEI_ERST_INVALID_RECORD_ID)
goto out;
rc = erst_read(*record_id, &rcd.hdr, sizeof(rcd));
/* someone else has cleared the record, try next one */
if (rc == -ENOENT)
goto retry;
else if (rc < 0)
goto out;
/* try to skip other type records in storage */
else if (rc != sizeof(rcd) ||
uuid_le_cmp(rcd.hdr.creator_id, CPER_CREATOR_MCE))
goto retry;
memcpy(m, &rcd.mce, sizeof(*m));
*record_id = rcd.hdr.record_id;
rc = sizeof(*m);
out:
erst_get_record_id_end();

return sizeof(*m);
return rc;
}

/* Check whether there is record in ERST */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ obj-y += acpi.o

acpi-y := dsfield.o dsmthdat.o dsopcode.o dswexec.o dswscope.o \
dsmethod.o dsobject.o dsutils.o dswload.o dswstate.o \
dsinit.o dsargs.o dscontrol.o dswload2.o
dsinit.o

acpi-y += evevent.o evregion.o evsci.o evxfevnt.o \
evmisc.o evrgnini.o evxface.o evxfregn.o \
Expand Down Expand Up @@ -45,4 +45,4 @@ acpi-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o
acpi-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \
utcopy.o utdelete.o utglobal.o utmath.o utobject.o \
utstate.o utmutex.o utobject.o utresrc.o utlock.o utids.o \
utosi.o utxferror.o utdecode.o
utosi.o utxferror.o
38 changes: 16 additions & 22 deletions trunk/drivers/acpi/acpica/acdispat.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#define NAMEOF_ARG_NTE "__A0"

/*
* dsargs - execution of dynamic arguments for static objects
* dsopcode - support for late evaluation
*/
acpi_status
acpi_ds_get_buffer_field_arguments(union acpi_operand_object *obj_desc);
Expand All @@ -62,20 +62,6 @@ acpi_status acpi_ds_get_buffer_arguments(union acpi_operand_object *obj_desc);

acpi_status acpi_ds_get_package_arguments(union acpi_operand_object *obj_desc);

/*
* dscontrol - support for execution control opcodes
*/
acpi_status
acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
union acpi_parse_object *op);

acpi_status
acpi_ds_exec_end_control_op(struct acpi_walk_state *walk_state,
union acpi_parse_object *op);

/*
* dsopcode - support for late operand evaluation
*/
acpi_status
acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
Expand All @@ -99,6 +85,17 @@ acpi_ds_eval_bank_field_operands(struct acpi_walk_state *walk_state,

acpi_status acpi_ds_initialize_region(acpi_handle obj_handle);

/*
* dsctrl - Parser/Interpreter interface, control stack routines
*/
acpi_status
acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
union acpi_parse_object *op);

acpi_status
acpi_ds_exec_end_control_op(struct acpi_walk_state *walk_state,
union acpi_parse_object *op);

/*
* dsexec - Parser/Interpreter interface, method execution callbacks
*/
Expand Down Expand Up @@ -139,26 +136,23 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
struct acpi_walk_state *walk_state);

/*
* dsload - Parser/Interpreter interface, pass 1 namespace load callbacks
* dsload - Parser/Interpreter interface, namespace load callbacks
*/
acpi_status
acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number);

acpi_status
acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state,
union acpi_parse_object **out_op);

acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state);

/*
* dsload - Parser/Interpreter interface, pass 2 namespace load callbacks
*/
acpi_status
acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
union acpi_parse_object **out_op);

acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state);

acpi_status
acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number);

/*
* dsmthdat - method data (locals/args)
*/
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,6 @@ ACPI_EXTERN u32 acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS];
ACPI_EXTERN u8 acpi_gbl_last_owner_id_index;
ACPI_EXTERN u8 acpi_gbl_next_owner_id_offset;

/* Initialization sequencing */

ACPI_EXTERN u8 acpi_gbl_reg_methods_executed;

/* Misc */

ACPI_EXTERN u32 acpi_gbl_original_mode;
Expand Down
26 changes: 20 additions & 6 deletions trunk/drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,25 @@ union acpi_parse_object;
#define ACPI_MAX_MUTEX 7
#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1

#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
#ifdef DEFINE_ACPI_GLOBALS

/* Debug names for the mutexes above */

static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = {
"ACPI_MTX_Interpreter",
"ACPI_MTX_Namespace",
"ACPI_MTX_Tables",
"ACPI_MTX_Events",
"ACPI_MTX_Caches",
"ACPI_MTX_Memory",
"ACPI_MTX_CommandComplete",
"ACPI_MTX_CommandReady"
};

#endif
#endif

/* Lock structure for reader/writer interfaces */

struct acpi_rw_lock {
Expand Down Expand Up @@ -397,15 +416,10 @@ struct acpi_gpe_handler_info {
u8 originally_enabled; /* True if GPE was originally enabled */
};

struct acpi_gpe_notify_object {
struct acpi_namespace_node *node;
struct acpi_gpe_notify_object *next;
};

union acpi_gpe_dispatch_info {
struct acpi_namespace_node *method_node; /* Method node for this GPE level */
struct acpi_gpe_handler_info *handler; /* Installed GPE handler */
struct acpi_gpe_notify_object device; /* List of _PRW devices for implicit notify */
struct acpi_namespace_node *device_node; /* Parent _PRW device for implicit notify */
};

/*
Expand Down
Loading

0 comments on commit a1baa3e

Please sign in to comment.