]> git.hungrycats.org Git - linux/commitdiff
[PATCH] x86-64 update
authorAndi Kleen <ak@muc.de>
Sun, 31 Aug 2003 05:33:55 +0000 (22:33 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 31 Aug 2003 05:33:55 +0000 (22:33 -0700)
Make everything compile and boot again.

 - Update defconfig
 - Some minor cleanup
 - Introduce physid_t for APIC masks (fixes UP kernels)
 - Add bandaid for CardBus bridges and broken BIOS (Vojtech)
 - Add bandaid for unsynchronized TSCs  (Vojtech)
 - Fix ffs(0) return value (fixes XFS)
 - Fix compilation with software suspend

17 files changed:
arch/x86_64/defconfig
arch/x86_64/ia32/sys_ia32.c
arch/x86_64/kernel/apic.c
arch/x86_64/kernel/io_apic.c
arch/x86_64/kernel/ioport.c
arch/x86_64/kernel/mpparse.c
arch/x86_64/kernel/setup.c
arch/x86_64/kernel/smpboot.c
arch/x86_64/kernel/time.c
arch/x86_64/kernel/vsyscall.c
include/asm-x86_64/bitops.h
include/asm-x86_64/mpspec.h
include/asm-x86_64/percpu.h
include/asm-x86_64/processor.h
include/asm-x86_64/smp.h
include/asm-x86_64/suspend.h
include/asm-x86_64/topology.h

index 3018aafd56fd715deeebaa0c250037dbcb7b051b..c0474ff8674b9e5b8a57c624e5351cb58e3074a0 100644 (file)
@@ -14,6 +14,7 @@ CONFIG_GENERIC_ISA_DMA=y
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
+# CONFIG_BROKEN is not set
 
 #
 # General setup
@@ -23,10 +24,12 @@ CONFIG_SYSVIPC=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 CONFIG_LOG_BUF_SHIFT=18
+# CONFIG_IKCONFIG is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
 
@@ -72,10 +75,10 @@ CONFIG_PM=y
 CONFIG_SOFTWARE_SUSPEND=y
 
 #
-# ACPI Support
+# ACPI (Advanced Configuration and Power Interface) Support
 #
+# CONFIG_ACPI_HT is not set
 CONFIG_ACPI=y
-# CONFIG_ACPI_HT_ONLY is not set
 CONFIG_ACPI_BOOT=y
 CONFIG_ACPI_SLEEP=y
 CONFIG_ACPI_SLEEP_PROC_FS=y
@@ -117,7 +120,6 @@ CONFIG_UID16=y
 #
 # Generic Driver Options
 #
-# CONFIG_FW_LOADER is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -159,6 +161,7 @@ CONFIG_BLK_DEV_IDEDISK=y
 CONFIG_IDEDISK_MULTI_MODE=y
 # CONFIG_IDEDISK_STROKE is not set
 CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
 # CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
@@ -318,7 +321,6 @@ CONFIG_IP_MULTICAST=y
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_NETFILTER is not set
-# CONFIG_XFRM_USER is not set
 
 #
 # SCTP Configuration (EXPERIMENTAL)
@@ -405,6 +407,7 @@ CONFIG_E1000=m
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
 # CONFIG_SK98LIN is not set
 CONFIG_TIGON3=y
 
@@ -595,10 +598,7 @@ CONFIG_FS_MBCACHE=y
 CONFIG_REISERFS_FS=y
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
-CONFIG_JFS_FS=y
-CONFIG_JFS_POSIX_ACL=y
-# CONFIG_JFS_DEBUG is not set
-# CONFIG_JFS_STATISTICS is not set
+# CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
@@ -674,49 +674,6 @@ CONFIG_SUNRPC=y
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-CONFIG_NLS=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS_DEFAULT="iso8859-1"
-# CONFIG_NLS_CODEPAGE_437 is not set
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
 
 #
 # Graphics support
index 727fbc26147a4ccff778517f24580e6835b9cb02..9e3aaa491ecd84ed1872fb722db29daf114b7800 100644 (file)
@@ -1170,8 +1170,6 @@ sys32_rt_sigqueueinfo(int pid, int sig, siginfo_t32 *uinfo)
        return ret;
 }
 
-extern void check_pending(int signum);
-
 asmlinkage long sys_utimes(char *, struct timeval *);
 
 asmlinkage long
