1 diff -urN linux-2.6.0-orig/Makefile linux-2.6.0/Makefile
2 --- linux-2.6.0-orig/Makefile 2004-12-21 18:38:42.178680240 +0100
3 +++ linux-2.6.0/Makefile 2004-12-21 18:38:56.097564248 +0100
9 +EXTRAVERSION = -X8664-1
12 # To see a list of typical targets execute "make help"
13 diff -urN linux-2.6.0-orig/arch/x86_64/Kconfig linux-2.6.0/arch/x86_64/Kconfig
14 --- linux-2.6.0-orig/arch/x86_64/Kconfig 2004-12-21 18:38:40.601919944 +0100
15 +++ linux-2.6.0/arch/x86_64/Kconfig 2004-12-21 18:38:56.098564096 +0100
17 Normally you should say N.
20 + depends on GART_IOMMU && DEBUG_KERNEL
21 bool "Force IOMMU to on"
23 Force the IOMMU to on even when you have less than 4GB of memory and add
25 Add a simple leak tracer to the IOMMU code. This is useful when you
26 are debugging a buggy device driver that leaks IOMMU mappings.
29 - bool "K8 Machine check debugging mode"
32 - Turn on all Machine Check debugging for device driver problems.
33 - This can cause panics, but is useful to find device driver problems.
35 #config X86_REMOTE_DEBUG
36 # bool "kgdb debugging stub"
38 diff -urN linux-2.6.0-orig/arch/x86_64/defconfig linux-2.6.0/arch/x86_64/defconfig
39 --- linux-2.6.0-orig/arch/x86_64/defconfig 2004-12-21 18:38:40.601919944 +0100
40 +++ linux-2.6.0/arch/x86_64/defconfig 2004-12-21 18:39:00.826845288 +0100
43 CONFIG_X86_LOCAL_APIC=y
45 -# CONFIG_HUGETLB_PAGE is not set
47 # CONFIG_PREEMPT is not set
51 # ACPI (Advanced Configuration and Power Interface) Support
53 -# CONFIG_ACPI_HT is not set
56 +CONFIG_ACPI_INTERPRETER=y
58 CONFIG_ACPI_SLEEP_PROC_FS=y
64 -CONFIG_ACPI_INTERPRETER=y
69 +CONFIG_ACPI_RELAXED_AML=y
72 +# CPU Frequency scaling
75 +CONFIG_CPU_FREQ_PROC_INTF=y
76 +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
77 +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
78 +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
79 +CONFIG_CPU_FREQ_GOV_POWERSAVE=y
80 +CONFIG_CPU_FREQ_GOV_USERSPACE=y
81 +# CONFIG_CPU_FREQ_24_API is not set
82 +CONFIG_CPU_FREQ_TABLE=y
85 +# CPUFreq processor drivers
87 +CONFIG_X86_POWERNOW_K8=y
90 # Bus options (PCI etc.)
92 # CONFIG_SCSI_AIC79XX is not set
93 # CONFIG_SCSI_ADVANSYS is not set
94 # CONFIG_SCSI_MEGARAID is not set
95 +# CONFIG_SCSI_SATA is not set
96 # CONFIG_SCSI_BUSLOGIC is not set
97 # CONFIG_SCSI_CPQFCTS is not set
98 # CONFIG_SCSI_DMX3191D is not set
100 # CONFIG_IP_SCTP is not set
101 # CONFIG_ATM is not set
102 # CONFIG_VLAN_8021Q is not set
103 -# CONFIG_LLC is not set
104 +# CONFIG_LLC2 is not set
105 +# CONFIG_IPX is not set
106 +# CONFIG_ATALK is not set
107 # CONFIG_X25 is not set
108 # CONFIG_LAPB is not set
109 # CONFIG_NET_DIVERT is not set
111 # Ethernet (10 or 100Mbit)
113 CONFIG_NET_ETHERNET=y
114 -# CONFIG_MII is not set
116 # CONFIG_HAPPYMEAL is not set
117 # CONFIG_SUNGEM is not set
118 # CONFIG_NET_VENDOR_3COM is not set
120 # CONFIG_SIS900 is not set
121 # CONFIG_EPIC100 is not set
122 # CONFIG_SUNDANCE is not set
123 -# CONFIG_TLAN is not set
124 # CONFIG_VIA_RHINE is not set
127 @@ -421,10 +440,10 @@
128 # CONFIG_NET_RADIO is not set
131 -# Token Ring devices (depends on LLC=y)
132 +# Token Ring devices
134 +# CONFIG_TR is not set
135 # CONFIG_NET_FC is not set
136 -# CONFIG_RCPCI is not set
137 # CONFIG_SHAPER is not set
141 # CONFIG_IRDA is not set
146 +# CONFIG_BT is not set
151 # CONFIG_ISDN_BOOL is not set
153 # CONFIG_KEYBOARD_NEWTON is not set
156 +# CONFIG_MOUSE_PS2_SYNAPTICS is not set
157 # CONFIG_MOUSE_SERIAL is not set
158 # CONFIG_INPUT_JOYSTICK is not set
159 # CONFIG_INPUT_TOUCHSCREEN is not set
162 CONFIG_SERIAL_8250_CONSOLE=y
163 # CONFIG_SERIAL_8250_ACPI is not set
164 +CONFIG_SERIAL_8250_NR_UARTS=4
165 # CONFIG_SERIAL_8250_EXTENDED is not set
169 # CONFIG_I2C is not set
172 -# I2C Hardware Sensors Mainboard support
177 +# I2C Hardware Bus support
182 # CONFIG_DTLK is not set
183 # CONFIG_R3964 is not set
184 # CONFIG_APPLICOM is not set
185 -# CONFIG_SONYPI is not set
188 # Ftape, the floppy tape device driver
190 # CONFIG_DRM is not set
191 # CONFIG_MWAVE is not set
193 +CONFIG_MAX_RAW_DEVS=256
194 CONFIG_HANGCHECK_TIMER=y
197 @@ -619,10 +649,13 @@
202 # CONFIG_DEVFS_FS is not set
204 # CONFIG_DEVPTS_FS_XATTR is not set
207 +CONFIG_HUGETLB_PAGE=y
214 # CONFIG_NFS_V4 is not set
215 +# CONFIG_NFS_DIRECTIO is not set
218 # CONFIG_NFSD_V4 is not set
219 @@ -707,13 +741,15 @@
220 # CONFIG_SOUND_MAESTRO is not set
221 # CONFIG_SOUND_MAESTRO3 is not set
223 -# CONFIG_SOUND_RME96XX is not set
224 # CONFIG_SOUND_SONICVIBES is not set
225 # CONFIG_SOUND_TRIDENT is not set
226 +# CONFIG_SOUND_MSNDCLAS is not set
227 +# CONFIG_SOUND_MSNDPIN is not set
228 # CONFIG_SOUND_VIA82CXXX is not set
229 # CONFIG_SOUND_OSS is not set
230 # CONFIG_SOUND_ALI5455 is not set
231 # CONFIG_SOUND_FORTE is not set
232 +# CONFIG_SOUND_RME96XX is not set
233 # CONFIG_SOUND_AD1980 is not set
237 # CONFIG_USB_GADGET is not set
242 -# CONFIG_BT is not set
249 # CONFIG_INIT_DEBUG is not set
250 # CONFIG_DEBUG_INFO is not set
251 # CONFIG_FRAME_POINTER is not set
252 -CONFIG_IOMMU_DEBUG=y
254 +# CONFIG_IOMMU_DEBUG is not set
262 -# CONFIG_CRC32 is not set
264 diff -urN linux-2.6.0-orig/arch/x86_64/ia32/ia32_signal.c linux-2.6.0/arch/x86_64/ia32/ia32_signal.c
265 --- linux-2.6.0-orig/arch/x86_64/ia32/ia32_signal.c 2004-12-21 18:38:40.599920248 +0100
266 +++ linux-2.6.0/arch/x86_64/ia32/ia32_signal.c 2004-12-21 18:39:00.826845288 +0100
269 static int ia32_copy_siginfo_to_user(siginfo_t32 *to, siginfo_t *from)
272 if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))
274 - if (from->si_code < 0) {
275 - /* the only field that's different is the alignment
276 - of the pointer in sigval_t. Move that 4 bytes down including
278 - memmove(&((siginfo_t32 *)&from)->si_int,
280 - sizeof(siginfo_t) - offsetof(siginfo_t, si_int));
281 - /* last 4 bytes stay the same */
282 - return __copy_to_user(to, from, sizeof(siginfo_t32));
286 - /* If you change siginfo_t structure, please be sure
287 + /* If you change siginfo_t structure, please make sure that
288 this code is fixed accordingly.
289 It should never copy any pad contained in the structure
290 to avoid security leaks, but must copy the generic
291 3 ints plus the relevant union member. */
293 + if (from->si_code < 0) {
294 + err = __put_user(from->si_signo, &to->si_signo);
295 + err |= __put_user(from->si_errno, &to->si_errno);
296 + err |= __put_user(from->si_code, &to->si_code);
297 + err |= __put_user(from->_sifields._rt._pid, &to->_sifields._rt._pid);
298 + err |= __put_user(from->_sifields._rt._uid, &to->_sifields._rt._uid);
299 + err |= __put_user((u32)(u64)from->_sifields._rt._sigval.sival_ptr,
300 + &to->_sifields._rt._sigval.sival_ptr);
302 err = __put_user(from->si_signo, &to->si_signo);
303 err |= __put_user(from->si_errno, &to->si_errno);
304 err |= __put_user(from->si_code, &to->si_code);
307 /* case __SI_RT: This is not generated by the kernel as of now. */
317 unsigned int err = 0;
319 + /* Always make any pending restarted system calls return -EINTR */
320 + current_thread_info()->restart_block.fn = do_no_restart_syscall;
323 printk("SIG restore_sigcontext: sc=%p err(%x) eip(%x) cs(%x) flg(%x)\n",
324 sc, sc->err, sc->eip, sc->cs, sc->eflags);
325 diff -urN linux-2.6.0-orig/arch/x86_64/ia32/ia32entry.S linux-2.6.0/arch/x86_64/ia32/ia32entry.S
326 --- linux-2.6.0-orig/arch/x86_64/ia32/ia32entry.S 2004-12-21 18:38:40.598920400 +0100
327 +++ linux-2.6.0/arch/x86_64/ia32/ia32entry.S 2004-12-21 18:39:00.827845136 +0100
328 @@ -330,10 +330,10 @@
330 .quad sys32_mprotect /* 125 */
331 .quad compat_sys_sigprocmask
332 - .quad sys32_module_warning /* create_module */
333 + .quad quiet_ni_syscall /* create_module */
334 .quad sys_init_module
335 .quad sys_delete_module
336 - .quad sys32_module_warning /* 130 get_kernel_syms */
337 + .quad quiet_ni_syscall /* 130 get_kernel_syms */
338 .quad ni_syscall /* quotactl */
342 .quad stub32_vfork /* 190 */
343 .quad compat_sys_getrlimit
346 - .quad sys_ftruncate
347 + .quad sys32_truncate64
348 + .quad sys32_ftruncate64
349 .quad sys32_stat64 /* 195 */
352 diff -urN linux-2.6.0-orig/arch/x86_64/ia32/sys_ia32.c linux-2.6.0/arch/x86_64/ia32/sys_ia32.c
353 --- linux-2.6.0-orig/arch/x86_64/ia32/sys_ia32.c 2004-12-21 18:38:40.598920400 +0100
354 +++ linux-2.6.0/arch/x86_64/ia32/sys_ia32.c 2004-12-21 18:39:00.828844984 +0100
359 +extern long sys_truncate(char *, loff_t);
360 +extern long sys_ftruncate(int, loff_t);
363 +sys32_truncate64(char * filename, unsigned long offset_low, unsigned long offset_high)
365 + return sys_truncate(filename, ((loff_t) offset_high << 32) | offset_low);
369 +sys32_ftruncate64(unsigned int fd, unsigned long offset_low, unsigned long offset_high)
371 + return sys_ftruncate(fd, ((loff_t) offset_high << 32) | offset_low);
374 /* Another set for IA32/LFS -- x86_64 struct stat is different due to
375 support for 64bit inode numbers. */
377 @@ -1817,13 +1832,6 @@
381 -long sys32_module_warning(void)
383 - printk(KERN_INFO "%s: 32bit 2.4.x modutils not supported on 64bit kernel\n",
388 extern long sys_io_setup(unsigned nr_reqs, aio_context_t *ctx);
390 long sys32_io_setup(unsigned nr_reqs, u32 *ctx32p)
391 @@ -1989,12 +1997,16 @@
393 long sys32_vm86_warning(void)
395 + struct task_struct *me = current;
396 + static char lastcomm[8];
397 + if (strcmp(lastcomm, me->comm)) {
398 printk(KERN_INFO "%s: vm86 mode not supported on 64 bit kernel\n",
402 + strcpy(lastcomm, me->comm);
408 struct exec_domain ia32_exec_domain = {
410 .pers_low = PER_LINUX32,
411 diff -urN linux-2.6.0-orig/arch/x86_64/ia32/syscall32.c linux-2.6.0/arch/x86_64/ia32/syscall32.c
412 --- linux-2.6.0-orig/arch/x86_64/ia32/syscall32.c 2004-12-21 18:38:40.599920248 +0100
413 +++ linux-2.6.0/arch/x86_64/ia32/syscall32.c 2004-12-21 18:39:00.828844984 +0100
415 int map_syscall32(struct mm_struct *mm, unsigned long address)
421 down_read(&mm->mmap_sem);
422 spin_lock(&mm->page_table_lock);
423 - pmd_t *pmd = pmd_alloc(mm, pgd_offset(mm, address), address);
424 + pmd = pmd_alloc(mm, pgd_offset(mm, address), address);
425 if (pmd && (pte = pte_alloc_map(mm, pmd, address)) != NULL) {
426 if (pte_none(*pte)) {
428 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/Makefile linux-2.6.0/arch/x86_64/kernel/Makefile
429 --- linux-2.6.0-orig/arch/x86_64/kernel/Makefile 2004-12-21 18:38:40.594921008 +0100
430 +++ linux-2.6.0/arch/x86_64/kernel/Makefile 2004-12-21 18:39:00.829844832 +0100
432 obj-$(CONFIG_X86_IO_APIC) += io_apic.o mpparse.o
433 obj-$(CONFIG_PM) += suspend.o
434 obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend_asm.o
435 +obj-$(CONFIG_CPU_FREQ) += cpufreq/
436 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
437 obj-$(CONFIG_GART_IOMMU) += pci-gart.o aperture.o
438 obj-$(CONFIG_DUMMY_IOMMU) += pci-nommu.o pci-dma.o
440 obj-$(CONFIG_MODULES) += module.o
444 bootflag-y += ../../i386/kernel/bootflag.o
445 -cpuid-$(CONFIG_X86_CPUID) += ../../i386/kernel/cpuid.o
446 +cpuid-$(subst m,y,$(CONFIG_X86_CPUID)) += ../../i386/kernel/cpuid.o
447 +topology-y += ../../i386/mach-default/topology.o
449 -obj-$(CONFIG_CPU_FREQ) += cpufreq/
450 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/acpi/sleep.c linux-2.6.0/arch/x86_64/kernel/acpi/sleep.c
451 --- linux-2.6.0-orig/arch/x86_64/kernel/acpi/sleep.c 2004-12-21 18:38:40.589921768 +0100
452 +++ linux-2.6.0/arch/x86_64/kernel/acpi/sleep.c 2004-12-21 18:39:00.829844832 +0100
455 /* address in low memory of the wakeup routine. */
456 unsigned long acpi_wakeup_address = 0;
457 +unsigned long acpi_video_flags;
458 extern char wakeup_start, wakeup_end;
460 extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
462 printk(KERN_DEBUG "ACPI: have wakeup address 0x%8.8lx\n", acpi_wakeup_address);
465 +static int __init acpi_sleep_setup(char *str)
467 + while ((str != NULL) && (*str != '\0')) {
468 + if (strncmp(str, "s3_bios", 7) == 0)
469 + acpi_video_flags = 1;
470 + if (strncmp(str, "s3_mode", 7) == 0)
471 + acpi_video_flags |= 2;
472 + str = strchr(str, ',');
474 + str += strspn(str, ", \t");
479 +__setup("acpi_sleep=", acpi_sleep_setup);
481 #endif /*CONFIG_ACPI_SLEEP*/
483 void acpi_pci_link_exit(void) {}
484 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/acpi/wakeup.S linux-2.6.0/arch/x86_64/kernel/acpi/wakeup.S
485 --- linux-2.6.0-orig/arch/x86_64/kernel/acpi/wakeup.S 2004-12-21 18:38:40.590921616 +0100
486 +++ linux-2.6.0/arch/x86_64/kernel/acpi/wakeup.S 2004-12-21 18:39:00.829844832 +0100
488 cmpl $0x12345678, %eax
491 + testl $1, video_flags - wakeup_code
495 + movw %ax, %ds # Bios might have played with that
499 + testl $2, video_flags - wakeup_code
501 + mov video_mode - wakeup_code, %ax
511 +video_flags: .quad 0
514 movb $0xba,%al ; outb %al,$0x80
516 movl %eax, saved_efer
517 movl %edx, saved_efer2
519 -# movq saved_videomode, %rdx # FIXME: videomode
520 - movq %rdx, video_mode - wakeup_start (,%rdi)
521 + movl saved_video_mode, %edx
522 + movl %edx, video_mode - wakeup_start (,%rdi)
523 + movl acpi_video_flags, %edx
524 + movl %edx, video_flags - wakeup_start (,%rdi)
525 movq $0x12345678, real_magic - wakeup_start (,%rdi)
526 movq $0x123456789abcdef0, %rdx
527 movq %rdx, saved_magic
535 call save_processor_state
537 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/apic.c linux-2.6.0/arch/x86_64/kernel/apic.c
538 --- linux-2.6.0-orig/arch/x86_64/kernel/apic.c 2004-12-21 18:38:40.590921616 +0100
539 +++ linux-2.6.0/arch/x86_64/kernel/apic.c 2004-12-21 18:39:00.830844680 +0100
541 static DEFINE_PER_CPU(int, prof_old_multiplier) = 1;
542 static DEFINE_PER_CPU(int, prof_counter) = 1;
544 +static void apic_pm_activate(void);
546 void enable_NMI_through_LVT0 (void * dummy)
551 if (nmi_watchdog == NMI_LOCAL_APIC)
552 setup_apic_nmi_watchdog();
553 + apic_pm_activate();
559 #else /* CONFIG_PM */
561 -static inline void apic_pm_activate(void) { }
562 +static void apic_pm_activate(void) { }
564 #endif /* CONFIG_PM */
567 if (nmi_watchdog != NMI_NONE)
568 nmi_watchdog = NMI_LOCAL_APIC;
570 - apic_pm_activate();
574 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/bluesmoke.c linux-2.6.0/arch/x86_64/kernel/bluesmoke.c
575 --- linux-2.6.0-orig/arch/x86_64/kernel/bluesmoke.c 2004-12-21 18:38:40.594921008 +0100
576 +++ linux-2.6.0/arch/x86_64/kernel/bluesmoke.c 2004-12-21 18:39:00.831844528 +0100
579 static unsigned long ignored_banks, disabled_banks;
581 -/* Machine Check on everything dubious. This is a good setting
582 - for device driver testing. */
583 -#define K8_DRIVER_DEBUG ((1<<13)-1)
584 -/* Report RAM errors and Hyper Transport Problems, but ignore Device
585 - aborts and GART errors. */
586 -#define K8_NORMAL_OP 0xff
588 -#ifdef CONFIG_MCE_DEBUG
589 -static u32 k8_nb_flags __initdata = K8_DRIVER_DEBUG;
591 -static u32 k8_nb_flags __initdata = K8_NORMAL_OP;
594 static void generic_machine_check(struct pt_regs * regs, long error_code)
597 @@ -200,11 +187,14 @@
598 static void check_k8_nb(int header)
601 + u32 statuslow, statushigh;
602 + unsigned short errcode;
609 - u32 statuslow, statushigh;
610 pci_read_config_dword(nb, 0x48, &statuslow);
611 pci_read_config_dword(nb, 0x4c, &statushigh);
612 if (!(statushigh & (1<<31)))
613 @@ -215,50 +205,42 @@
614 printk(KERN_ERR "Northbridge status %08x%08x\n",
615 statushigh,statuslow);
617 - unsigned short errcode = statuslow & 0xffff;
618 - switch (errcode >> 8) {
620 + printk(KERN_ERR " Error %s\n", extendederr[(statuslow >> 16) & 0xf]);
622 + errcode = statuslow & 0xffff;
623 + switch ((statuslow >> 16) & 0xF) {
625 printk(KERN_ERR " GART TLB error %s %s\n",
626 transaction[(errcode >> 2) & 3],
627 cachelevel[errcode & 3]);
630 - if (errcode & (1<<11)) {
631 - printk(KERN_ERR " bus error %s %s %s %s %s\n",
632 - partproc[(errcode >> 10) & 0x3],
633 - timeout[(errcode >> 9) & 1],
635 + printk(KERN_ERR " ECC error syndrome %x\n",
636 + (((statuslow >> 24) & 0xff) << 8) | ((statushigh >> 15) & 0x7f));
639 + printk(KERN_ERR " bus error %s, %s\n %s\n %s, %s\n",
640 + partproc[(errcode >> 9) & 0x3],
641 + timeout[(errcode >> 8) & 1],
642 memtrans[(errcode >> 4) & 0xf],
643 memoryio[(errcode >> 2) & 0x3],
644 cachelevel[(errcode & 0x3)]);
645 - } else if (errcode & (1<<8)) {
646 - printk(KERN_ERR " memory error %s %s %s\n",
647 - memtrans[(errcode >> 4) & 0xf],
648 - transaction[(errcode >> 2) & 0x3],
649 - cachelevel[(errcode & 0x3)]);
651 - printk(KERN_ERR " unknown error code %x\n", errcode);
655 - if (statushigh & ((1<<14)|(1<<13)))
656 - printk(KERN_ERR " ECC syndrome bits %x\n",
657 - (((statuslow >> 24) & 0xff) << 8) | ((statushigh >> 15) & 0x7f));
658 - errcode = (statuslow >> 16) & 0xf;
659 - printk(KERN_ERR " extended error %s\n", extendederr[(statuslow >> 16) & 0xf]);
661 /* should only print when it was a HyperTransport related error. */
662 printk(KERN_ERR " link number %x\n", (statushigh >> 4) & 3);
667 - for (i = 0; i < 32; i++)
668 + for (i = 0; i < 32; i++) {
669 + if (i == 26 || i == 28)
671 if (highbits[i] && (statushigh & (1<<i)))
672 printk(KERN_ERR " %s\n", highbits[i]);
675 if (statushigh & (1<<26)) {
676 u32 addrhigh, addrlow;
677 pci_read_config_dword(nb, 0x54, &addrhigh);
678 pci_read_config_dword(nb, 0x50, &addrlow);
679 - printk(KERN_ERR " error address %08x%08x\n", addrhigh,addrlow);
680 + printk(KERN_ERR " NB error address %08x%08x\n", addrhigh,addrlow);
682 statushigh &= ~(1<<31);
683 pci_write_config_dword(nb, 0x4c, statushigh);
685 wrmsrl(MSR_IA32_MC0_STATUS+4*4, 0);
686 wrmsrl(MSR_IA32_MCG_STATUS, 0);
688 - if (regs && (status & (1<<1)))
689 - printk(KERN_EMERG "MCE at RIP %lx RSP %lx\n", regs->rip, regs->rsp);
692 generic_machine_check(regs, error_code);
694 @@ -367,12 +346,13 @@
695 machine_check_vector = k8_machine_check;
696 for (i = 0; i < banks; i++) {
697 u64 val = ((1UL<<i) & disabled_banks) ? 0 : ~0UL;
700 wrmsrl(MSR_IA32_MC0_CTL+4*i, val);
701 wrmsrl(MSR_IA32_MC0_STATUS+4*i,0);
705 + wrmsrl(MSR_IA32_MCG_CTL, 0xffffffffffffffffULL);
707 set_in_cr4(X86_CR4_MCE);
709 if (mcheck_interval && (smp_processor_id() == 0)) {
711 mce=nok8 disable k8 specific features
712 mce=disable<NUMBER> disable bank NUMBER
713 mce=enable<NUMBER> enable bank number
714 - mce=device Enable device driver test reporting in NB
715 mce=NUMBER mcheck timer interval number seconds.
716 Can be also comma separated in a single mce= */
717 static int __init mcheck_enable(char *str)
719 disabled_banks |= ~(1<<simple_strtol(p+7,NULL,0));
720 else if (!strcmp(p,"nok8"))
722 - else if (!strcmp(p,"device"))
723 - k8_nb_flags = K8_DRIVER_DEBUG;
727 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/e820.c linux-2.6.0/arch/x86_64/kernel/e820.c
728 --- linux-2.6.0-orig/arch/x86_64/kernel/e820.c 2004-12-21 18:38:40.591921464 +0100
729 +++ linux-2.6.0/arch/x86_64/kernel/e820.c 2004-12-21 18:39:00.831844528 +0100
731 * Handle the memory map.
732 * The functions here do the job until bootmem takes over.
735 - * AK: some of these functions are not used in 2.5 yet but they will be when
736 - * NUMA is completely merged.
739 #include <linux/config.h>
740 #include <linux/kernel.h>
741 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/head.S linux-2.6.0/arch/x86_64/kernel/head.S
742 --- linux-2.6.0-orig/arch/x86_64/kernel/head.S 2004-12-21 18:38:40.593921160 +0100
743 +++ linux-2.6.0/arch/x86_64/kernel/head.S 2004-12-21 18:39:00.832844376 +0100
746 movl %ebx,%ebp /* Save trampoline flag */
748 + movl $__KERNEL_DS,%eax
751 /* If the CPU doesn't support CPUID this will double fault.
752 * Unfortunately it is hard to check for CPUID without a stack.
754 @@ -114,25 +117,11 @@
755 movl $(pGDT32 - __START_KERNEL_map), %eax
759 movl $(ljumpvector - __START_KERNEL_map), %eax
760 /* Finally jump in 64bit mode */
764 - /* abuse syscall to get into 64bit mode. this way we don't need
765 - a working low identity mapping just for the short 32bit roundtrip.
766 - XXX kludge. this should not be needed. */
767 - movl $MSR_STAR,%ecx
769 - movl $(__USER32_CS<<16)|__KERNEL_CS,%edx
772 - movl $MSR_CSTAR,%ecx
773 - movl $0xffffffff,%edx
774 - movl $0x80100100,%eax # reach_long64 absolute
781 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/io_apic.c linux-2.6.0/arch/x86_64/kernel/io_apic.c
782 --- linux-2.6.0-orig/arch/x86_64/kernel/io_apic.c 2004-12-21 18:38:40.593921160 +0100
783 +++ linux-2.6.0/arch/x86_64/kernel/io_apic.c 2004-12-21 18:39:00.833844224 +0100
785 struct IO_APIC_route_entry entry;
788 + /* Check delivery_mode to be sure we're not clearing an SMI pin */
789 + spin_lock_irqsave(&ioapic_lock, flags);
790 + *(((int*)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * pin);
791 + *(((int*)&entry) + 1) = io_apic_read(apic, 0x11 + 2 * pin);
792 + spin_unlock_irqrestore(&ioapic_lock, flags);
793 + if (entry.delivery_mode == dest_SMI)
796 * Disable it in the IO-APIC irq-routing table:
798 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/mpparse.c linux-2.6.0/arch/x86_64/kernel/mpparse.c
799 --- linux-2.6.0-orig/arch/x86_64/kernel/mpparse.c 2004-12-21 18:38:40.591921464 +0100
800 +++ linux-2.6.0/arch/x86_64/kernel/mpparse.c 2004-12-21 18:39:00.833844224 +0100
802 unsigned char *mpt=((unsigned char *)mpc)+count;
804 if (memcmp(mpc->mpc_signature,MPC_SIGNATURE,4)) {
805 - panic("SMP mptable: bad signature [%c%c%c%c]!\n",
806 + printk("SMP mptable: bad signature [%c%c%c%c]!\n",
807 mpc->mpc_signature[0],
808 mpc->mpc_signature[1],
809 mpc->mpc_signature[2],
813 if (mpf_checksum((unsigned char *)mpc,mpc->mpc_length)) {
814 - panic("SMP mptable: checksum error!\n");
815 + printk("SMP mptable: checksum error!\n");
818 if (mpc->mpc_spec!=0x01 && mpc->mpc_spec!=0x04) {
819 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/pci-gart.c linux-2.6.0/arch/x86_64/kernel/pci-gart.c
820 --- linux-2.6.0-orig/arch/x86_64/kernel/pci-gart.c 2004-12-21 18:38:40.592921312 +0100
821 +++ linux-2.6.0/arch/x86_64/kernel/pci-gart.c 2004-12-21 18:39:00.834844072 +0100
823 #include <asm/kdebug.h>
824 #include <asm/proto.h>
826 +/* Workarounds for specific drivers */
827 +#define FUSION_WORKAROUND 1
828 +#define FLUSH_WORKAROUND 1
830 dma_addr_t bad_dma_address;
832 unsigned long iommu_bus_base; /* GART remapping area (physical) */
834 #ifdef CONFIG_IOMMU_DEBUG
835 int panic_on_overflow = 1;
837 -int sac_force_size = 0;
839 -int panic_on_overflow = 1; /* for testing */
840 +int panic_on_overflow = 0;
842 -int sac_force_size = 256*1024*1024;
844 +int iommu_merge = 0;
845 +int iommu_sac_force = 0;
846 +int iommu_fullflush = 0;
848 /* Allocation bitmap for the remapping area */
849 static spinlock_t iommu_bitmap_lock = SPIN_LOCK_UNLOCKED;
852 * Use global flush state to avoid races with multiple flushers.
854 -static void __flush_gart(struct pci_dev *dev)
855 +static void flush_gart(struct pci_dev *dev)
858 int bus = dev ? dev->bus->number : -1;
859 @@ -134,13 +139,17 @@
862 spin_lock_irqsave(&iommu_bitmap_lock, flags);
863 - /* recheck flush count inside lock */
865 + if (need_flush || iommu_fullflush) {
866 for (i = 0; northbridges[i]; i++) {
868 if (bus >= 0 && !(cpu_isset_const(i, bus_cpumask)))
870 pci_write_config_dword(northbridges[i], 0x9c,
871 northbridge_flush_word[i] | 1);
872 + /* Make sure the hardware actually executed the flush. */
874 + pci_read_config_dword(northbridges[i], 0x9c, &w);
880 spin_unlock_irqrestore(&iommu_bitmap_lock, flags);
883 -static inline void flush_gart(struct pci_dev *dev)
890 * Allocate memory for a consistent mapping.
891 * All mappings are consistent here, so this is just a wrapper around
892 @@ -174,11 +177,16 @@
894 dma_mask = hwdev->consistent_dma_mask;
898 dma_mask = 0xffffffff;
899 if (dma_mask < 0xffffffff || no_iommu)
902 + /* Kludge to make it bug-to-bug compatible with i386. i386
903 + uses the normal dma_mask for alloc_consistent. */
904 + dma_mask &= hwdev->dma_mask;
906 memory = (void *)__get_free_pages(gfp, get_order(size));
907 if (memory == NULL) {
911 for (i = start; i < stopat; i++) {
912 struct scatterlist *s = &sg[i];
913 - unsigned long start_addr = s->dma_address;
914 + unsigned long pages, addr;
915 + unsigned long phys_addr = s->dma_address;
917 BUG_ON(i > start && s->offset);
922 sout->length += s->length;
924 - unsigned long addr = start_addr;
925 - while (addr < start_addr + s->length) {
928 + pages = to_pages(s->offset, s->length);
930 iommu_gatt_base[iommu_page] = GPTE_ENCODE(addr);
931 SET_LEAK(iommu_page);
936 unsigned long pages = 0;
938 + int need = 0, nextneed;
940 unsigned long size = 0;
942 @@ -453,13 +465,14 @@
943 BUG_ON(s->length == 0);
946 + nextneed = need_iommu(dev, addr, s->length);
948 /* Handle the previous not yet processed entries */
950 struct scatterlist *ps = &sg[i-1];
951 /* Can only merge when the last chunk ends on a page
953 - if (!force_iommu || !need || (i-1 > start && ps->offset) ||
954 + boundary and the new one doesn't have an offset. */
955 + if (!iommu_merge || !nextneed || !need || s->offset ||
956 (ps->offset + ps->length) % PAGE_SIZE) {
957 if (pci_map_cont(sg, start, i, sg+out, pages,
963 - need = need_iommu(dev, addr, s->length);
965 pages += to_pages(s->offset, s->length);
967 if (pci_map_cont(sg, start, i, sg+out, pages, need) < 0)
968 @@ -539,19 +552,30 @@
969 if (mask < 0x00ffffff)
972 +#ifdef FUSION_WORKAROUND
973 + if (dev->vendor == PCI_VENDOR_ID_LSI_LOGIC && mask > 0xffffffff) {
979 +#ifdef FLUSH_WORKAROUND
980 + if ((dev->vendor == PCI_VENDOR_ID_3WARE && mask <= 0xffffffff) ||
981 + (dev->vendor == PCI_VENDOR_ID_QLOGIC && force_iommu))
982 + iommu_fullflush = 1;
985 /* Tell the device to use SAC when IOMMU force is on.
986 This allows the driver to use cheaper accesses in some cases.
988 Problem with this is that if we overflow the IOMMU area
989 and return DAC as fallback address the device may not handle it correctly.
990 - As a compromise we only do this if the IOMMU area is >= 256MB
991 - which should make overflow unlikely enough.
993 As a special case some controllers have a 39bit address mode
994 that is as efficient as 32bit (aic79xx). Don't force SAC for these.
995 Assume all masks <= 40 bits are of this type. Normally this doesn't
996 make any difference, but gives more gentle handling of IOMMU overflow. */
997 - if (force_iommu && (mask > 0xffffffffffULL) && (iommu_size >= sac_force_size)){
998 + if (iommu_sac_force && (mask >= 0xffffffffffULL)) {
999 printk(KERN_INFO "%s: Force SAC with mask %Lx\n", dev->slot_name,mask);
1003 unsigned long iommu_start;
1004 struct pci_dev *dev;
1006 -#ifndef CONFIG_AGP_AMD_8151
1007 +#ifndef CONFIG_AGP_AMD64
1010 /* Makefile puts PCI initialization via subsys_initcall first. */
1012 /* Must execute after PCI subsystem */
1013 fs_initcall(pci_iommu_init);
1015 -/* iommu=[size][,noagp][,off][,force][,noforce][,leak][,memaper[=order]]
1016 +/* iommu=[size][,noagp][,off][,force][,noforce][,leak][,memaper[=order]][,merge]
1017 + [,forcesac][,fullflush][,nomerge]
1018 size set size of iommu (in bytes)
1019 noagp don't initialize the AGP driver and use full aperture.
1020 off don't use the IOMMU
1021 @@ -784,6 +809,10 @@
1022 memaper[=order] allocate an own aperture over RAM with size 32MB^order.
1023 noforce don't force IOMMU usage. Default.
1025 + merge Do SG merging. Implies force (experimental)
1026 + nomerge Don't do SG merging.
1027 + forcesac For SAC mode for masks <40bits (experimental)
1028 + fullflush Flush IOMMU on each allocation (for testing)
1030 __init int iommu_setup(char *opt)
1032 @@ -797,8 +826,10 @@
1034 if (!memcmp(p,"force", 5))
1036 - if (!memcmp(p,"noforce", 7))
1037 + if (!memcmp(p,"noforce", 7)) {
1041 if (!memcmp(p, "memaper", 7)) {
1042 fallback_aper_force = 1;
1044 @@ -809,6 +840,16 @@
1045 panic_on_overflow = 1;
1046 if (!memcmp(p, "nopanic", 7))
1047 panic_on_overflow = 0;
1048 + if (!memcmp(p, "merge", 5)) {
1052 + if (!memcmp(p, "nomerge", 7))
1054 + if (!memcmp(p, "forcesac", 8))
1055 + iommu_sac_force = 1;
1056 + if (!memcmp(p, "fullflush", 9))
1057 + iommu_fullflush = 1;
1058 #ifdef CONFIG_IOMMU_LEAK
1059 if (!memcmp(p,"leak", 4)) {
1061 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/pci-nommu.c linux-2.6.0/arch/x86_64/kernel/pci-nommu.c
1062 --- linux-2.6.0-orig/arch/x86_64/kernel/pci-nommu.c 2004-12-21 18:38:40.589921768 +0100
1063 +++ linux-2.6.0/arch/x86_64/kernel/pci-nommu.c 2004-12-21 18:39:00.835843920 +0100
1065 #include <linux/string.h>
1066 #include <asm/proto.h>
1068 +int iommu_merge = 0;
1071 * Dummy IO MMU functions
1073 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/process.c linux-2.6.0/arch/x86_64/kernel/process.c
1074 --- linux-2.6.0-orig/arch/x86_64/kernel/process.c 2004-12-21 18:38:40.593921160 +0100
1075 +++ linux-2.6.0/arch/x86_64/kernel/process.c 2004-12-21 18:39:00.835843920 +0100
1076 @@ -152,6 +152,19 @@
1078 __setup("idle=", idle_setup);
1080 +void idle_warning(void)
1082 + static int warned;
1086 + if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
1088 + printk(KERN_ERR "******* Your BIOS seems to not contain a fix for K8 errata #93\n");
1089 + printk(KERN_ERR "******* Working around it, but it will cost you a lot of power\n");
1090 + printk(KERN_ERR "******* Please consider a BIOS update.\n");
1091 + printk(KERN_ERR "******* Disabling USB legacy in the BIOS may also help.\n");
1094 /* Prints also some state that isn't saved in the pt_regs */
1095 void __show_regs(struct pt_regs * regs)
1096 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/setup.c linux-2.6.0/arch/x86_64/kernel/setup.c
1097 --- linux-2.6.0-orig/arch/x86_64/kernel/setup.c 2004-12-21 18:38:40.589921768 +0100
1098 +++ linux-2.6.0/arch/x86_64/kernel/setup.c 2004-12-21 18:39:00.836843768 +0100
1103 + if (!memcmp(from,"oops=panic", 10))
1104 + panic_on_oops = 1;
1110 void __init setup_arch(char **cmdline_p)
1112 unsigned long low_mem_size;
1113 + unsigned long kernel_end;
1115 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
1116 drive_info = DRIVE_INFO;
1118 (table_end - table_start) << PAGE_SHIFT);
1120 /* reserve kernel */
1121 - unsigned long kernel_end;
1122 kernel_end = round_up(__pa_symbol(&_end),PAGE_SIZE);
1123 reserve_bootmem_generic(HIGH_MEMORY, kernel_end - HIGH_MEMORY);
1125 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/signal.c linux-2.6.0/arch/x86_64/kernel/signal.c
1126 --- linux-2.6.0-orig/arch/x86_64/kernel/signal.c 2004-12-21 18:38:40.593921160 +0100
1127 +++ linux-2.6.0/arch/x86_64/kernel/signal.c 2004-12-21 18:39:00.836843768 +0100
1130 unsigned int err = 0;
1132 + /* Always make any pending restarted system calls return -EINTR */
1133 + current_thread_info()->restart_block.fn = do_no_restart_syscall;
1135 #define COPY(x) err |= __get_user(regs->x, &sc->x)
1138 /* If so, check system call restarting.. */
1139 switch (regs->rax) {
1140 case -ERESTART_RESTARTBLOCK:
1141 - current_thread_info()->restart_block.fn = do_no_restart_syscall;
1142 - /* FALL THROUGH */
1143 case -ERESTARTNOHAND:
1146 @@ -371,10 +371,6 @@
1147 regs->rax = regs->orig_rax;
1150 - if (regs->rax == (unsigned long)-ERESTART_RESTARTBLOCK){
1151 - regs->rax = __NR_restart_syscall;
1156 #ifdef CONFIG_IA32_EMULATION
1157 @@ -453,6 +449,10 @@
1158 regs->rax = regs->orig_rax;
1161 + if (regs->rax == (unsigned long)-ERESTART_RESTARTBLOCK) {
1162 + regs->rax = __NR_restart_syscall;
1168 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/smpboot.c linux-2.6.0/arch/x86_64/kernel/smpboot.c
1169 --- linux-2.6.0-orig/arch/x86_64/kernel/smpboot.c 2004-12-21 18:38:40.595920856 +0100
1170 +++ linux-2.6.0/arch/x86_64/kernel/smpboot.c 2004-12-21 18:39:00.837843616 +0100
1172 #include <asm/proto.h>
1174 /* Bitmask of currently online CPUs */
1175 -cpumask_t cpu_online_map;
1176 +cpumask_t cpu_online_map = { 1 };
1178 static cpumask_t cpu_callin_map;
1179 cpumask_t cpu_callout_map;
1180 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/time.c linux-2.6.0/arch/x86_64/kernel/time.c
1181 --- linux-2.6.0-orig/arch/x86_64/kernel/time.c 2004-12-21 18:38:40.593921160 +0100
1182 +++ linux-2.6.0/arch/x86_64/kernel/time.c 2004-12-21 18:39:00.837843616 +0100
1183 @@ -111,13 +111,21 @@
1185 usec = xtime.tv_nsec / 1000;
1189 * If time_adjust is negative then NTP is slowing the clock
1190 * so make sure not to go into next possible interval.
1191 * Better to lose some accuracy than have time go backwards..
1193 - if (unlikely(time_adjust < 0) && usec > tickadj)
1195 + unsigned long lost = jiffies - wall_jiffies;
1196 + if (unlikely(time_adjust < 0)) {
1197 + unsigned long max_ntp_tick = tick_usec - tickadj;
1198 + usec = min_t(unsigned, usec, max_ntp_tick);
1200 + usec += lost * max_ntp_tick;
1201 + } else if (unlikely(lost))
1202 + usec += lost * tick_usec;
1205 t = (jiffies - wall_jiffies) * (1000000L / HZ) +
1208 if (!vxtime.hpet_address)
1210 set_fixmap_nocache(FIX_HPET_BASE, vxtime.hpet_address);
1211 + __set_fixmap(VSYSCALL_HPET, vxtime.hpet_address, PAGE_KERNEL_VSYSCALL_NOCACHE);
1214 * Read the period, compute tick and quotient.
1215 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/traps.c linux-2.6.0/arch/x86_64/kernel/traps.c
1216 --- linux-2.6.0-orig/arch/x86_64/kernel/traps.c 2004-12-21 18:38:40.589921768 +0100
1217 +++ linux-2.6.0/arch/x86_64/kernel/traps.c 2004-12-21 18:39:00.838843464 +0100
1218 @@ -218,8 +218,12 @@
1219 // debugging aid: "show_stack(NULL, NULL);" prints the
1220 // back trace for this cpu.
1223 - rsp=(unsigned long*)&rsp;
1224 + if (rsp == NULL) {
1226 + rsp = (unsigned long *)tsk->thread.rsp;
1228 + rsp = (unsigned long *)&rsp;
1232 for(i=0; i < kstack_depth_to_print; i++) {
1235 spin_unlock(&die_lock);
1236 local_irq_enable(); /* make sure back scroll still works */
1237 + if (panic_on_oops)
1241 void __die(const char * str, struct pt_regs * regs, long err)
1242 @@ -844,3 +850,11 @@
1247 +/* Actual parsing is done early in setup.c. */
1248 +static int __init oops_dummy(char *s)
1250 + panic_on_oops = 1;
1253 +__setup("oops=", oops_dummy);
1254 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/vmlinux.lds.S linux-2.6.0/arch/x86_64/kernel/vmlinux.lds.S
1255 --- linux-2.6.0-orig/arch/x86_64/kernel/vmlinux.lds.S 2004-12-21 18:38:40.589921768 +0100
1256 +++ linux-2.6.0/arch/x86_64/kernel/vmlinux.lds.S 2004-12-21 18:39:00.838843464 +0100
1258 .sysctl_vsyscall : AT ((LOADADDR(.sys_tz) + SIZEOF(.sys_tz) + 15) & ~(15)) { *(.sysctl_vsyscall) }
1259 sysctl_vsyscall = LOADADDR(.sysctl_vsyscall);
1261 - .jiffies : AT ((LOADADDR(.sysctl_vsyscall) + SIZEOF(.sysctl_vsyscall) + 15) & ~(15)) { *(.jiffies) }
1262 + .time_adjust : AT ((LOADADDR(.sysctl_vsyscall) + SIZEOF(.sysctl_vsyscall) + 16) & ~(15)) { *(.time_adjust) }
1263 + time_adjust = LOADADDR(.time_adjust);
1265 + .tick_usec : AT ((LOADADDR(.time_adjust) + SIZEOF(.time_adjust) + 16) & ~(15)) { *(.tick_usec) }
1266 + tick_usec = LOADADDR(.tick_usec);
1268 + .jiffies : AT ((LOADADDR(.tick_usec) + SIZEOF(.tick_usec) + 16) & ~(15)) { *(.jiffies) }
1269 jiffies = LOADADDR(.jiffies);
1271 .xtime : AT ((LOADADDR(.jiffies) + SIZEOF(.jiffies) + 15) & ~(15)) { *(.xtime) }
1272 diff -urN linux-2.6.0-orig/arch/x86_64/kernel/vsyscall.c linux-2.6.0/arch/x86_64/kernel/vsyscall.c
1273 --- linux-2.6.0-orig/arch/x86_64/kernel/vsyscall.c 2004-12-21 18:38:40.594921008 +0100
1274 +++ linux-2.6.0/arch/x86_64/kernel/vsyscall.c 2004-12-21 18:39:00.839843312 +0100
1276 #include <asm/page.h>
1277 #include <asm/fixmap.h>
1278 #include <asm/errno.h>
1279 +#include <asm/io.h>
1281 #define __vsyscall(nr) __attribute__ ((unused,__section__(".vsyscall_" #nr)))
1282 #define force_inline __attribute__((always_inline)) inline
1284 int __sysctl_vsyscall __section_sysctl_vsyscall = 1;
1285 seqlock_t __xtime_lock __section_xtime_lock = SEQLOCK_UNLOCKED;
1286 +long __time_adjust __section_time_adjust;
1287 +long __tick_usec __section_tick_usec;
1289 #include <asm/unistd.h>
1292 usec = (__xtime.tv_nsec / 1000) +
1293 (__jiffies - __wall_jiffies) * (1000000 / HZ);
1297 + * If time_adjust is negative then NTP is slowing the clock
1298 + * so make sure not to go into next possible interval.
1299 + * Better to lose some accuracy than have time go backwards..
1301 + unsigned long lost = __jiffies - __wall_jiffies;
1302 + if (unlikely(__time_adjust < 0)) {
1303 + unsigned long max_ntp_tick = __tick_usec - tickadj;
1304 + usec = min(usec, max_ntp_tick);
1306 + usec += lost * max_ntp_tick;
1307 + } else if (unlikely(lost))
1308 + usec += lost * __tick_usec;
1311 if (__vxtime.mode == VXTIME_TSC) {
1315 usec += ((t - __vxtime.last_tsc) *
1316 __vxtime.tsc_quot) >> 32;
1319 usec += ((readl(fix_to_virt(VSYSCALL_HPET) + 0xf0) -
1320 __vxtime.last) * __vxtime.quot) >> 32;
1323 } while (read_seqretry(&__xtime_lock, sequence));
1325 diff -urN linux-2.6.0-orig/arch/x86_64/mm/fault.c linux-2.6.0/arch/x86_64/mm/fault.c
1326 --- linux-2.6.0-orig/arch/x86_64/mm/fault.c 2004-12-21 18:38:40.596920704 +0100
1327 +++ linux-2.6.0/arch/x86_64/mm/fault.c 2004-12-21 18:39:00.839843312 +0100
1329 if (regs->cs & (1<<2))
1332 + if ((regs->cs & 3) != 0 && regs->rip >= TASK_SIZE)
1335 while (scan_more && instr < max_instr) {
1336 unsigned char opcode;
1337 unsigned char instr_hi;
1341 tsk->thread.cr2 = address;
1342 - tsk->thread.error_code = error_code;
1343 + /* Kernel addresses are always protection faults */
1344 + tsk->thread.error_code = error_code | (address >= TASK_SIZE);
1345 tsk->thread.trap_no = 14;
1346 info.si_signo = SIGSEGV;
1349 printk_address(regs->rip);
1350 dump_pagetable(address);
1351 __die("Oops", regs, error_code);
1352 - /* Execute summary in case the body of the oops scrolled away */
1353 + /* Executive summary in case the body of the oops scrolled away */
1354 printk(KERN_EMERG "CR2: %016lx\n", address);
1357 diff -urN linux-2.6.0-orig/drivers/block/paride/Kconfig linux-2.6.0/drivers/block/paride/Kconfig
1358 --- linux-2.6.0-orig/drivers/block/paride/Kconfig 2004-12-21 18:38:39.737051424 +0100
1359 +++ linux-2.6.0/drivers/block/paride/Kconfig 2004-12-21 18:39:00.840843160 +0100
1363 tristate "MicroSolutions backpack (Series 6) protocol"
1365 + depends on PARIDE && !64BIT
1367 This option enables support for the Micro Solutions BACKPACK
1368 parallel port Series 6 IDE protocol. (Most BACKPACK drives made
1369 diff -urN linux-2.6.0-orig/drivers/char/agp/amd64-agp.c linux-2.6.0/drivers/char/agp/amd64-agp.c
1370 --- linux-2.6.0-orig/drivers/char/agp/amd64-agp.c 2004-12-21 18:38:39.505086688 +0100
1371 +++ linux-2.6.0/drivers/char/agp/amd64-agp.c 2004-12-21 18:39:00.841843008 +0100
1375 /* Will need to be increased if AMD64 ever goes >8-way. */
1377 #define MAX_HAMMER_GARTS 8
1379 -#define MAX_HAMMER_GARTS 1
1383 #define GPTE_VALID 1
1385 #define INVGART (1<<0)
1386 #define GARTPTEERR (1<<1)
1388 +/* NVIDIA K8 registers */
1389 +#define NVIDIA_X86_64_0_APBASE 0x10
1390 +#define NVIDIA_X86_64_1_APBASE1 0x50
1391 +#define NVIDIA_X86_64_1_APLIMIT1 0x54
1392 +#define NVIDIA_X86_64_1_APSIZE 0xa8
1393 +#define NVIDIA_X86_64_1_APBASE2 0xd8
1394 +#define NVIDIA_X86_64_1_APLIMIT2 0xdc
1396 static int nr_garts;
1397 static struct pci_dev * hammers[MAX_HAMMER_GARTS];
1399 +static struct resource *aperture_resource;
1400 static int __initdata agp_try_unsupported;
1402 static int gart_iterator;
1404 /* Some basic sanity checks for the aperture. */
1405 static int __devinit aperture_valid(u64 aper, u32 size)
1407 - static int not_first_call;
1410 printk(KERN_ERR PFX "No aperture\n");
1411 @@ -279,12 +283,11 @@
1413 Maybe better to use pci_assign_resource/pci_enable_device instead trusting
1415 - if (!not_first_call && request_mem_region(aper, size, "aperture") < 0) {
1416 + if (!aperture_resource &&
1417 + !(aperture_resource = request_mem_region(aper, size, "aperture"))) {
1418 printk(KERN_ERR PFX "Aperture conflicts with PCI mapping.\n");
1422 - not_first_call = 1;
1426 @@ -347,31 +350,124 @@
1427 /* cache pci_devs of northbridges. */
1428 while ((loop_dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev))
1430 + if (i == MAX_HAMMER_GARTS) {
1431 + printk(KERN_ERR PFX "Too many northbridges for AGP\n");
1434 if (fix_northbridge(loop_dev, pdev, cap_ptr) < 0) {
1435 - printk(KERN_INFO PFX "No usable aperture found.\n");
1436 + printk(KERN_ERR PFX "No usable aperture found.\n");
1438 /* should port this to i386 */
1439 - printk(KERN_INFO PFX "Consider rebooting with iommu=memaper=2 to get a good aperture.\n");
1440 + printk(KERN_ERR PFX "Consider rebooting with iommu=memaper=2 to get a good aperture.\n");
1444 hammers[i++] = loop_dev;
1447 - if (i == MAX_HAMMER_GARTS) {
1448 - printk(KERN_INFO PFX "Too many northbridges for AGP\n");
1450 + return i == 0 ? -1 : 0;
1453 +/* Handle AMD 8151 quirks */
1454 +static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data *bridge)
1460 + pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id);
1462 + case 0x01: revstring="A0"; break;
1463 + case 0x02: revstring="A1"; break;
1464 + case 0x11: revstring="B0"; break;
1465 + case 0x12: revstring="B1"; break;
1466 + case 0x13: revstring="B2"; break;
1467 + default: revstring="??"; break;
1470 + printk (KERN_INFO PFX "Detected AMD 8151 AGP Bridge rev %s\n", revstring);
1473 + * Work around errata.
1474 + * Chips before B2 stepping incorrectly reporting v3.5
1476 + if (rev_id < 0x13) {
1477 + printk (KERN_INFO PFX "Correcting AGP revision (reports 3.5, is really 3.0)\n");
1478 + bridge->major_version = 3;
1479 + bridge->minor_version = 0;
1481 - return i == 0 ? -1 : 0;
1484 +static struct aper_size_info_32 nforce3_sizes[5] =
1486 + {512, 131072, 7, 0x00000000 },
1487 + {256, 65536, 6, 0x00000008 },
1488 + {128, 32768, 5, 0x0000000C },
1489 + {64, 16384, 4, 0x0000000E },
1490 + {32, 8192, 3, 0x0000000F }
1493 +/* Handle shadow device of the Nvidia NForce3 */
1494 +/* CHECK-ME original 2.4 version set up some IORRs. Check if that is needed. */
1495 +static int __devinit nforce3_agp_init(struct pci_dev *pdev)
1497 + u32 tmp, apbase, apbar, aplimit;
1498 + struct pci_dev *dev1;
1500 + unsigned size = amd64_fetch_size();
1502 + printk(KERN_INFO PFX "Setting up Nforce3 AGP.\n");
1504 + dev1 = pci_find_slot((unsigned int)pdev->bus->number, PCI_DEVFN(11, 0));
1505 + if (dev1 == NULL) {
1506 + printk(KERN_INFO PFX "agpgart: Detected an NVIDIA "
1507 + "nForce3 chipset, but could not find "
1508 + "the secondary device.\n");
1512 + for (i = 0; i < ARRAY_SIZE(nforce3_sizes); i++)
1513 + if (nforce3_sizes[i].size == size)
1516 + if (i == ARRAY_SIZE(nforce3_sizes)) {
1517 + printk(KERN_INFO PFX "No NForce3 size found for %d\n", size);
1521 + pci_read_config_dword(dev1, NVIDIA_X86_64_1_APSIZE, &tmp);
1523 + tmp |= nforce3_sizes[i].size_value;
1524 + pci_write_config_dword(dev1, NVIDIA_X86_64_1_APSIZE, tmp);
1526 + /* shadow x86-64 registers into NVIDIA registers */
1527 + pci_read_config_dword (hammers[0], AMD64_GARTAPERTUREBASE, &apbase);
1529 + /* if x86-64 aperture base is beyond 4G, exit here */
1530 + if ( (apbase & 0x7fff) >> (32 - 25) )
1533 + apbase = (apbase & 0x7fff) << 25;
1535 + pci_read_config_dword(pdev, NVIDIA_X86_64_0_APBASE, &apbar);
1536 + apbar &= ~PCI_BASE_ADDRESS_MEM_MASK;
1538 + pci_write_config_dword(pdev, NVIDIA_X86_64_0_APBASE, apbar);
1540 + aplimit = apbase + (size * 1024 * 1024) - 1;
1541 + pci_write_config_dword(dev1, NVIDIA_X86_64_1_APBASE1, apbase);
1542 + pci_write_config_dword(dev1, NVIDIA_X86_64_1_APLIMIT1, aplimit);
1543 + pci_write_config_dword(dev1, NVIDIA_X86_64_1_APBASE2, apbase);
1544 + pci_write_config_dword(dev1, NVIDIA_X86_64_1_APLIMIT2, aplimit);
1549 static int __devinit agp_amd64_probe(struct pci_dev *pdev,
1550 const struct pci_device_id *ent)
1552 struct agp_bridge_data *bridge;
1555 - char *revstring=NULL;
1557 cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
1559 @@ -385,32 +481,7 @@
1561 if (pdev->vendor == PCI_VENDOR_ID_AMD &&
1562 pdev->device == PCI_DEVICE_ID_AMD_8151_0) {
1564 - pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id);
1566 - case 0x01: revstring="A0";
1568 - case 0x02: revstring="A1";
1570 - case 0x11: revstring="B0";
1572 - case 0x12: revstring="B1";
1574 - case 0x13: revstring="B2";
1576 - default: revstring="??";
1579 - printk (KERN_INFO PFX "Detected AMD 8151 AGP Bridge rev %s\n", revstring);
1581 - * Work around errata.
1582 - * Chips before B2 stepping incorrectly reporting v3.5
1584 - if (rev_id < 0x13) {
1585 - printk (KERN_INFO PFX "Correcting AGP revision (reports 3.5, is really 3.0)\n");
1586 - bridge->major_version = 3;
1587 - bridge->minor_version = 0;
1589 + amd8151_init(pdev, bridge);
1591 printk(KERN_INFO PFX "Detected AGP bridge %x\n",
1593 @@ -428,6 +499,14 @@
1597 + if (pdev->vendor == PCI_VENDOR_ID_NVIDIA) {
1598 + int ret = nforce3_agp_init(pdev);
1600 + agp_put_bridge(bridge);
1605 pci_set_drvdata(pdev, bridge);
1606 return agp_add_bridge(bridge);
1608 @@ -472,8 +551,25 @@
1610 .class = (PCI_CLASS_BRIDGE_HOST << 8),
1612 - .vendor = PCI_VENDOR_ID_SI,
1613 - .device = PCI_DEVICE_ID_SI_755,
1614 + .vendor = PCI_VENDOR_ID_VIA,
1615 + .device = PCI_DEVICE_ID_VIA_8380_0,
1616 + .subvendor = PCI_ANY_ID,
1617 + .subdevice = PCI_ANY_ID,
1621 + .class = (PCI_CLASS_BRIDGE_HOST << 8),
1623 + .vendor = PCI_VENDOR_ID_NVIDIA,
1624 + .device = PCI_DEVICE_ID_NVIDIA_NFORCE3,
1625 + .subvendor = PCI_ANY_ID,
1626 + .subdevice = PCI_ANY_ID,
1629 + .class = (PCI_CLASS_BRIDGE_HOST << 8),
1631 + .vendor = PCI_VENDOR_ID_NVIDIA,
1632 + .device = PCI_DEVICE_ID_NVIDIA_NFORCE3S,
1633 .subvendor = PCI_ANY_ID,
1634 .subdevice = PCI_ANY_ID,
1638 static void __exit agp_amd64_cleanup(void)
1640 + if (aperture_resource)
1641 + release_resource(aperture_resource);
1642 pci_unregister_driver(&agp_amd64_pci_driver);
1645 diff -urN linux-2.6.0-orig/drivers/char/drm/Kconfig linux-2.6.0/drivers/char/drm/Kconfig
1646 --- linux-2.6.0-orig/drivers/char/drm/Kconfig 2004-12-21 18:38:39.488089272 +0100
1647 +++ linux-2.6.0/drivers/char/drm/Kconfig 2004-12-21 18:39:00.841843008 +0100
1649 module will be called i830. AGP support is required for this driver
1654 tristate "Matrox g200/g400"
1655 - depends on DRM && AGP
1656 + depends on DRM && AGP && (!X86_64 || BROKEN)
1658 Choose this option if you have a Matrox G200, G400 or G450 graphics
1659 card. If M is selected, the module will be called mga. AGP
1660 diff -urN linux-2.6.0-orig/drivers/net/pcmcia/Kconfig linux-2.6.0/drivers/net/pcmcia/Kconfig
1661 --- linux-2.6.0-orig/drivers/net/pcmcia/Kconfig 2004-12-21 18:38:39.193134112 +0100
1662 +++ linux-2.6.0/drivers/net/pcmcia/Kconfig 2004-12-21 18:39:00.841843008 +0100
1666 tristate "IBM PCMCIA tokenring adapter support"
1667 - depends on NET_PCMCIA && IBMTR!=y && TR && PCMCIA
1668 + depends on NET_PCMCIA && IBMTR!=y && TR && PCMCIA && !64BIT
1670 Say Y here if you intend to attach this type of Token Ring PCMCIA
1671 card to your computer. You then also need to say Y to "Token Ring
1672 diff -urN linux-2.6.0-orig/drivers/scsi/Kconfig linux-2.6.0/drivers/scsi/Kconfig
1673 --- linux-2.6.0-orig/drivers/scsi/Kconfig 2004-12-21 18:38:39.658063432 +0100
1674 +++ linux-2.6.0/drivers/scsi/Kconfig 2004-12-21 18:39:00.842842856 +0100
1675 @@ -1408,7 +1408,7 @@
1678 tristate "Workbit NinjaSCSI-32Bi/UDE support"
1679 - depends on PCI && SCSI
1680 + depends on PCI && SCSI && !64BIT
1682 This is support for the Workbit NinjaSCSI-32Bi/UDE PCI/Cardbus
1683 SCSI host adapter. Please read the SCSI-HOWTO, available from
1684 diff -urN linux-2.6.0-orig/drivers/scsi/pcmcia/Kconfig linux-2.6.0/drivers/scsi/pcmcia/Kconfig
1685 --- linux-2.6.0-orig/drivers/scsi/pcmcia/Kconfig 2004-12-21 18:38:39.586074376 +0100
1686 +++ linux-2.6.0/drivers/scsi/pcmcia/Kconfig 2004-12-21 18:39:00.843842704 +0100
1689 config PCMCIA_NINJA_SCSI
1690 tristate "NinjaSCSI-3 / NinjaSCSI-32Bi (16bit) PCMCIA support"
1692 + depends on m && !64BIT
1694 If you intend to attach this type of PCMCIA SCSI host adapter to
1695 your computer, say Y here and read
1696 diff -urN linux-2.6.0-orig/include/asm-generic/statfs.h linux-2.6.0/include/asm-generic/statfs.h
1697 --- linux-2.6.0-orig/include/asm-generic/statfs.h 2004-12-21 18:38:40.742898512 +0100
1698 +++ linux-2.6.0/include/asm-generic/statfs.h 2004-12-21 18:39:00.843842704 +0100
1703 +struct compat_statfs64 {
1711 + __kernel_fsid_t f_fsid;
1718 diff -urN linux-2.6.0-orig/include/asm-ia64/statfs.h linux-2.6.0/include/asm-ia64/statfs.h
1719 --- linux-2.6.0-orig/include/asm-ia64/statfs.h 2004-12-21 18:38:40.809888328 +0100
1720 +++ linux-2.6.0/include/asm-ia64/statfs.h 2004-12-21 18:39:00.843842704 +0100
1725 +struct compat_statfs64 {
1733 + __kernel_fsid_t f_fsid;
1739 #endif /* _ASM_IA64_STATFS_H */
1740 diff -urN linux-2.6.0-orig/include/asm-mips/statfs.h linux-2.6.0/include/asm-mips/statfs.h
1741 --- linux-2.6.0-orig/include/asm-mips/statfs.h 2004-12-21 18:38:40.769894408 +0100
1742 +++ linux-2.6.0/include/asm-mips/statfs.h 2004-12-21 18:39:00.843842704 +0100
1747 +struct compat_statfs64 {
1755 + __kernel_fsid_t f_fsid;
1761 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
1763 #endif /* _ASM_STATFS_H */
1764 diff -urN linux-2.6.0-orig/include/asm-parisc/statfs.h linux-2.6.0/include/asm-parisc/statfs.h
1765 --- linux-2.6.0-orig/include/asm-parisc/statfs.h 2004-12-21 18:38:40.638914320 +0100
1766 +++ linux-2.6.0/include/asm-parisc/statfs.h 2004-12-21 18:39:00.844842552 +0100
1771 +struct compat_statfs64 {
1779 + __kernel_fsid_t f_fsid;
1786 diff -urN linux-2.6.0-orig/include/asm-ppc64/statfs.h linux-2.6.0/include/asm-ppc64/statfs.h
1787 --- linux-2.6.0-orig/include/asm-ppc64/statfs.h 2004-12-21 18:38:40.738899120 +0100
1788 +++ linux-2.6.0/include/asm-ppc64/statfs.h 2004-12-21 18:39:00.844842552 +0100
1793 +struct compat_statfs64 {
1801 + __kernel_fsid_t f_fsid;
1807 #endif /* _PPC64_STATFS_H */
1808 diff -urN linux-2.6.0-orig/include/asm-s390/statfs.h linux-2.6.0/include/asm-s390/statfs.h
1809 --- linux-2.6.0-orig/include/asm-s390/statfs.h 2004-12-21 18:38:40.951866744 +0100
1810 +++ linux-2.6.0/include/asm-s390/statfs.h 2004-12-21 18:39:00.844842552 +0100
1815 +struct compat_statfs64 {
1823 + __kernel_fsid_t f_fsid;
1829 #endif /* __s390x__ */
1831 diff -urN linux-2.6.0-orig/include/asm-sparc64/statfs.h linux-2.6.0/include/asm-sparc64/statfs.h
1832 --- linux-2.6.0-orig/include/asm-sparc64/statfs.h 2004-12-21 18:38:40.985861576 +0100
1833 +++ linux-2.6.0/include/asm-sparc64/statfs.h 2004-12-21 18:39:00.844842552 +0100
1838 +struct compat_statfs64 {
1846 + __kernel_fsid_t f_fsid;
1853 diff -urN linux-2.6.0-orig/include/asm-x86_64/acpi.h linux-2.6.0/include/asm-x86_64/acpi.h
1854 --- linux-2.6.0-orig/include/asm-x86_64/acpi.h 2004-12-21 18:38:40.627915992 +0100
1855 +++ linux-2.6.0/include/asm-x86_64/acpi.h 2004-12-21 18:39:00.845842400 +0100
1857 #define ACPI_ENABLE_IRQS() local_irq_enable()
1858 #define ACPI_FLUSH_CPU_CACHE() wbinvd()
1861 - * A brief explanation as GNU inline assembly is a bit hairy
1862 - * %0 is the output parameter in RAX ("=a")
1863 - * %1 and %2 are the input parameters in RCX ("c")
1864 - * and an immediate value ("i") respectively
1865 - * All actual register references are preceded with "%%" as in "%%edx"
1866 - * Immediate values in the assembly are preceded by "$" as in "$0x1"
1867 - * The final asm parameter are the operation altered non-output registers.
1871 +__acpi_acquire_global_lock (unsigned int *lock)
1873 + unsigned int old, new, val;
1876 + new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1));
1877 + val = cmpxchg4_locked(lock, new, old);
1878 + } while (unlikely (val != old));
1879 + return (new < 3) ? -1 : 0;
1883 +__acpi_release_global_lock (unsigned int *lock)
1885 + unsigned int old, new, val;
1889 + val = cmpxchg4_locked(lock, new, old);
1890 + } while (unlikely (val != old));
1894 #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
1896 - unsigned long dummy; \
1897 - asm("1: movl (%2),%%eax;" \
1898 - "movl %%eax,%%edx;" \
1899 - "andq %2,%%rdx;" \
1900 - "btsl $0x1,%%edx;" \
1901 - "adcl $0x0,%%edx;" \
1902 - "lock; cmpxchgl %%edx,(%1);" \
1904 - "cmpb $0x3,%%dl;" \
1905 - "sbbl %%eax,%%eax" \
1906 - :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~1L):"dx"); \
1908 + ((Acq) = __acpi_acquire_global_lock((unsigned int *) GLptr))
1910 #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \
1912 - unsigned long dummy; \
1913 - asm("1: movl (%2),%%eax;" \
1914 - "movl %%eax,%%edx;" \
1915 - "andq %2,%%rdx;" \
1916 - "lock; cmpxchgl %%edx,(%1);" \
1918 - "andl $0x1,%%eax" \
1919 - :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \
1921 + ((Acq) = __acpi_release_global_lock((unsigned int *) GLptr))
1924 * Math helper asm macros
1925 diff -urN linux-2.6.0-orig/include/asm-x86_64/apic.h linux-2.6.0/include/asm-x86_64/apic.h
1926 --- linux-2.6.0-orig/include/asm-x86_64/apic.h 2004-12-21 18:38:40.630915536 +0100
1927 +++ linux-2.6.0/include/asm-x86_64/apic.h 2004-12-21 18:39:00.845842400 +0100
1929 extern void enable_lapic_nmi_watchdog(void);
1930 extern void disable_timer_nmi_watchdog(void);
1931 extern void enable_timer_nmi_watchdog(void);
1932 -extern inline void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
1933 +extern void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
1934 extern int APIC_init_uniprocessor (void);
1935 extern void disable_APIC_timer(void);
1936 extern void enable_APIC_timer(void);
1937 diff -urN linux-2.6.0-orig/include/asm-x86_64/bitops.h linux-2.6.0/include/asm-x86_64/bitops.h
1938 --- linux-2.6.0-orig/include/asm-x86_64/bitops.h 2004-12-21 18:38:40.625916296 +0100
1939 +++ linux-2.6.0/include/asm-x86_64/bitops.h 2004-12-21 18:39:00.846842248 +0100
1942 #include <linux/config.h>
1945 - * These have to be done with inline assembly: that way the bit-setting
1946 - * is guaranteed to be atomic. All bit operations return 0 if the bit
1947 - * was cleared before the operation and != 0 if it was not.
1949 - * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
1953 #define LOCK_PREFIX "lock ; "
1955 @@ -363,26 +355,26 @@
1957 static __inline__ int find_next_bit(const unsigned long * addr, int size, int offset)
1959 - unsigned int * p = ((unsigned int *) addr) + (offset >> 5);
1960 - int set = 0, bit = offset & 31, res;
1961 + const unsigned long * p = addr + (offset >> 6);
1962 + unsigned long set = 0, bit = offset & 63, res;
1966 - * Look for nonzero in the first 32 bits:
1967 + * Look for nonzero in the first 64 bits:
1969 - __asm__("bsfl %1,%0\n\t"
1970 - "cmovel %2,%0\n\t"
1971 + __asm__("bsfq %1,%0\n\t"
1972 + "cmoveq %2,%0\n\t"
1974 - : "r" (*p >> bit), "r" (32));
1975 - if (set < (32 - bit))
1976 + : "r" (*p >> bit), "r" (64L));
1977 + if (set < (64 - bit))
1978 return set + offset;
1984 * No set bit yet, search remaining full words for a bit
1986 - res = find_first_bit ((const unsigned long *)p, size - 32 * (p - (unsigned int *) addr));
1987 + res = find_first_bit (p, size - 64 * (p - addr));
1988 return (offset + set + res);
1991 diff -urN linux-2.6.0-orig/include/asm-x86_64/calling.h linux-2.6.0/include/asm-x86_64/calling.h
1992 --- linux-2.6.0-orig/include/asm-x86_64/calling.h 2004-12-21 18:38:40.627915992 +0100
1993 +++ linux-2.6.0/include/asm-x86_64/calling.h 2004-12-21 18:39:00.846842248 +0100
2001 /* arguments: interrupts/non tracing syscalls only save upto here*/
2003 diff -urN linux-2.6.0-orig/include/asm-x86_64/cpu.h linux-2.6.0/include/asm-x86_64/cpu.h
2004 --- linux-2.6.0-orig/include/asm-x86_64/cpu.h 1970-01-01 01:00:00.000000000 +0100
2005 +++ linux-2.6.0/include/asm-x86_64/cpu.h 2004-12-21 18:39:00.846842248 +0100
2007 +#include <asm-i386/cpu.h>
2008 diff -urN linux-2.6.0-orig/include/asm-x86_64/desc.h linux-2.6.0/include/asm-x86_64/desc.h
2009 --- linux-2.6.0-orig/include/asm-x86_64/desc.h 2004-12-21 18:38:40.632915232 +0100
2010 +++ linux-2.6.0/include/asm-x86_64/desc.h 2004-12-21 18:39:00.846842248 +0100
2013 * load one particular LDT into the current CPU
2015 -extern inline void load_LDT_nolock (mm_context_t *pc, int cpu)
2016 +static inline void load_LDT_nolock (mm_context_t *pc, int cpu)
2018 int count = pc->size;
2020 diff -urN linux-2.6.0-orig/include/asm-x86_64/fixmap.h linux-2.6.0/include/asm-x86_64/fixmap.h
2021 --- linux-2.6.0-orig/include/asm-x86_64/fixmap.h 2004-12-21 18:38:40.624916448 +0100
2022 +++ linux-2.6.0/include/asm-x86_64/fixmap.h 2004-12-21 18:39:00.847842096 +0100
2024 * directly without translation, we catch the bug with a NULL-deference
2025 * kernel oops. Illegal ranges of incoming indices are caught too.
2027 -extern inline unsigned long fix_to_virt(const unsigned int idx)
2028 +static inline unsigned long fix_to_virt(const unsigned int idx)
2031 * this branch gets completely eliminated after inlining,
2032 diff -urN linux-2.6.0-orig/include/asm-x86_64/io.h linux-2.6.0/include/asm-x86_64/io.h
2033 --- linux-2.6.0-orig/include/asm-x86_64/io.h 2004-12-21 18:38:40.625916296 +0100
2034 +++ linux-2.6.0/include/asm-x86_64/io.h 2004-12-21 18:39:00.847842096 +0100
2036 * Talk about misusing macros..
2038 #define __OUT1(s,x) \
2039 -extern inline void out##s(unsigned x value, unsigned short port) {
2040 +static inline void out##s(unsigned x value, unsigned short port) {
2042 #define __OUT2(s,s1,s2) \
2043 __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1"
2045 __OUT1(s##_p,x) __OUT2(s,s1,"w") __FULL_SLOW_DOWN_IO : : "a" (value), "Nd" (port));} \
2048 -extern inline RETURN_TYPE in##s(unsigned short port) { RETURN_TYPE _v;
2049 +static inline RETURN_TYPE in##s(unsigned short port) { RETURN_TYPE _v;
2051 #define __IN2(s,s1,s2) \
2052 __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"
2054 __IN1(s##_p) __IN2(s,s1,"w") __FULL_SLOW_DOWN_IO : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \
2057 -extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \
2058 +static inline void ins##s(unsigned short port, void * addr, unsigned long count) \
2059 { __asm__ __volatile__ ("rep ; ins" #s \
2060 : "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }
2063 -extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \
2064 +static inline void outs##s(unsigned short port, const void * addr, unsigned long count) \
2065 { __asm__ __volatile__ ("rep ; outs" #s \
2066 : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }
2068 @@ -125,12 +125,12 @@
2069 * Change virtual addresses to physical addresses and vv.
2070 * These are pretty trivial
2072 -extern inline unsigned long virt_to_phys(volatile void * address)
2073 +static inline unsigned long virt_to_phys(volatile void * address)
2075 return __pa(address);
2078 -extern inline void * phys_to_virt(unsigned long address)
2079 +static inline void * phys_to_virt(unsigned long address)
2081 return __va(address);
2085 extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
2087 -extern inline void * ioremap (unsigned long offset, unsigned long size)
2088 +static inline void * ioremap (unsigned long offset, unsigned long size)
2090 return __ioremap(offset, size, 0);
2093 /* Disable vmerge for now. Need to fix the block layer code
2094 to check for non iommu addresses first.
2095 When the IOMMU is force it is safe to enable. */
2096 -extern int force_iommu;
2097 -#define BIO_VERMGE_BOUNDARY (force_iommu ? 4096 : 0)
2098 +extern int iommu_merge;
2099 +#define BIO_VMERGE_BOUNDARY (iommu_merge ? 4096 : 0)
2101 #endif /* __KERNEL__ */
2103 diff -urN linux-2.6.0-orig/include/asm-x86_64/memblk.h linux-2.6.0/include/asm-x86_64/memblk.h
2104 --- linux-2.6.0-orig/include/asm-x86_64/memblk.h 1970-01-01 01:00:00.000000000 +0100
2105 +++ linux-2.6.0/include/asm-x86_64/memblk.h 2004-12-21 18:39:00.847842096 +0100
2107 +#include <asm-i386/memblk.h>
2108 diff -urN linux-2.6.0-orig/include/asm-x86_64/msr.h linux-2.6.0/include/asm-x86_64/msr.h
2109 --- linux-2.6.0-orig/include/asm-x86_64/msr.h 2004-12-21 18:38:40.630915536 +0100
2110 +++ linux-2.6.0/include/asm-x86_64/msr.h 2004-12-21 18:39:00.848841944 +0100
2112 : "=a" (low), "=d" (high) \
2115 -extern inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
2116 +static inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
2122 * CPUID functions returning a single datum
2124 -extern inline unsigned int cpuid_eax(unsigned int op)
2125 +static inline unsigned int cpuid_eax(unsigned int op)
2130 : "bx", "cx", "dx");
2133 -extern inline unsigned int cpuid_ebx(unsigned int op)
2134 +static inline unsigned int cpuid_ebx(unsigned int op)
2136 unsigned int eax, ebx;
2142 -extern inline unsigned int cpuid_ecx(unsigned int op)
2143 +static inline unsigned int cpuid_ecx(unsigned int op)
2145 unsigned int eax, ecx;
2151 -extern inline unsigned int cpuid_edx(unsigned int op)
2152 +static inline unsigned int cpuid_edx(unsigned int op)
2154 unsigned int eax, edx;
2156 diff -urN linux-2.6.0-orig/include/asm-x86_64/node.h linux-2.6.0/include/asm-x86_64/node.h
2157 --- linux-2.6.0-orig/include/asm-x86_64/node.h 1970-01-01 01:00:00.000000000 +0100
2158 +++ linux-2.6.0/include/asm-x86_64/node.h 2004-12-21 18:39:00.848841944 +0100
2160 +#include <asm-i386/node.h>
2161 diff -urN linux-2.6.0-orig/include/asm-x86_64/pgalloc.h linux-2.6.0/include/asm-x86_64/pgalloc.h
2162 --- linux-2.6.0-orig/include/asm-x86_64/pgalloc.h 2004-12-21 18:38:40.626916144 +0100
2163 +++ linux-2.6.0/include/asm-x86_64/pgalloc.h 2004-12-21 18:39:00.848841944 +0100
2165 free_page((unsigned long)pte);
2168 -extern inline void pte_free(struct page *pte)
2169 +static inline void pte_free(struct page *pte)
2173 diff -urN linux-2.6.0-orig/include/asm-x86_64/pgtable.h linux-2.6.0/include/asm-x86_64/pgtable.h
2174 --- linux-2.6.0-orig/include/asm-x86_64/pgtable.h 2004-12-21 18:38:40.628915840 +0100
2175 +++ linux-2.6.0/include/asm-x86_64/pgtable.h 2004-12-21 18:39:00.849841792 +0100
2177 #define pml4_none(x) (!pml4_val(x))
2178 #define pgd_none(x) (!pgd_val(x))
2180 -extern inline int pgd_present(pgd_t pgd) { return !pgd_none(pgd); }
2181 +static inline int pgd_present(pgd_t pgd) { return !pgd_none(pgd); }
2183 static inline void set_pte(pte_t *dst, pte_t val)
2186 pgd_val(*dst) = pgd_val(val);
2189 -extern inline void pgd_clear (pgd_t * pgd)
2190 +static inline void pgd_clear (pgd_t * pgd)
2192 set_pgd(pgd, __pgd(0));
2195 (_PAGE_PRESENT | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_NX)
2196 #define __PAGE_KERNEL_VSYSCALL \
2197 (_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
2198 +#define __PAGE_KERNEL_VSYSCALL_NOCACHE \
2199 + (_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_PCD)
2200 #define __PAGE_KERNEL_LARGE \
2201 (__PAGE_KERNEL | _PAGE_PSE)
2204 #define PAGE_KERNEL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_NOCACHE)
2205 #define PAGE_KERNEL_VSYSCALL MAKE_GLOBAL(__PAGE_KERNEL_VSYSCALL)
2206 #define PAGE_KERNEL_LARGE MAKE_GLOBAL(__PAGE_KERNEL_LARGE)
2207 +#define PAGE_KERNEL_VSYSCALL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_VSYSCALL_NOCACHE)
2210 #define __P000 PAGE_NONE
2211 @@ -242,23 +245,23 @@
2212 * Undefined behaviour if not..
2214 static inline int pte_user(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
2215 -extern inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
2216 -extern inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
2217 -extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
2218 -extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
2219 -extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; }
2220 +static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
2221 +static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
2222 +static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
2223 +static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
2224 +static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; }
2225 static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
2227 -extern inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; }
2228 -extern inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; }
2229 -extern inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; }
2230 -extern inline pte_t pte_mkold(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; }
2231 -extern inline pte_t pte_wrprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_RW)); return pte; }
2232 -extern inline pte_t pte_mkread(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; }
2233 -extern inline pte_t pte_mkexec(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; }
2234 -extern inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; }
2235 -extern inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; }
2236 -extern inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; }
2237 +static inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; }
2238 +static inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; }
2239 +static inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; }
2240 +static inline pte_t pte_mkold(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; }
2241 +static inline pte_t pte_wrprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_RW)); return pte; }
2242 +static inline pte_t pte_mkread(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; }
2243 +static inline pte_t pte_mkexec(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; }
2244 +static inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; }
2245 +static inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; }
2246 +static inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; }
2247 static inline int ptep_test_and_clear_dirty(pte_t *ptep) { return test_and_clear_bit(_PAGE_BIT_DIRTY, ptep); }
2248 static inline int ptep_test_and_clear_young(pte_t *ptep) { return test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep); }
2249 static inline void ptep_set_wrprotect(pte_t *ptep) { clear_bit(_PAGE_BIT_RW, ptep); }
2253 /* Change flags of a PTE */
2254 -extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
2255 +static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
2257 pte_val(pte) &= _PAGE_CHG_MASK;
2258 pte_val(pte) |= pgprot_val(newprot);
2259 diff -urN linux-2.6.0-orig/include/asm-x86_64/processor.h linux-2.6.0/include/asm-x86_64/processor.h
2260 --- linux-2.6.0-orig/include/asm-x86_64/processor.h 2004-12-21 18:38:40.631915384 +0100
2261 +++ linux-2.6.0/include/asm-x86_64/processor.h 2004-12-21 18:39:00.849841792 +0100
2262 @@ -304,13 +304,13 @@
2263 #define KSTK_ESP(tsk) -1 /* sorry. doesn't work for syscall. */
2265 /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
2266 -extern inline void rep_nop(void)
2267 +static inline void rep_nop(void)
2269 __asm__ __volatile__("rep;nop": : :"memory");
2272 /* Stop speculative execution */
2273 -extern inline void sync_core(void)
2274 +static inline void sync_core(void)
2277 asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory");
2278 diff -urN linux-2.6.0-orig/include/asm-x86_64/smp.h linux-2.6.0/include/asm-x86_64/smp.h
2279 --- linux-2.6.0-orig/include/asm-x86_64/smp.h 2004-12-21 18:38:40.622916752 +0100
2280 +++ linux-2.6.0/include/asm-x86_64/smp.h 2004-12-21 18:39:00.850841640 +0100
2282 return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID));
2285 -#define safe_smp_processor_id() (cpuid_ebx(1) >> 24)
2286 +#define safe_smp_processor_id() (disable_apic ? 0 : hard_smp_processor_id())
2288 #define cpu_online(cpu) cpu_isset(cpu, cpu_online_map)
2289 #endif /* !ASSEMBLY */
2290 diff -urN linux-2.6.0-orig/include/asm-x86_64/statfs.h linux-2.6.0/include/asm-x86_64/statfs.h
2291 --- linux-2.6.0-orig/include/asm-x86_64/statfs.h 2004-12-21 18:38:40.628915840 +0100
2292 +++ linux-2.6.0/include/asm-x86_64/statfs.h 2004-12-21 18:39:00.850841640 +0100
2297 +struct compat_statfs64 {
2305 + __kernel_fsid_t f_fsid;
2309 +} __attribute__((packed));
2312 diff -urN linux-2.6.0-orig/include/asm-x86_64/system.h linux-2.6.0/include/asm-x86_64/system.h
2313 --- linux-2.6.0-orig/include/asm-x86_64/system.h 2004-12-21 18:38:40.629915688 +0100
2314 +++ linux-2.6.0/include/asm-x86_64/system.h 2004-12-21 18:39:00.850841640 +0100
2317 #define __xg(x) ((volatile long *)(x))
2319 -extern inline void set_64bit(volatile unsigned long *ptr, unsigned long val)
2320 +static inline void set_64bit(volatile unsigned long *ptr, unsigned long val)
2324 @@ -276,6 +276,13 @@
2325 ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\
2326 (unsigned long)(n),sizeof(*(ptr))))
2328 +static inline __u32 cmpxchg4_locked(__u32 *ptr, __u32 old, __u32 new)
2330 + asm volatile("lock ; cmpxchgl %k1,%2" :
2331 + "=r" (new) : "0" (old), "m" (*(__u32 *)ptr) : "memory");
2336 #define smp_mb() mb()
2337 #define smp_rmb() rmb()
2338 @@ -314,7 +321,21 @@
2339 #define local_irq_disable() __asm__ __volatile__("cli": : :"memory")
2340 #define local_irq_enable() __asm__ __volatile__("sti": : :"memory")
2341 /* used in the idle loop; sti takes one instruction cycle to complete */
2342 -#define safe_halt() __asm__ __volatile__("sti; hlt": : :"memory")
2344 +/* Work around BIOS that don't have K8 Errata #93 fixed. */
2345 +#define safe_halt() \
2346 + asm volatile(" sti\n" \
2349 + ".section .fixup,\"ax\"\n" \
2350 + "3: call idle_warning\n" \
2353 + ".section __ex_table,\"a\"\n\t" \
2356 + ".previous" ::: "memory")
2358 #define irqs_disabled() \
2360 unsigned long flags; \
2361 diff -urN linux-2.6.0-orig/include/asm-x86_64/timex.h linux-2.6.0/include/asm-x86_64/timex.h
2362 --- linux-2.6.0-orig/include/asm-x86_64/timex.h 2004-12-21 18:38:40.627915992 +0100
2363 +++ linux-2.6.0/include/asm-x86_64/timex.h 2004-12-21 18:39:00.851841488 +0100
2366 extern struct vxtime_data vxtime;
2368 +#define ARCH_HAS_TIMEVARS 1
2372 diff -urN linux-2.6.0-orig/include/asm-x86_64/topology.h linux-2.6.0/include/asm-x86_64/topology.h
2373 --- linux-2.6.0-orig/include/asm-x86_64/topology.h 2004-12-21 18:38:40.628915840 +0100
2374 +++ linux-2.6.0/include/asm-x86_64/topology.h 2004-12-21 18:39:00.851841488 +0100
2377 static inline unsigned long pcibus_to_cpumask(int bus)
2379 + BUG_ON(bus >= MAX_MP_BUSSES);
2380 return mp_bus_to_cpumask[bus] & cpu_online_map;
2383 diff -urN linux-2.6.0-orig/include/asm-x86_64/uaccess.h linux-2.6.0/include/asm-x86_64/uaccess.h
2384 --- linux-2.6.0-orig/include/asm-x86_64/uaccess.h 2004-12-21 18:38:40.624916448 +0100
2385 +++ linux-2.6.0/include/asm-x86_64/uaccess.h 2004-12-21 18:39:00.851841488 +0100
2388 #define access_ok(type,addr,size) (__range_not_ok(addr,size) == 0)
2390 -extern inline int verify_area(int type, const void * addr, unsigned long size)
2391 +static inline int verify_area(int type, const void * addr, unsigned long size)
2393 return access_ok(type,addr,size) ? 0 : -EFAULT;
2395 diff -urN linux-2.6.0-orig/include/asm-x86_64/unistd.h linux-2.6.0/include/asm-x86_64/unistd.h
2396 --- linux-2.6.0-orig/include/asm-x86_64/unistd.h 2004-12-21 18:38:40.627915992 +0100
2397 +++ linux-2.6.0/include/asm-x86_64/unistd.h 2004-12-21 18:39:00.852841336 +0100
2398 @@ -623,11 +623,11 @@
2399 type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
2402 -__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; movq %7,%%r9" __syscall \
2403 +__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; movq %7,%%r9 ; " __syscall \
2405 : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)), \
2406 - "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5), \
2407 - "g" ((long)(arg6),) : \
2408 + "d" ((long)(arg3)), "g" ((long)(arg4)), "g" ((long)(arg5)), \
2409 + "g" ((long)(arg6)) : \
2410 __syscall_clobber,"r8","r10","r9" ); \
2411 __syscall_return(type,__res); \
2413 diff -urN linux-2.6.0-orig/include/asm-x86_64/vsyscall.h linux-2.6.0/include/asm-x86_64/vsyscall.h
2414 --- linux-2.6.0-orig/include/asm-x86_64/vsyscall.h 2004-12-21 18:38:40.631915384 +0100
2415 +++ linux-2.6.0/include/asm-x86_64/vsyscall.h 2004-12-21 18:39:00.852841336 +0100
2420 +/* FIXME: put all this into a single section */
2422 #define __section_vxtime __attribute__ ((unused, __section__ (".vxtime"), aligned(16)))
2423 #define __section_wall_jiffies __attribute__ ((unused, __section__ (".wall_jiffies"), aligned(16)))
2424 #define __section_jiffies __attribute__ ((unused, __section__ (".jiffies"), aligned(16)))
2426 #define __section_sysctl_vsyscall __attribute__ ((unused, __section__ (".sysctl_vsyscall"), aligned(16)))
2427 #define __section_xtime __attribute__ ((unused, __section__ (".xtime"), aligned(16)))
2428 #define __section_xtime_lock __attribute__ ((unused, __section__ (".xtime_lock"), aligned(L1_CACHE_BYTES)))
2429 +#define __section_time_adjust __attribute__ ((unused, __section__ (".time_adjust"), aligned(16)))
2430 +#define __section_tick_usec __attribute__ ((unused, __section__ (".tick_usec"), aligned(16)))
2432 #define VXTIME_TSC 1
2433 #define VXTIME_HPET 2
2435 extern unsigned long __wall_jiffies;
2436 extern struct timezone __sys_tz;
2437 extern seqlock_t __xtime_lock;
2438 +extern long __time_adjust;
2439 +extern long __tick_usec;
2441 /* kernel space (writeable) */
2442 extern struct vxtime_data vxtime;
2444 extern struct timezone sys_tz;
2445 extern int sysctl_vsyscall;
2446 extern seqlock_t xtime_lock;
2447 +extern long time_adjust;
2448 +extern unsigned long tick_usec;
2450 #define ARCH_HAVE_XTIME_LOCK 1
2452 diff -urN linux-2.6.0-orig/include/linux/compat.h linux-2.6.0/include/linux/compat.h
2453 --- linux-2.6.0-orig/include/linux/compat.h 2004-12-21 18:38:40.685907176 +0100
2454 +++ linux-2.6.0/include/linux/compat.h 2004-12-21 18:39:00.852841336 +0100
2456 compat_long_t ru_nivcsw;
2459 -struct compat_statfs64 {
2467 - __kernel_fsid_t f_fsid;
2473 struct compat_dirent {
2476 diff -urN linux-2.6.0-orig/include/linux/compat_ioctl.h linux-2.6.0/include/linux/compat_ioctl.h
2477 --- linux-2.6.0-orig/include/linux/compat_ioctl.h 2004-12-21 18:38:40.720901856 +0100
2478 +++ linux-2.6.0/include/linux/compat_ioctl.h 2004-12-21 18:39:00.853841184 +0100
2480 COMPATIBLE_IOCTL(SIOCSIFLINK)
2481 COMPATIBLE_IOCTL(SIOCSIFENCAP)
2482 COMPATIBLE_IOCTL(SIOCGIFENCAP)
2483 +COMPATIBLE_IOCTL(SIOCSIFNAME)
2484 COMPATIBLE_IOCTL(SIOCSIFBR)
2485 COMPATIBLE_IOCTL(SIOCGIFBR)
2486 COMPATIBLE_IOCTL(SIOCSARP)
2487 diff -urN linux-2.6.0-orig/include/linux/pci_ids.h linux-2.6.0/include/linux/pci_ids.h
2488 --- linux-2.6.0-orig/include/linux/pci_ids.h 2004-12-21 18:38:40.681907784 +0100
2489 +++ linux-2.6.0/include/linux/pci_ids.h 2004-12-21 18:39:00.854841032 +0100
2490 @@ -1031,6 +1031,8 @@
2491 #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085
2492 #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e
2493 #define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0
2494 +#define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1
2495 +#define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1
2496 #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5
2497 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA 0x00e3
2498 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5
2499 diff -urN linux-2.6.0-orig/include/linux/timex.h linux-2.6.0/include/linux/timex.h
2500 --- linux-2.6.0-orig/include/linux/timex.h 2004-12-21 18:38:40.660910976 +0100
2501 +++ linux-2.6.0/include/linux/timex.h 2004-12-21 18:39:00.855840880 +0100
2504 extern unsigned long tick_usec; /* USER_HZ period (usec) */
2505 extern unsigned long tick_nsec; /* ACTHZ period (nsec) */
2506 -extern int tickadj; /* amount of adjustment per tick */
2507 +#define tickadj ((int)(500/HZ ? : 1))
2510 * phase-lock loop variables
2511 diff -urN linux-2.6.0-orig/kernel/timer.c linux-2.6.0/kernel/timer.c
2512 --- linux-2.6.0-orig/kernel/timer.c 2004-12-21 18:38:42.155683736 +0100
2513 +++ linux-2.6.0/kernel/timer.c 2004-12-21 18:39:00.856840728 +0100
2514 @@ -436,7 +436,18 @@
2516 * Timekeeping variables
2520 + * Any variables used in low level gettimeofday must be declared
2521 + * inside ARCH_HAS_TIMEVARS. This is requires for x86-64 who
2522 + * can run gettimeofday in user context in a vsyscall. The variables
2523 + * must be mapped in a special way in the low level architecture code
2527 +#ifndef ARCH_HAS_TIMEVARS
2528 unsigned long tick_usec = TICK_USEC; /* USER_HZ period (usec) */
2530 unsigned long tick_nsec = TICK_NSEC; /* ACTHZ period (nsec) */
2533 @@ -452,10 +463,6 @@
2535 EXPORT_SYMBOL(xtime);
2537 -/* Don't completely fail for HZ > 500. */
2538 -int tickadj = 500/HZ ? : 1; /* microsecs */
2542 * phase-lock loop variables
2545 /* frequency offset (scaled ppm)*/
2546 long time_adj; /* tick adjust (scaled 1 / HZ) */
2547 long time_reftime; /* time at last adjustment (s) */
2548 +#ifndef ARCH_HAS_TIMEVARS
2551 long time_next_adjust;