Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / asm-ppc / machdep.h
index 4ace72f..e1a0a7b 100644 (file)
@@ -4,6 +4,10 @@
 
 #include <linux/config.h>
 #include <linux/init.h>
+#include <linux/kexec.h>
+
+#include <asm/setup.h>
+#include <asm/page.h>
 
 #ifdef CONFIG_APUS
 #include <asm-m68k/machdep.h>
@@ -13,6 +17,19 @@ struct pt_regs;
 struct pci_bus;        
 struct pci_dev;
 struct seq_file;
+struct file;
+
+/*
+ * This is for compatibility with ARCH=powerpc.
+ */
+#define machine_is(x)  __MACHINE_IS_##x
+#define __MACHINE_IS_powermac  0
+#define __MACHINE_IS_chrp      0
+#ifdef CONFIG_PPC_PREP
+#define __MACHINE_IS_prep      1
+#else
+#define __MACHINE_IS_prep      0
+#endif
 
 /* We export this macro for external modules like Alsa to know if
  * ppc_md.feature_call is implemented or not
@@ -30,14 +47,16 @@ struct machdep_calls {
        int             (*get_irq)(struct pt_regs *);
        
        /* A general init function, called by ppc_init in init/main.c.
-          May be NULL. */
+          May be NULL. DEPRECATED ! */
        void            (*init)(void);
+       /* For compatibility with merged platforms */
+       void            (*init_early)(void);
 
        void            (*restart)(char *cmd);
        void            (*power_off)(void);
        void            (*halt)(void);
 
-       void            (*idle)(void);
+       void            (*idle_loop)(void);
        void            (*power_save)(void);
 
        long            (*time_init)(void); /* Optional, may be NULL */
@@ -54,6 +73,7 @@ struct machdep_calls {
        unsigned long   (*find_end_of_memory)(void);
        void            (*setup_io_mappings)(void);
 
+       void            (*early_serial_map)(void);
        void            (*progress)(char *, unsigned short);
        void            (*kgdb_map_scc)(void);
 
@@ -90,8 +110,11 @@ struct machdep_calls {
        /* Called at then very end of pcibios_init() */
        void (*pcibios_after_init)(void);
 
-       /* this is for modules, since _machine can be a define -- Cort */
-       int ppc_machine;
+       /* Get access protection for /dev/mem */
+       pgprot_t        (*phys_mem_access_prot)(struct file *file,
+                                               unsigned long pfn,
+                                               unsigned long size,
+                                               pgprot_t vma_prot);
 
        /* Motherboard/chipset features. This is a kind of general purpose
         * hook used to control some machine specific features (like reset
@@ -103,29 +126,46 @@ struct machdep_calls {
        /* functions for dealing with other cpus */
        struct smp_ops_t *smp_ops;
 #endif /* CONFIG_SMP */
+
+#ifdef CONFIG_KEXEC
+       /* Called to shutdown machine specific hardware not already controlled
+        * by other drivers.
+        * XXX Should we move this one out of kexec scope?
+        */
+       void (*machine_shutdown)(void);
+
+       /* Called to do the minimal shutdown needed to run a kexec'd kernel
+        * to run successfully.
+        * XXX Should we move this one out of kexec scope?
+        */
+       void (*machine_crash_shutdown)(void);
+
+       /* Called to do what every setup is needed on image and the
+        * reboot code buffer. Returns 0 on success.
+        * Provide your own (maybe dummy) implementation if your platform
+        * claims to support kexec.
+        */
+       int (*machine_kexec_prepare)(struct kimage *image);
+
+       /* Called to handle any machine specific cleanup on image */
+       void (*machine_kexec_cleanup)(struct kimage *image);
+
+       /* Called to perform the _real_ kexec.
+        * Do NOT allocate memory or fail here. We are past the point of
+        * no return.
+        */
+       void (*machine_kexec)(struct kimage *image);
+#endif /* CONFIG_KEXEC */
 };
 
 extern struct machdep_calls ppc_md;
-#define COMMAND_LINE_SIZE 512
 extern char cmd_line[COMMAND_LINE_SIZE];
 
 extern void setup_pci_ptrs(void);
 
-/*
- * Power macintoshes have either a CUDA or a PMU controlling
- * system reset, power, NVRAM, RTC.
- */
-typedef enum sys_ctrler_kind {
-       SYS_CTRLER_UNKNOWN = 0,
-       SYS_CTRLER_CUDA = 1,
-       SYS_CTRLER_PMU = 2,
-} sys_ctrler_t;
-
-extern sys_ctrler_t sys_ctrler;
-
 #ifdef CONFIG_SMP
 struct smp_ops_t {
-       void  (*message_pass)(int target, int msg, unsigned long data, int wait);
+       void  (*message_pass)(int target, int msg);
        int   (*probe)(void);
        void  (*kick_cpu)(int nr);
        void  (*setup_cpu)(int nr);