MCA_bus move
PATCH 1/1 MCA_bus move
Updated for 2.6.0-test6.
- Move MCA_bus definition to drivers/mca/mca-bus.c
- Declare MCA_bus in <linux/mca.h>
- We can always include <linux/mca.h> whether or not CONFIG_MCA is defined.
Index: arch/i386/kernel/i386_ksyms.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/i386/kernel/i386_ksyms.c,v retrieving revision 1.3
i386/kernel/i386_ksyms.c +0 -1
@@ -63,7 +63,6 @@ extern unsigned long get_cmos_time(void)/* platform dependent support */ EXPORT_SYMBOL (boot_cpu_data); -EXPORT_SYMBOL (MCA_bus);#ifdef CONFIG_DISCONTIGMEM EXPORT_SYMBOL (node_data);EXPORT_SYMBOL (physnode_map);
Index: arch/i386/kernel/setup.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/i386/kernel/setup.c,v retrieving revision 1.5
i386/kernel/setup.c +3 -1
@@ -35,6 +35,7 @@#include <linux/console.h> #include <linux/root_dev.h> #include <linux/highmem.h> +#include <linux/mca.h> #include <linux/module.h> #include <video/edid.h> #include <asm/e820.h>
@@ -79,7 +80,6 @@ EXPORT_SYMBOL(acpi_disabled);int acpi_force__initdata =0 ; -int MCA_bus;/* for MCA, but anyone else can use it if they want */ unsigned int machine_id;unsigned int machine_submodel_id;
@@ -966,7 +966,9 @@ void __init setup_arch(char **cmdline_p) saved_videomode =VIDEO_MODE ;printk ("Video mode to be used for restore is %lx\n" , saved_videomode);if (SYS_DESC_TABLE .length !=0 ) { +#ifdef CONFIG_MCA MCA_bus =SYS_DESC_TABLE .table[3 ] &0x2 ; +#endif machine_id =SYS_DESC_TABLE .table[0 ]; machine_submodel_id =SYS_DESC_TABLE .table[1 ]; BIOS_revision =SYS_DESC_TABLE .table[2 ];
Index: arch/i386/kernel/time.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/i386/kernel/time.c,v retrieving revision 1.2
i386/kernel/time.c +1 -0
@@ -41,6 +41,7 @@#include <linux/delay.h> #include <linux/init.h> #include <linux/smp.h> +#include <linux/mca.h> #include <linux/module.h> #include <linux/sysdev.h> #include <linux/bcd.h>
Index: arch/i386/kernel/traps.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/i386/kernel/traps.c,v retrieving revision 1.5
i386/kernel/traps.c +0 -6
@@ -25,15 +25,9 @@#include <linux/highmem.h> #include <linux/kallsyms.h> #include <linux/ptrace.h> - -#ifdef CONFIG_EISA #include <linux/ioport.h> #include <linux/eisa.h> -#endif - -#ifdef CONFIG_MCA #include <linux/mca.h> -#endif #include <asm/processor.h> #include <asm/system.h>
Index: arch/i386/mach-pc9800/setup.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/i386/mach-pc9800/setup.c,v retrieving revision 1.1
i386/mach-pc9800/setup.c +1 -0
@@ -9,6 +9,7 @@#include <linux/irq.h> #include <linux/interrupt.h> #include <linux/apm_bios.h> +#include <linux/mca.h> #include <asm/setup.h> #include <asm/arch_hooks.h>
Index: drivers/isdn/eicon/eicon_isa.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/isdn/eicon/eicon_isa.c,v retrieving revision 1.2
isdn/eicon/eicon_isa.c +1 -0
@@ -13,6 +13,7 @@*/ #include <linux/config.h> +#include <linux/mca.h> #include "eicon.h" #include "eicon_isa.h"
Index: drivers/isdn/eicon/eicon_mod.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/isdn/eicon/eicon_mod.c,v retrieving revision 1.1
isdn/eicon/eicon_mod.c +0 -2
@@ -27,9 +27,7 @@#include <linux/config.h> #include <linux/module.h> #include <linux/init.h> -#ifdef CONFIG_MCA #include <linux/mca.h> -#endif /* CONFIG_MCA */ #include "eicon.h"
Index: drivers/mca/mca-bus.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/mca/mca-bus.c,v retrieving revision 1.2
mca/mca-bus.c +3 -0
@@ -36,6 +36,9 @@* expansion. None that I know have more than 2 */ struct mca_bus *mca_root_busses[MAX_MCA_BUSSES ]; +int MCA_bus; +EXPORT_SYMBOL (MCA_bus); +#define MCA_DEVINFO (i,s) { .pos = i, .name = s }struct mca_device_info {
Index: drivers/net/depca.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/net/depca.c,v retrieving revision 1.2
net/depca.c +4 -9
@@ -237,6 +237,7 @@#include <linux/config.h> #include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/kernel.h> #include <linux/string.h> #include <linux/errno.h>
@@ -253,21 +254,15 @@#include <linux/types.h> #include <linux/unistd.h> #include <linux/ctype.h> -#include <linux/moduleparam.h> +#include <linux/mca-legacy.h> +#include <linux/mca.h> #include <linux/device.h> +#include <linux/eisa.h> #include <asm/uaccess.h> #include <asm/bitops.h> #include <asm/io.h> #include <asm/dma.h> - -#ifdef CONFIG_MCA -#include <linux/mca.h> -#endif - -#ifdef CONFIG_EISA -#include <linux/eisa.h> -#endif #include "depca.h"
Index: drivers/serial/8250.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/serial/8250.c,v retrieving revision 1.11
serial/8250.c +1 -0
@@ -29,6 +29,7 @@#include <linux/ioport.h> #include <linux/init.h> #include <linux/console.h> +#include <linux/mca.h> #include <linux/sysrq.h> #include <linux/serial_reg.h> #include <linux/serial.h>
Index: include/asm-alpha/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-alpha/processor.h,v retrieving revision 1.2
asm-alpha/processor.h +0 -6
@@ -26,12 +26,6 @@#define TASK_UNMAPPED_BASE \ ((current->personality & ADDR_LIMIT_32BIT) ? 0x40000000 : TASK_SIZE / 2) -/* -* Bus types -*/ -#define MCA_bus 0 -#define MCA_bus__is_a_macro/* for versions in ksyms.c */ -typedef struct {unsigned long seg; }mm_segment_t ;
Index: include/asm-arm/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-arm/processor.h,v retrieving revision 1.3
asm-arm/processor.h +0 -3
@@ -19,9 +19,6 @@#ifdef __KERNEL__ -#define MCA_bus 0 -#define MCA_bus__is_a_macro -#include <asm/atomic.h> #include <asm/ptrace.h> #include <asm/procinfo.h>
Index: include/asm-arm26/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-arm26/processor.h,v retrieving revision 1.3
asm-arm26/processor.h +0 -3
@@ -20,9 +20,6 @@#ifdef __KERNEL__ -#define MCA_bus 0 -#define MCA_bus__is_a_macro -#include <asm/atomic.h> #include <asm/ptrace.h> #include <linux/string.h>
Index: include/asm-h8300/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-h8300/processor.h,v retrieving revision 1.4
asm-h8300/processor.h +0 -5
@@ -45,11 +45,6 @@ extern inline void wrusp(unsigned long u*/ #define TASK_UNMAPPED_BASE 0 -/* -* Bus types -*/ -#define MCA_bus 0 -struct thread_struct {unsigned long ksp;/* kernel stack pointer */ unsigned long usp;/* user stack pointer */
Index: include/asm-i386/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-i386/processor.h,v retrieving revision 1.5
asm-i386/processor.h +0 -1
@@ -260,7 +260,6 @@ static inline void clear_in_cr4 (unsigne* Bus types (default is ISA, but people can check others with these..) * pc98 indicates PC98 systems (CBUS) */ -extern int MCA_bus;#ifdef CONFIG_X86_PC9800 #define pc98 1#else
Index: include/asm-ia64/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-ia64/processor.h,v retrieving revision 1.4
asm-ia64/processor.h +0 -6
@@ -53,12 +53,6 @@*/ #define TASK_UNMAPPED_BASE (current->thread.map_base) -/* -* Bus types -*/ -#define MCA_bus 0 -#define MCA_bus__is_a_macro/* for versions in ksyms.c */ -#define IA64_THREAD_FPH_VALID (__IA64_UL(1) << 0)/* floating-point high state valid? */ #define IA64_THREAD_DBG_VALID (__IA64_UL(1) << 1)/* debug registers valid? */ #define IA64_THREAD_PM_VALID (__IA64_UL(1) << 2)/* performance registers valid? */
Index: include/asm-m68k/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-m68k/processor.h,v retrieving revision 1.2
asm-m68k/processor.h +0 -5
@@ -53,11 +53,6 @@ extern inline void wrusp(unsigned long u#endif #define TASK_UNMAPPED_ALIGN (addr, off) PAGE_ALIGN(addr) -/* -* Bus types -*/ -#define MCA_bus 0 -struct task_work {unsigned char sigpending;unsigned char notify_resume;/* request for notification on
Index: include/asm-m68knommu/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-m68knommu/processor.h,v retrieving revision 1.2
asm-m68knommu/processor.h +0 -5
@@ -55,11 +55,6 @@ extern inline void wrusp(unsigned long u*/ #define TASK_UNMAPPED_BASE 0 -/* -* Bus types -*/ -#define MCA_bus 0 -/* * if you change this structure, you must change the code and offsets * in m68k/machasm.S
Index: include/asm-mips/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-mips/processor.h,v retrieving revision 1.3
asm-mips/processor.h +0 -6
@@ -132,12 +132,6 @@ extern void (*cpu_wait)(void);extern unsigned int vced_count, vcei_count; -/* -* Bus types (default is ISA, but people can check others with these..) -*/ -#define MCA_bus 0 -#define MCA_bus__is_a_macro/* for versions in ksyms.c */ -#ifdef CONFIG_MIPS32 /* * User space process size: 2GB. This is hardcoded into a few places,
Index: include/asm-parisc/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-parisc/processor.h,v retrieving revision 1.5
asm-parisc/processor.h +0 -3
@@ -109,9 +109,6 @@ extern struct cpuinfo_parisc cpu_data[NR#define CPU_HVERSION ((boot_cpu_data.hversion >> 4) & 0x0FFF) -#define MCA_bus 0 -#define MCA_bus__is_a_macro/* for versions in ksyms.c */ -typedef struct {int seg; }mm_segment_t ;
Index: include/asm-ppc/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-ppc/processor.h,v retrieving revision 1.5
asm-ppc/processor.h +0 -6
@@ -70,12 +70,6 @@ extern void prepare_to_copy(struct task_*/ extern long kernel_thread (int (*fn)(void *),void *arg,unsigned long flags); -/* -* Bus types -*/ -#define MCA_bus 0 -#define MCA_bus__is_a_macro -/* Lazy FPU handling on uni-processor */ extern struct task_struct *last_task_used_math;extern struct task_struct *last_task_used_altivec;
Index: include/asm-ppc64/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-ppc64/processor.h,v retrieving revision 1.2
asm-ppc64/processor.h +0 -6
@@ -609,12 +609,6 @@ void release_thread(struct task_struct **/ extern long kernel_thread (int (*fn)(void *),void *arg,unsigned long flags); -/* -* Bus types -*/ -#define MCA_bus 0 -#define MCA_bus__is_a_macro/* for versions in ksyms.c */ -/* Lazy FPU handling on uni-processor */ extern struct task_struct *last_task_used_math;
Index: include/asm-sh/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-sh/processor.h,v retrieving revision 1.2
asm-sh/processor.h +0 -6
@@ -166,12 +166,6 @@ extern void release_thread(struct task_s*/ extern int kernel_thread (int (*fn)(void *),void * arg,unsigned long flags); -/* -* Bus types -*/ -#define MCA_bus 0 -#define MCA_bus__is_a_macro/* for versions in ksyms.c */ -/* Copy and release all segment info associated with a VM */ #define copy_segments (p, mm) do { } while(0)#define release_segments (mm) do { } while(0)
Index: include/asm-sparc/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-sparc/processor.h,v retrieving revision 1.2
asm-sparc/processor.h +0 -6
@@ -25,12 +25,6 @@#include <asm/atomic.h> /* -* Bus types -*/ -#define MCA_bus 0 -#define MCA_bus__is_a_macro/* for versions in ksyms.c */ - -/* * The sparc has no problems with write protection */ #define wp_works_ok 1
Index: include/asm-sparc64/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-sparc64/processor.h,v retrieving revision 1.4
asm-sparc64/processor.h +0 -4
@@ -21,10 +21,6 @@#include <asm/segment.h> #include <asm/page.h> -/* Bus types */ -#define MCA_bus 0 -#define MCA_bus__is_a_macro/* for versions in ksyms.c */ -/* The sparc has no problems with write protection */ #define wp_works_ok 1#define wp_works_ok__is_a_macro/* for versions in ksyms.c */
Index: include/asm-v850/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-v850/processor.h,v retrieving revision 1.3
asm-v850/processor.h +0 -6
@@ -49,12 +49,6 @@#define current_text_addr () ({ __label__ _l; _l: &&_l;}) -/* -* Bus types -*/ -#define MCA_bus 0 -#define MCA_bus__is_a_macro/* for versions in ksyms.c */ -/* If you change this, you must change the associated assembly-languages constants defined below, THREAD_*. */ struct thread_struct {
Index: include/asm-x86_64/processor.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-x86_64/processor.h,v retrieving revision 1.5
asm-x86_64/processor.h +0 -6
@@ -157,12 +157,6 @@ static inline void clear_in_cr4 (unsigne :"ax"); } -/* -* Bus types -*/ -#define MCA_bus 0 -#define MCA_bus__is_a_macro -/* * User space process size: 512GB - 1GB (default).
Index: include/linux/mca.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/linux/mca.h,v retrieving revision 1.3
linux/mca.h +3 -3
@@ -11,17 +11,17 @@* are sorted out */ #include <linux/device.h> -/* get the platform specific defines */ #ifdef CONFIG_MCA +/* get the platform specific defines */ #include <asm/mca.h> -#endif /* The detection of MCA bus is done in the real mode (using BIOS). * The information is exported to the protected code, where this * variable is set to one in case MCA bus was detected. */ -#ifndef MCA_bus__is_a_macroextern int MCA_bus; +#else +#define MCA_bus 0#endif /* This sets up an information callback for /proc/mca/slot?. The
Signature · 3 lines
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk
Quoted 2 lines · Matthew Wilcox
Updated for 2.6.0-test6.
No it isn't.
Your tree is corrupt, and your include/linux/mca.h file does _not_ match the one I have.
Also, please make all diffs be "-p1" based.
Linus