index a55dfe9abb7c446fd577277434062e50d9b06418..032bec4120e074b9b63d9135024eb03ed1ae4ed9 100644 (file)
@@ -299,7 +299,7 @@ void __init setup_local_APIC (void)
         * This is meaningless in clustered apic mode, so we skip it.
         */
        if (!clustered_apic_mode &&
-               !cpu_isset(GET_APIC_ID(apic_read(APIC_ID)), phys_cpu_present_map))
+               !physid_isset(GET_APIC_ID(apic_read(APIC_ID)), phys_cpu_present_map))
                BUG();
 
        /*
@@ -993,7 +993,7 @@ int __init APIC_init_uniprocessor (void)
 
        connect_bsp_APIC();
 
-       phys_cpu_present_map = cpumask_of_cpu(0);
+       phys_cpu_present_map = physid_mask_of_physid(0);
        apic_write_around(APIC_ID, boot_cpu_id);
 
        setup_local_APIC();
index f477c5b9771dbee514cbf842b6d18f82fe0b6f73..86dc573355e623d93a4dc4d47f5c7e1eee0b71d6 100644 (file)
@@ -1014,7 +1014,7 @@ void disable_IO_APIC(void)
 static void __init setup_ioapic_ids_from_mpc (void)
 {
        union IO_APIC_reg_00 reg_00;
-       cpumask_t phys_id_present_map = phys_cpu_present_map;
+       physid_mask_t phys_id_present_map = phys_cpu_present_map;
        int apic;
        int i;
        unsigned char old_id;
@@ -1047,22 +1047,22 @@ static void __init setup_ioapic_ids_from_mpc (void)
                 * system must have a unique ID or we get lots of nice
                 * 'stuck on smp_invalidate_needed IPI wait' messages.
                 */
-               if (cpu_isset(mp_ioapics[apic].mpc_apicid, phys_id_present_map)) {
+               if (physid_isset(mp_ioapics[apic].mpc_apicid, phys_id_present_map)) {
                        printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!...\n",
                                apic, mp_ioapics[apic].mpc_apicid);
                        for (i = 0; i < 0xf; i++)
-                               if (!cpu_isset(i, phys_id_present_map))
+                               if (!physid_isset(i, phys_id_present_map))
                                        break;
                        if (i >= 0xf)
                                panic("Max APIC ID exceeded!\n");
                        printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n",
                                i);
-                       cpu_set(i, phys_id_present_map);
+                       physid_set(i, phys_id_present_map);
                        mp_ioapics[apic].mpc_apicid = i;
                } else {
                        printk(KERN_INFO 
                               "Using IO-APIC %d\n", mp_ioapics[apic].mpc_apicid);
-                       cpu_set(mp_ioapics[apic].mpc_apicid, phys_id_present_map);
+                       physid_set(mp_ioapics[apic].mpc_apicid, phys_id_present_map);
                }
 
 
@@ -1642,7 +1642,7 @@ void __init mp_config_ioapic_for_sci(int irq)
 int __init io_apic_get_unique_id (int ioapic, int apic_id)
 {
        union IO_APIC_reg_00 reg_00;
-       static cpumask_t apic_id_map;
+       static physid_mask_t apic_id_map;
        unsigned long flags;
        int i = 0;
 
@@ -1655,7 +1655,7 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id)
         *      advantage of new APIC bus architecture.
         */
 
-       if (!cpus_empty(apic_id_map))
+       if (!physids_empty(apic_id_map))
                apic_id_map = phys_cpu_present_map;
 
        spin_lock_irqsave(&ioapic_lock, flags);
@@ -1672,10 +1672,10 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id)
         * Every APIC in a system must have a unique ID or we get lots of nice 
         * 'stuck on smp_invalidate_needed IPI wait' messages.
         */
-       if (cpu_isset(apic_id, apic_id_map)) {
+       if (physid_isset(apic_id, apic_id_map)) {
 
                for (i = 0; i < IO_APIC_MAX_ID; i++) {
-                       if (!cpu_isset(i, apic_id_map))
+                       if (!physid_isset(i, apic_id_map))
                                break;
                }
 
@@ -1688,7 +1688,7 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id)
                apic_id = i;
        } 
 
-       cpu_set(apic_id, apic_id_map);
+       physid_set(apic_id, apic_id_map);
 
        if (reg_00.bits.ID != apic_id) {
                reg_00.bits.ID = apic_id;
index e19f439d57828e63a19f0950f5b9c7b324388171..ac942c03b0127c6a68868d11e65be319c0738ea8 100644 (file)
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/ioport.h>
-#include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
 #include <linux/stddef.h>
 #include <linux/slab.h>
-#include <asm/io.h>
+#include <linux/thread_info.h>
 
 /* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */
 static void set_bitmap(unsigned long *bitmap, unsigned int base, unsigned int extent, int new_value)
@@ -118,12 +117,7 @@ asmlinkage long sys_iopl(unsigned int level, struct pt_regs regs)
                        return -EPERM;
        }
        regs.eflags = (regs.eflags &~ 0x3000UL) | (level << 12);
