/net/can/

nal'>ecrts-pgm-final The LITMUS^RT kernel.Bjoern Brandenburg
aboutsummaryrefslogblamecommitdiffstats
path: root/drivers/acpi/system.c
blob: 9c61ab2177cf11a558f67877cff45709c3698a06 (plain) (tree)


























                                                                             
                         


                              
                                                     
                           
 
                                                
                                                
 
                     
                         
 

                                           
                                                                          







                                                                              
                                                                             

                                                                                
                                   
                                           














                                                                         




                                                               
                
                                                      


                                          
                                                                            






                                                                        



                                                                 
                                                                
                                                                          




                                                                      


                                                                               


                                                      
                                          


               
































                                                                            





                                                      
                                                                  



                                                                             











                                                                                
                                                              







                                                                     
                                              






                                                                            
 





                                                               

                                                  
 




                                          








                                                            
                                       
                                                 























                                                          
                                                 
            
                                                                             








                                                 
                                                              
            
                                                                             


               






                                                                                
                                                            








                                                                         


                      

                                                 





                                                                          
                                 
                                                                              
                                                                          
                               








                                                              
                                                          
                                                  

                                                               
            
                                                           


                                          



                                                                 
                                                        



                                                                  

                                 


                                                                    
                                                  
                                     
                                         






                                                                  
                                                 
                                                                           
                               
 

                                                                   
                                                                 
                                                                    
                                                                
















                                                                             
              
                                                                  
 


                                      







                              
                                          





                                                                             
                                                                             







                                                                               
                                
















                                                                           
                                                                               

















                                                                             
                                                                        













                                                                   
                                                                             
                                                                                
                         


                                               
 
                                                                    
 
                                                                          
                 





                                                                           
                                                            
                             


                                         
  
                                                                          
 
                                                            
                             
                                      

              
                                                                        
 
                                   
                                              
                    
 
                                                         
                                 
                               
 
                                                                               
 
                   
 
                                                                          
 
                                                            
                             
                                      

              
                                                                        
 
                                   
                                              
                    
 
                                                         
                                 
                               
 
                                                                               
 
                   
 
                                        
 
                                     
                      
 
                        
                                                                          
                           
                        

                                                                          

                           

                                                                          
                           
           
                     
 
            





                                                                





                                        
                                 
 
                   







                                           
/*
 *  acpi_system.c - ACPI System Driver ($Revision: 63 $)
 *
 *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
 *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.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.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 *
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 */

#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/init.h>
#include <linux/string.h>
#include <asm/uaccess.h>

#include <acpi/acpi_drivers.h>

#define _COMPONENT		ACPI_SYSTEM_COMPONENT
ACPI_MODULE_NAME("system");

#define ACPI_SYSTEM_CLASS		"system"
#define ACPI_SYSTEM_DEVICE_NAME		"System"

u32 acpi_irq_handled;
u32 acpi_irq_not_handled;

/*
 * Make ACPICA version work as module param
 */
static int param_get_acpica_version(char *buffer, struct kernel_param *kp)
{
	int result;

	result = sprintf(buffer, "%x", ACPI_CA_VERSION);

	return result;
}

module_param_call(acpica_version, NULL, param_get_acpica_version, NULL, 0444);

/* --------------------------------------------------------------------------
                              FS Interface (/sys)
   -------------------------------------------------------------------------- */
static LIST_HEAD(acpi_table_attr_list);
static struct kobject *tables_kobj;
static struct kobject *dynamic_tables_kobj;

struct acpi_table_attr {
	struct bin_attribute attr;
	char name[8];
	int instance;
	struct list_head node;
};

static ssize_t acpi_table_show(struct kobject *kobj,
			       struct bin_attribute *bin_attr, char *buf,
			       loff_t offset, size_t count)
{
	struct acpi_table_attr *table_attr =
	    container_of(bin_attr, struct acpi_table_attr, attr);
	struct acpi_table_header *table_header = NULL;
	acpi_status status;
	char name[ACPI_NAME_SIZE];

	if (strncmp(table_attr->name, "NULL", 4))
		memcpy(name, table_attr->name, ACPI_NAME_SIZE);
	else
		memcpy(name, "\0\0\0\0", 4);

	status =