kernels/linux-2.4.0/arch/ia64/kernel/palinfo.c
/*
 * Entry point routine: all calls go through this function
 */
Entry point routine: all calls go through this function
Entry point routine : all calls go through this function
static int
palinfo_read_entry(char *page, char **start, off_t off, int count, int *eof, void *data)
{
	int len=0;
	pal_func_cpu_u_t *f = (pal_func_cpu_u_t *)&data;
	MOD_INC_USE_COUNT;
	if (f->req_cpu == smp_processor_id()) 
		len = (*palinfo_entries[f->func_id].proc_read)(page);
	else
		len = palinfo_handle_smp(f, page);
        if (len <= off+count) *eof = 1;
        *start = page + off;
        len   -= off;
        if (len>count) len = count;
        if (len<0) len = 0;
	MOD_DEC_USE_COUNT;
        return len;
}
static int palinfo_read_entry ( char * page , char * * start , off_t off , int count , int * eof , void * data ) { int len = 0 ; pal_func_cpu_u_t * f = ( pal_func_cpu_u_t * ) & data ; MOD_INC_USE_COUNT ; if ( f -> req_cpu == smp_processor_id ( ) ) len = ( * palinfo_entries [ f -> func_id ] . proc_read ) ( page ) ; else len = palinfo_handle_smp ( f , page ) ; if ( len <= off + count ) * eof = 1 ; * start = page + off ; len -= off ; if ( len > count ) len = count ; if ( len < 0 ) len = 0 ; MOD_DEC_USE_COUNT ; return len ; }
Entry point routine: all calls go through this function
Entry point routine : all calls go through this function
/*
	 * in SMP mode, we may need to call another CPU to get correct
	 * information. PAL, by definition, is processor specific
	 */