+       /* Make sure we return the long way (not sysenter) */
+       set_thread_flag(TIF_IRET);
        return 0;
 }
-
-void eat_key(void)
-{
-       if (inb(0x60) & 1) 
-               inb(0x64);
-}
-
index fbf0f26e623e4b9709b8d5f3db39454caa69214d..4dc5c02051f060e3991e7174453b2efbd7f9de9b 100644 (file)
@@ -67,7 +67,7 @@ unsigned int boot_cpu_id = -1U;
 static unsigned int num_processors = 0;
 
 /* Bitmask of physically existing CPUs */
-cpumask_t phys_cpu_present_map = CPU_MASK_NONE;
+physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE;
 
 /* ACPI MADT entry parsing functions */
 #ifdef CONFIG_ACPI_BOOT
@@ -126,7 +126,7 @@ static void __init MP_processor_info (struct mpc_config_processor *m)
        }
        ver = m->mpc_apicver;
 
-       cpu_set(m->mpc_apicid, phys_cpu_present_map);
+       physid_set(m->mpc_apicid, phys_cpu_present_map);
        /*
         * Validate version
         */
index 16dd7fb483ce122668455fc2446eec7ab62ef554..771ac31d3b158e5f885c6082c114c07ce66420c9 100644 (file)
@@ -243,6 +243,8 @@ static void __init contig_initmem_init(void)
 
 void __init setup_arch(char **cmdline_p)
 {
+       unsigned long low_mem_size;
+
        ROOT_DEV = ORIG_ROOT_DEV;
        drive_info = DRIVE_INFO;
        screen_info = SCREEN_INFO;
@@ -378,7 +380,13 @@ void __init setup_arch(char **cmdline_p)
                request_resource(&ioport_resource, standard_io_resources+i);
        }
 
-       pci_mem_start = IOMAP_START; 
+       /* Will likely break when you have unassigned resources with more
+          than 4GB memory and bridges that don't support more than 4GB. 
+          Doing it properly would require to allocate GFP_DMA memory
+          in this case. */
+       low_mem_size = ((end_pfn << PAGE_SHIFT) + 0xfffff) & ~0xfffff;
+       if (low_mem_size > pci_mem_start)
+               pci_mem_start = low_mem_size;
 
 #ifdef CONFIG_GART_IOMMU
        iommu_hole_init();
index eacc7929094ad21947b0f49828a745b74c5f5513..c1700f7f30467922e2abc60858f51aa779649068 100644 (file)
@@ -734,10 +734,10 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
        current_thread_info()->cpu = 0;
        smp_tune_scheduling();
 
