patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / drivers / s390 / cio / requestirq.c
1 /*
2  *  drivers/s390/cio/requestirq.c
3  *   S/390 common I/O routines -- enabling and disabling of devices
4  *   $Revision: 1.46 $
5  *
6  *    Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
7  *                            IBM Corporation
8  *    Author(s): Ingo Adlung (adlung@de.ibm.com)
9  *               Cornelia Huck (cohuck@de.ibm.com)
10  *               Arnd Bergmann (arndb@de.ibm.com)
11  */
12
13 #include <linux/module.h>
14 #include <linux/config.h>
15 #include <linux/device.h>
16 #include <linux/init.h>
17 #include <asm/lowcore.h>
18
19 #include "css.h"
20
21 struct pgid global_pgid;
22 EXPORT_SYMBOL_GPL(global_pgid);
23
24 /*
25  * init_IRQ is now only used to set the pgid as early as possible
26  */
27 void __init
28 init_IRQ(void)
29 {
30         /*
31          * Let's build our path group ID here.
32          */
33         if (MACHINE_NEW_STIDP)
34                 global_pgid.cpu_addr = 0x8000;
35         else {
36 #ifdef CONFIG_SMP
37                 global_pgid.cpu_addr = hard_smp_processor_id();
38 #else
39                 global_pgid.cpu_addr = 0;
40 #endif
41         }
42         global_pgid.cpu_id = ((cpuid_t *) __LC_CPUID)->ident;
43         global_pgid.cpu_model = ((cpuid_t *) __LC_CPUID)->machine;
44         global_pgid.tod_high = (__u32) (get_clock() >> 32);
45 }