-       if (!cpu_isset(hard_smp_processor_id(), phys_cpu_present_map)) {
+       if (!physid_isset(hard_smp_processor_id(), phys_cpu_present_map)) {
                printk("weird, boot CPU (#%d) not listed by the BIOS.\n",
                       hard_smp_processor_id());
-               cpu_set(hard_smp_processor_id(), phys_cpu_present_map);
+               physid_set(hard_smp_processor_id(), phys_cpu_present_map);
        }
 
        /*
@@ -748,7 +748,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
                printk(KERN_NOTICE "SMP motherboard not detected.\n");
                io_apic_irqs = 0;
                cpu_online_map = cpumask_of_cpu(0);
-               phys_cpu_present_map = cpumask_of_cpu(0);
+               phys_cpu_present_map = physid_mask_of_physid(0);
                if (APIC_init_uniprocessor())
                        printk(KERN_NOTICE "Local APIC not detected."
                                           " Using dummy APIC emulation.\n");
@@ -759,10 +759,10 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
         * Should not be necessary because the MP table should list the boot
         * CPU too, but we do it for the sake of robustness anyway.
         */
-       if (!cpu_isset(boot_cpu_id, phys_cpu_present_map)) {
+       if (!physid_isset(boot_cpu_id, phys_cpu_present_map)) {
                printk(KERN_NOTICE "weird, boot CPU (#%d) not listed by the BIOS.\n",
                                                                 boot_cpu_id);
-               cpu_set(hard_smp_processor_id(), phys_cpu_present_map);
+               physid_set(hard_smp_processor_id(), phys_cpu_present_map);
        }
 
        /*
@@ -774,7 +774,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
                printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n");
                io_apic_irqs = 0;
                cpu_online_map = cpumask_of_cpu(0);
-               phys_cpu_present_map = cpumask_of_cpu(0);
+               phys_cpu_present_map = physid_mask_of_physid(0);
                disable_apic = 1;
                goto smp_done;
        }
@@ -789,7 +789,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
                printk(KERN_INFO "SMP mode deactivated, forcing use of dummy APIC emulation.\n");
                io_apic_irqs = 0;
                cpu_online_map = cpumask_of_cpu(0);
-               phys_cpu_present_map = cpumask_of_cpu(0);
+               phys_cpu_present_map = physid_mask_of_physid(0);
                disable_apic = 1;
                goto smp_done;
        }
@@ -803,7 +803,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
        /*
         * Now scan the CPU present map and fire up the other CPUs.
         */
-       Dprintk("CPU present map: %lx\n", phys_cpu_present_map);
+       Dprintk("CPU present map: %lx\n", physids_coerce(phys_cpu_present_map));
 
        for (apicid = 0; apicid < NR_CPUS; apicid++) {
                /*
index 53ab37b7d99c1d81228bc53e2997fc56c1a6afb9..92b8ffe633f62ea65702a1d1275a4b0507e582c7 100644 (file)
@@ -79,6 +79,7 @@ static inline unsigned int do_gettimeoffset_tsc(void)
        unsigned long t;
        unsigned long x;
        rdtscll_sync(&t);
+       if (t < vxtime.last_tsc) t = vxtime.last_tsc; /* hack */
        x = ((t - vxtime.last_tsc) * vxtime.tsc_quot) >> 32;
        return x;
 }
index cb52162ae495839a409d818ffedc9abb42ba4ea3..5f6640ce3f5f4c2ecac05b9a9ed4b77a77bb09d8 100644 (file)
@@ -85,6 +85,7 @@ static force_inline void do_vgettimeofday(struct timeval * tv)
                if (__vxtime.mode == VXTIME_TSC) {
                        sync_core();
                        rdtscll(t);
+                       if (t < __vxtime.last_tsc) t = __vxtime.last_tsc;
                        usec += ((t - __vxtime.last_tsc) *
                                 __vxtime.tsc_quot) >> 32;
                } else {
index 6830b9ee617428f2f6bd6a0eb325c035fea5b372..59c0a47853019f919a600af66ce3c3be8f80846e 100644 (file)
@@ -466,7 +466,7 @@ static __inline__ int ffs(int x)
 
        __asm__("bsfl %1,%0\n\t"
                "cmovzl %2,%0" 
-               : "=r" (r) : "g" (x), "r" (32));
+               : "=r" (r) : "g" (x), "r" (-1));
        return r+1;
 }
 
index bf783aa470ea8df2442d1dfd9fc64faa62e892f8..02245540c2f3b6911b755ae6f59b1863c5f6fb6f 100644 (file)
@@ -169,7 +169,6 @@ extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES];
 extern cpumask_t mp_bus_to_cpumask [MAX_MP_BUSSES];
 
 extern unsigned int boot_cpu_physical_apicid;
-extern cpumask_t phys_cpu_present_map;
 extern int smp_found_config;
 extern void find_smp_config (void);
 extern void get_smp_config (void);
@@ -198,5 +197,49 @@ extern void mp_config_ioapic_for_sci(int irq);
 
 extern int using_apic_timer;
 
+#define PHYSID_ARRAY_SIZE      BITS_TO_LONGS(MAX_APICS)
+
+struct physid_mask
+{
+       unsigned long mask[PHYSID_ARRAY_SIZE];
+};
+
+typedef struct physid_mask physid_mask_t;
+
+#define physid_set(physid, map)                        set_bit(physid, (map).mask)
+#define physid_clear(physid, map)              clear_bit(physid, (map).mask)
+#define physid_isset(physid, map)              test_bit(physid, (map).mask)
+#define physid_test_and_set(physid, map)       test_and_set_bit(physid, (map).mask)
+
+#define physids_and(dst, src1, src2)           bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_APICS)
+#define physids_or(dst, src1, src2)            bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_APICS)
+#define physids_clear(map)                     bitmap_clear((map).mask, MAX_APICS)
+#define physids_complement(map)                        bitmap_complement((map).mask, MAX_APICS)
+#define physids_empty(map)                     bitmap_empty((map).mask, MAX_APICS)
+#define physids_equal(map1, map2)              bitmap_equal((map1).mask, (map2).mask, MAX_APICS)
+#define physids_weight(map)                    bitmap_weight((map).mask, MAX_APICS)
+#define physids_shift_right(d, s, n)           bitmap_shift_right((d).mask, (s).mask, n, MAX_APICS)
+#define physids_shift_left(d, s, n)            bitmap_shift_left((d).mask, (s).mask, n, MAX_APICS)
+#define physids_coerce(map)                    ((map).mask[0])
+
+#define physids_promote(physids)                                               \
+       ({                                                                      \
+               physid_mask_t __physid_mask = PHYSID_MASK_NONE;                 \
+               __physid_mask.mask[0] = physids;                                \
+               __physid_mask;                                                  \
+       })
+
+#define physid_mask_of_physid(physid)                                          \
+       ({                                                                      \
+               physid_mask_t __physid_mask = PHYSID_MASK_NONE;                 \
+               physid_set(physid, __physid_mask);                              \
+               __physid_mask;                                                  \
+       })
+
+#define PHYSID_MASK_ALL                { {[0 ... PHYSID_ARRAY_SIZE-1] = ~0UL} }
+#define PHYSID_MASK_NONE       { {[0 ... PHYSID_ARRAY_SIZE-1] = 0UL} }
+
+extern physid_mask_t phys_cpu_present_map;
+
 #endif
 
index 832fc326fb02b72da3f9bbf258777d4d36599c21..d73be96517d4c2d6d9ac474553d3d0f585f639f1 100644 (file)
@@ -31,6 +31,9 @@ do {                                                          \
                        memcpy((pcpudst)+__per_cpu_offset(__i), \
                               (src), (size));                  \
 } while (0)
+
+extern void setup_per_cpu_areas(void);
+
 #else /* ! SMP */
 
 #define DEFINE_PER_CPU(type, name) \
@@ -46,6 +49,4 @@ do {                                                          \
 #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
 #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
 
-extern void setup_per_cpu_areas(void);
-
 #endif /* _ASM_X8664_PERCPU_H_ */
index 12714f573352324c1dcbceb945898cb156b854af..e151dbb1e704646c5139aed9f82db3c27443df56 100644 (file)
@@ -225,7 +225,6 @@ struct tss_struct {
         * 8 bytes, for an extra "long" of ~0UL
         */
        unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
-       u32 __cacheline_filler[4];      /* size is 0x100 */
 } __attribute__((packed)) ____cacheline_aligned;
 
 struct thread_struct {
index 7959579136bd41661a8e68bdcdad0f846acf9434..ba4e4ad1a1898629c754a7e42a5d9bd00e5ad8b9 100644 (file)
@@ -36,7 +36,6 @@ struct pt_regs;
  */
  
 extern void smp_alloc_memory(void);
-extern cpumask_t phys_cpu_present_map;
 extern cpumask_t cpu_online_map;
 extern volatile unsigned long smp_invalidate_needed;
 extern int pic_mode;
index 3b3f794d9cec93aad7c74c8ade9b33e637c60867..e34526cd6e9f3f6dd82f1f9c872a8ba25c16dd1d 100644 (file)
@@ -44,7 +44,7 @@ extern unsigned long saved_context_eflags;
                        :"r" ((thread)->debugreg##register))
 
 extern void fix_processor_context(void);
-extern void do_magic(int resume);
+extern int do_magic(int resume);
 
 #ifdef CONFIG_ACPI_SLEEP
 extern unsigned long saved_eip;
index c4f359c8797375914862d30f90d09c5804cfc582..d4548e5ed6dca00b6013602fe7663374dd6ba5de 100644 (file)
 /* Map the K8 CPU local memory controllers to a simple 1:1 CPU:NODE topology */
 
 extern int fake_node;
-extern cpumask_t cpu_online_map;
+extern unsigned long cpu_online_map;
 
 #define cpu_to_node(cpu)               (fake_node ? 0 : (cpu))
 #define memblk_to_node(memblk)         (fake_node ? 0 : (memblk))
 #define parent_node(node)              (node)
 #define node_to_first_cpu(node)        (fake_node ? 0 : (node))
-#define node_to_cpu_mask(node) (fake_node ? cpu_online_map : cpumask_of_cpu(node))
+#define node_to_cpu_mask(node) (fake_node ? cpu_online_map : (1UL << (node)))
 #define node_to_memblk(node)           (node)
 
-static inline cpumask_t pcibus_to_cpumask(int bus)
+static inline unsigned long pcibus_to_cpumask(int bus)
 {
-       cpumask_t ret;
-
-       cpus_and(ret, mp_bus_to_cpumask[bus], cpu_online_map);
-       return ret;
+       return mp_bus_to_cpumask[bus] & cpu_online_map; 
 }
 
 #define NODE_BALANCE_RATE 30   /* CHECKME */