···269269 add r5, sp, #S_PC270270 ldmia r7, {r2 - r4} @ Get USR pc, cpsr271271272272-#if __LINUX_ARM_ARCH__ < 6272272+#if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)273273 @ make sure our user space atomic helper is aborted274274 cmp r2, #VIRT_OFFSET275275 bichs r3, r3, #PSR_Z_BIT···616616617617__kuser_cmpxchg: @ 0xffff0fc0618618619619-#if __LINUX_ARM_ARCH__ < 6619619+#if defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)620620621621-#ifdef CONFIG_SMP /* sanity check */622622-#error "CONFIG_SMP on a machine supporting pre-ARMv6 processors?"623623-#endif621621+ /*622622+ * Poor you. No fast solution possible...623623+ * The kernel itself must perform the operation.624624+ * A special ghost syscall is used for that (see traps.c).625625+ */626626+ swi #0x9ffff0627627+ mov pc, lr628628+629629+#elif __LINUX_ARM_ARCH__ < 6624630625631 /*626632 * Theory of operation:
+49
arch/arm/kernel/traps.c
···464464#endif465465 return 0;466466467467+#ifdef CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG468468+ /*469469+ * Atomically store r1 in *r2 if *r2 is equal to r0 for user space.470470+ * Return zero in r0 if *MEM was changed or non-zero if no exchange471471+ * happened. Also set the user C flag accordingly.472472+ * If access permissions have to be fixed up then non-zero is473473+ * returned and the operation has to be re-attempted.474474+ *475475+ * *NOTE*: This is a ghost syscall private to the kernel. Only the476476+ * __kuser_cmpxchg code in entry-armv.S should be aware of its477477+ * existence. Don't ever use this from user code.478478+ */479479+ case 0xfff0:480480+ {481481+ extern void do_DataAbort(unsigned long addr, unsigned int fsr,482482+ struct pt_regs *regs);483483+ unsigned long val;484484+ unsigned long addr = regs->ARM_r2;485485+ struct mm_struct *mm = current->mm;486486+ pgd_t *pgd; pmd_t *pmd; pte_t *pte;487487+488488+ regs->ARM_cpsr &= ~PSR_C_BIT;489489+ spin_lock(&mm->page_table_lock);490490+ pgd = pgd_offset(mm, addr);491491+ if (!pgd_present(*pgd))492492+ goto bad_access;493493+ pmd = pmd_offset(pgd, addr);494494+ if (!pmd_present(*pmd))495495+ goto bad_access;496496+ pte = pte_offset_map(pmd, addr);497497+ if (!pte_present(*pte) || !pte_write(*pte))498498+ goto bad_access;499499+ val = *(unsigned long *)addr;500500+ val -= regs->ARM_r0;501501+ if (val == 0) {502502+ *(unsigned long *)addr = regs->ARM_r1;503503+ regs->ARM_cpsr |= PSR_C_BIT;504504+ }505505+ spin_unlock(&mm->page_table_lock);506506+ return val;507507+508508+ bad_access:509509+ spin_unlock(&mm->page_table_lock);510510+ /* simulate a read access fault */511511+ do_DataAbort(addr, 15 + (1 << 11), regs);512512+ return -1;513513+ }514514+#endif515515+467516 default:468517 /* Calls 9f00xx..9f07ff are defined to return -ENOSYS469518 if not implemented, rather than raising SIGILL. This
···304304 PWER = 0xC0000002;305305 PRER = 0x00000002;306306 PFER = 0x00000002;307307+ /* for use I SRAM as framebuffer. */308308+ PSLR |= 0xF04;309309+ PCFR = 0x66;310310+ /* For Keypad wakeup. */311311+ KPC &=~KPC_ASACT;312312+ KPC |=KPC_AS;313313+ PKWR = 0x000FD000;314314+ /* Need read PKWR back after set it. */315315+ PKWR;307316}308317309318MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)")
+18-14
arch/arm/mach-pxa/pm.c
···2929 */3030#undef DEBUG31313232-extern void pxa_cpu_suspend(void);3333-extern void pxa_cpu_resume(void);3434-3532#define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x3633#define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x]3734···6063 SLEEP_SAVE_ICMR,6164 SLEEP_SAVE_CKEN,62656666+#ifdef CONFIG_PXA27x6767+ SLEEP_SAVE_MDREFR,6868+ SLEEP_SAVE_PWER, SLEEP_SAVE_PCFR, SLEEP_SAVE_PRER,6969+ SLEEP_SAVE_PFER, SLEEP_SAVE_PKWR,7070+#endif7171+6372 SLEEP_SAVE_CKSUM,64736574 SLEEP_SAVE_SIZE···7875 unsigned long checksum = 0;7976 struct timespec delta, rtc;8077 int i;8181-8282- if (state != PM_SUSPEND_MEM)8383- return -EINVAL;7878+ extern void pxa_cpu_pm_enter(suspend_state_t state);84798580#ifdef CONFIG_IWMMXT8681 /* force any iWMMXt context to ram **/···101100 SAVE(GAFR2_L); SAVE(GAFR2_U);102101103102#ifdef CONFIG_PXA27x103103+ SAVE(MDREFR);104104 SAVE(GPLR3); SAVE(GPDR3); SAVE(GRER3); SAVE(GFER3); SAVE(PGSR3);105105 SAVE(GAFR3_L); SAVE(GAFR3_U);106106+ SAVE(PWER); SAVE(PCFR); SAVE(PRER);107107+ SAVE(PFER); SAVE(PKWR);106108#endif107109108110 SAVE(ICMR);109111 ICMR = 0;110112111113 SAVE(CKEN);112112- CKEN = 0;113113-114114 SAVE(PSTR);115115116116 /* Note: wake up source are set up in each machine specific files */···125123 /* Clear sleep reset status */126124 RCSR = RCSR_SMR;127125128128- /* set resume return address */129129- PSPR = virt_to_phys(pxa_cpu_resume);130130-131126 /* before sleeping, calculate and save a checksum */132127 for (i = 0; i < SLEEP_SAVE_SIZE - 1; i++)133128 checksum += sleep_save[i];134129 sleep_save[SLEEP_SAVE_CKSUM] = checksum;135130136131 /* *** go zzz *** */137137- pxa_cpu_suspend();132132+ pxa_cpu_pm_enter(state);138133139134 /* after sleeping, validate the checksum */140135 checksum = 0;···144145 LUB_HEXLED = 0xbadbadc5;145146#endif146147 while (1)147147- pxa_cpu_suspend();148148+ pxa_cpu_pm_enter(state);148149 }149150150151 /* ensure not to come back here if it wasn't intended */···161162 RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2);162163163164#ifdef CONFIG_PXA27x165165+ RESTORE(MDREFR);164166 RESTORE(GAFR3_L); RESTORE(GAFR3_U); RESTORE_GPLEVEL(3);165167 RESTORE(GPDR3); RESTORE(GRER3); RESTORE(GFER3); RESTORE(PGSR3);168168+ RESTORE(PWER); RESTORE(PCFR); RESTORE(PRER);169169+ RESTORE(PFER); RESTORE(PKWR);166170#endif167171168172 PSSR = PSSR_RDH | PSSR_PH;···199197 */200198static int pxa_pm_prepare(suspend_state_t state)201199{202202- return 0;200200+ extern int pxa_cpu_pm_prepare(suspend_state_t state);201201+202202+ return pxa_cpu_pm_prepare(state);203203}204204205205/*
···228228 select CPU_CACHE_V4WB229229 select CPU_CACHE_VIVT230230 select CPU_TLB_V4WB231231- select CPU_MINICACHE232231233232# XScale234233config CPU_XSCALE···238239 select CPU_ABRT_EV5T239240 select CPU_CACHE_VIVT240241 select CPU_TLB_V4WBI241241- select CPU_MINICACHE242242243243# ARMv6244244config CPU_V6···343345config CPU_TLB_V6344346 bool345347346346-config CPU_MINICACHE347347- bool348348- help349349- Processor has a minicache.350350-351348comment "Processor Features"352349353350config ARM_THUMB···421428 all SMP capable ARMv6's) or later processors. User space may422429 assume directly accessing that register and always obtain the423430 expected value only on ARMv7 and above.431431+432432+config NEEDS_SYSCALL_FOR_CMPXCHG433433+ bool434434+ default y if SMP && (CPU_32v5 || CPU_32v4 || CPU_32v3)435435+ help436436+ SMP on a pre-ARMv6 processor? Well OK then.437437+ Forget about fast user space cmpxchg support.438438+ It is just not possible.424439
···11-/*22- * linux/arch/arm/lib/copypage-xscale.S33- *44- * Copyright (C) 2001 Russell King55- *66- * This program is free software; you can redistribute it and/or modify77- * it under the terms of the GNU General Public License version 2 as88- * published by the Free Software Foundation.99- */1010-#include <linux/linkage.h>1111-#include <linux/init.h>1212-#include <asm/constants.h>1313-1414-/*1515- * General note:1616- * We don't really want write-allocate cache behaviour for these functions1717- * since that will just eat through 8K of the cache.1818- */1919-2020- .text2121- .align 52222-/*2323- * XScale optimised copy_user_page2424- * r0 = destination2525- * r1 = source2626- * r2 = virtual user address of ultimate destination page2727- *2828- * The source page may have some clean entries in the cache already, but we2929- * can safely ignore them - break_cow() will flush them out of the cache3030- * if we eventually end up using our copied page.3131- *3232- * What we could do is use the mini-cache to buffer reads from the source3333- * page. We rely on the mini-cache being smaller than one page, so we'll3434- * cycle through the complete cache anyway.3535- */3636-ENTRY(xscale_mc_copy_user_page)3737- stmfd sp!, {r4, r5, lr}3838- mov r5, r03939- mov r0, r14040- bl map_page_minicache4141- mov r1, r54242- mov lr, #PAGE_SZ/64-14343-4444- /*4545- * Strangely enough, best performance is achieved4646- * when prefetching destination as well. (NP)4747- */4848- pld [r0, #0]4949- pld [r0, #32]5050- pld [r1, #0]5151- pld [r1, #32]5252-5353-1: pld [r0, #64]5454- pld [r0, #96]5555- pld [r1, #64]5656- pld [r1, #96]5757-5858-2: ldrd r2, [r0], #85959- ldrd r4, [r0], #86060- mov ip, r16161- strd r2, [r1], #86262- ldrd r2, [r0], #86363- strd r4, [r1], #86464- ldrd r4, [r0], #86565- strd r2, [r1], #86666- strd r4, [r1], #86767- mcr p15, 0, ip, c7, c10, 1 @ clean D line6868- ldrd r2, [r0], #86969- mcr p15, 0, ip, c7, c6, 1 @ invalidate D line7070- ldrd r4, [r0], #87171- mov ip, r17272- strd r2, [r1], #87373- ldrd r2, [r0], #87474- strd r4, [r1], #87575- ldrd r4, [r0], #87676- strd r2, [r1], #87777- strd r4, [r1], #87878- mcr p15, 0, ip, c7, c10, 1 @ clean D line7979- subs lr, lr, #18080- mcr p15, 0, ip, c7, c6, 1 @ invalidate D line8181- bgt 1b8282- beq 2b8383-8484- ldmfd sp!, {r4, r5, pc}8585-8686- .align 58787-/*8888- * XScale optimised clear_user_page8989- * r0 = destination9090- * r1 = virtual user address of ultimate destination page9191- */9292-ENTRY(xscale_mc_clear_user_page)9393- mov r1, #PAGE_SZ/329494- mov r2, #09595- mov r3, #09696-1: mov ip, r09797- strd r2, [r0], #89898- strd r2, [r0], #89999- strd r2, [r0], #8100100- strd r2, [r0], #8101101- mcr p15, 0, ip, c7, c10, 1 @ clean D line102102- subs r1, r1, #1103103- mcr p15, 0, ip, c7, c6, 1 @ invalidate D line104104- bne 1b105105- mov pc, lr106106-107107- __INITDATA108108-109109- .type xscale_mc_user_fns, #object110110-ENTRY(xscale_mc_user_fns)111111- .long xscale_mc_clear_user_page112112- .long xscale_mc_copy_user_page113113- .size xscale_mc_user_fns, . - xscale_mc_user_fns
+131
arch/arm/mm/copypage-xscale.c
···11+/*22+ * linux/arch/arm/lib/copypage-xscale.S33+ *44+ * Copyright (C) 1995-2005 Russell King55+ *66+ * This program is free software; you can redistribute it and/or modify77+ * it under the terms of the GNU General Public License version 2 as88+ * published by the Free Software Foundation.99+ *1010+ * This handles the mini data cache, as found on SA11x0 and XScale1111+ * processors. When we copy a user page page, we map it in such a way1212+ * that accesses to this page will not touch the main data cache, but1313+ * will be cached in the mini data cache. This prevents us thrashing1414+ * the main data cache on page faults.1515+ */1616+#include <linux/init.h>1717+#include <linux/mm.h>1818+1919+#include <asm/page.h>2020+#include <asm/pgtable.h>2121+#include <asm/tlbflush.h>2222+2323+/*2424+ * 0xffff8000 to 0xffffffff is reserved for any ARM architecture2525+ * specific hacks for copying pages efficiently.2626+ */2727+#define COPYPAGE_MINICACHE 0xffff80002828+2929+#define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \3030+ L_PTE_CACHEABLE)3131+3232+#define TOP_PTE(x) pte_offset_kernel(top_pmd, x)3333+3434+static DEFINE_SPINLOCK(minicache_lock);3535+3636+/*3737+ * XScale mini-dcache optimised copy_user_page3838+ *3939+ * We flush the destination cache lines just before we write the data into the4040+ * corresponding address. Since the Dcache is read-allocate, this removes the4141+ * Dcache aliasing issue. The writes will be forwarded to the write buffer,4242+ * and merged as appropriate.4343+ */4444+static void __attribute__((naked))4545+mc_copy_user_page(void *from, void *to)4646+{4747+ /*4848+ * Strangely enough, best performance is achieved4949+ * when prefetching destination as well. (NP)5050+ */5151+ asm volatile(5252+ "stmfd sp!, {r4, r5, lr} \n\5353+ mov lr, %2 \n\5454+ pld [r0, #0] \n\5555+ pld [r0, #32] \n\5656+ pld [r1, #0] \n\5757+ pld [r1, #32] \n\5858+1: pld [r0, #64] \n\5959+ pld [r0, #96] \n\6060+ pld [r1, #64] \n\6161+ pld [r1, #96] \n\6262+2: ldrd r2, [r0], #8 \n\6363+ ldrd r4, [r0], #8 \n\6464+ mov ip, r1 \n\6565+ strd r2, [r1], #8 \n\6666+ ldrd r2, [r0], #8 \n\6767+ strd r4, [r1], #8 \n\6868+ ldrd r4, [r0], #8 \n\6969+ strd r2, [r1], #8 \n\7070+ strd r4, [r1], #8 \n\7171+ mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\7272+ ldrd r2, [r0], #8 \n\7373+ mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\7474+ ldrd r4, [r0], #8 \n\7575+ mov ip, r1 \n\7676+ strd r2, [r1], #8 \n\7777+ ldrd r2, [r0], #8 \n\7878+ strd r4, [r1], #8 \n\7979+ ldrd r4, [r0], #8 \n\8080+ strd r2, [r1], #8 \n\8181+ strd r4, [r1], #8 \n\8282+ mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\8383+ subs lr, lr, #1 \n\8484+ mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\8585+ bgt 1b \n\8686+ beq 2b \n\8787+ ldmfd sp!, {r4, r5, pc} "8888+ :8989+ : "r" (from), "r" (to), "I" (PAGE_SIZE / 64 - 1));9090+}9191+9292+void xscale_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr)9393+{9494+ spin_lock(&minicache_lock);9595+9696+ set_pte(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot));9797+ flush_tlb_kernel_page(COPYPAGE_MINICACHE);9898+9999+ mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto);100100+101101+ spin_unlock(&minicache_lock);102102+}103103+104104+/*105105+ * XScale optimised clear_user_page106106+ */107107+void __attribute__((naked))108108+xscale_mc_clear_user_page(void *kaddr, unsigned long vaddr)109109+{110110+ asm volatile(111111+ "mov r1, %0 \n\112112+ mov r2, #0 \n\113113+ mov r3, #0 \n\114114+1: mov ip, r0 \n\115115+ strd r2, [r0], #8 \n\116116+ strd r2, [r0], #8 \n\117117+ strd r2, [r0], #8 \n\118118+ strd r2, [r0], #8 \n\119119+ mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\120120+ subs r1, r1, #1 \n\121121+ mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\122122+ bne 1b \n\123123+ mov pc, lr"124124+ :125125+ : "I" (PAGE_SIZE / 32));126126+}127127+128128+struct cpu_user_fns xscale_mc_user_fns __initdata = {129129+ .cpu_clear_user_page = xscale_mc_clear_user_page, 130130+ .cpu_copy_user_page = xscale_mc_copy_user_page,131131+};
-73
arch/arm/mm/minicache.c
···11-/*22- * linux/arch/arm/mm/minicache.c33- *44- * Copyright (C) 2001 Russell King55- *66- * This program is free software; you can redistribute it and/or modify77- * it under the terms of the GNU General Public License version 2 as88- * published by the Free Software Foundation.99- *1010- * This handles the mini data cache, as found on SA11x0 and XScale1111- * processors. When we copy a user page page, we map it in such a way1212- * that accesses to this page will not touch the main data cache, but1313- * will be cached in the mini data cache. This prevents us thrashing1414- * the main data cache on page faults.1515- */1616-#include <linux/init.h>1717-#include <linux/mm.h>1818-1919-#include <asm/page.h>2020-#include <asm/pgtable.h>2121-#include <asm/tlbflush.h>2222-2323-/*2424- * 0xffff8000 to 0xffffffff is reserved for any ARM architecture2525- * specific hacks for copying pages efficiently.2626- */2727-#define minicache_address (0xffff8000)2828-#define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \2929- L_PTE_CACHEABLE)3030-3131-static pte_t *minicache_pte;3232-3333-/*3434- * Note that this is intended to be called only from the copy_user_page3535- * asm code; anything else will require special locking to prevent the3636- * mini-cache space being re-used. (Note: probably preempt unsafe).3737- *3838- * We rely on the fact that the minicache is 2K, and we'll be pushing3939- * 4K of data through it, so we don't actually have to specifically4040- * flush the minicache when we change the mapping.4141- *4242- * Note also: assert(PAGE_OFFSET <= virt < high_memory).4343- * Unsafe: preempt, kmap.4444- */4545-unsigned long map_page_minicache(unsigned long virt)4646-{4747- set_pte(minicache_pte, pfn_pte(__pa(virt) >> PAGE_SHIFT, minicache_pgprot));4848- flush_tlb_kernel_page(minicache_address);4949-5050- return minicache_address;5151-}5252-5353-static int __init minicache_init(void)5454-{5555- pgd_t *pgd;5656- pmd_t *pmd;5757-5858- spin_lock(&init_mm.page_table_lock);5959-6060- pgd = pgd_offset_k(minicache_address);6161- pmd = pmd_alloc(&init_mm, pgd, minicache_address);6262- if (!pmd)6363- BUG();6464- minicache_pte = pte_alloc_kernel(&init_mm, pmd, minicache_address);6565- if (!minicache_pte)6666- BUG();6767-6868- spin_unlock(&init_mm.page_table_lock);6969-7070- return 0;7171-}7272-7373-core_initcall(minicache_init);
+1-1
arch/i386/kernel/Makefile
···4343# Note: kbuild does not track this dependency due to usage of .incbin4444$(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so4545targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so)4646-targets += vsyscall.lds4646+targets += vsyscall-note.o vsyscall.lds47474848# The DSO images are built using a special linker script.4949quiet_cmd_syscall = SYSCALL $@
+6-4
arch/ia64/kernel/module.c
···825825 * XXX Should have an arch-hook for running this after final section826826 * addresses have been selected...827827 */828828- /* See if gp can cover the entire core module: */829829- uint64_t gp = (uint64_t) mod->module_core + MAX_LTOFF / 2;830830- if (mod->core_size >= MAX_LTOFF)828828+ uint64_t gp;829829+ if (mod->core_size > MAX_LTOFF)831830 /*832831 * This takes advantage of fact that SHF_ARCH_SMALL gets allocated833832 * at the end of the module.834833 */835835- gp = (uint64_t) mod->module_core + mod->core_size - MAX_LTOFF / 2;834834+ gp = mod->core_size - MAX_LTOFF / 2;835835+ else836836+ gp = mod->core_size / 2;837837+ gp = (uint64_t) mod->module_core + ((gp + 7) & -8);836838 mod->arch.gp = gp;837839 DEBUGP("%s: placing gp at 0x%lx\n", __FUNCTION__, gp);838840 }
+6
arch/ia64/kernel/ptrace.c
···635635{636636 struct ia64_psr *psr = ia64_psr(ia64_task_regs(task));637637638638+ /*639639+ * Prevent migrating this task while640640+ * we're fiddling with the FPU state641641+ */642642+ preempt_disable();638643 if (ia64_is_local_fpu_owner(task) && psr->mfh) {639644 psr->mfh = 0;640645 task->thread.flags |= IA64_THREAD_FPH_VALID;641646 ia64_save_fpu(&task->thread.fph[0]);642647 }648648+ preempt_enable();643649}644650645651/*
+2-1
arch/ia64/kernel/setup.c
···720720 ia64_set_kr(IA64_KR_PT_BASE, __pa(ia64_imva(empty_zero_page)));721721722722 /*723723- * Initialize default control register to defer all speculative faults. The723723+ * Initialize default control register to defer speculative faults except724724+ * for those arising from TLB misses, which are not deferred. The724725 * kernel MUST NOT depend on a particular setting of these bits (in other words,725726 * the kernel must have recovery code for all speculative accesses). Turn on726727 * dcr.lc as per recommendation by the architecture team. Most IA-32 apps
+28-1
arch/ia64/kernel/traps.c
···111111 siginfo_t siginfo;112112 int sig, code;113113114114+ /* break.b always sets cr.iim to 0, which causes problems for115115+ * debuggers. Get the real break number from the original instruction,116116+ * but only for kernel code. User space break.b is left alone, to117117+ * preserve the existing behaviour. All break codings have the same118118+ * format, so there is no need to check the slot type.119119+ */120120+ if (break_num == 0 && !user_mode(regs)) {121121+ struct ia64_psr *ipsr = ia64_psr(regs);122122+ unsigned long *bundle = (unsigned long *)regs->cr_iip;123123+ unsigned long slot;124124+ switch (ipsr->ri) {125125+ case 0: slot = (bundle[0] >> 5); break;126126+ case 1: slot = (bundle[0] >> 46) | (bundle[1] << 18); break;127127+ default: slot = (bundle[1] >> 23); break;128128+ }129129+ break_num = ((slot >> 36 & 1) << 20) | (slot >> 6 & 0xfffff);130130+ }131131+114132 /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */115133 siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri);116134 siginfo.si_imm = break_num;···220202221203 /* first, grant user-level access to fph partition: */222204 psr->dfh = 0;205205+206206+ /*207207+ * Make sure that no other task gets in on this processor208208+ * while we're claiming the FPU209209+ */210210+ preempt_disable();223211#ifndef CONFIG_SMP224212 {225213 struct task_struct *fpu_owner226214 = (struct task_struct *)ia64_get_kr(IA64_KR_FPU_OWNER);227215228228- if (ia64_is_local_fpu_owner(current))216216+ if (ia64_is_local_fpu_owner(current)) {217217+ preempt_enable_no_resched();229218 return;219219+ }230220231221 if (fpu_owner)232222 ia64_flush_fph(fpu_owner);···252226 */253227 psr->mfh = 1;254228 }229229+ preempt_enable_no_resched();255230}256231257232static inline int
+17-2
arch/ia64/mm/init.c
···305305 struct page *page;306306307307 /*308308- * Map the gate page twice: once read-only to export the ELF headers etc. and once309309- * execute-only page to enable privilege-promotion via "epc":308308+ * Map the gate page twice: once read-only to export the ELF309309+ * headers etc. and once execute-only page to enable310310+ * privilege-promotion via "epc":310311 */311312 page = virt_to_page(ia64_imva(__start_gate_section));312313 put_kernel_page(page, GATE_ADDR, PAGE_READONLY);···316315 put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE);317316#else318317 put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE);318318+ /* Fill in the holes (if any) with read-only zero pages: */319319+ {320320+ unsigned long addr;321321+322322+ for (addr = GATE_ADDR + PAGE_SIZE;323323+ addr < GATE_ADDR + PERCPU_PAGE_SIZE;324324+ addr += PAGE_SIZE)325325+ {326326+ put_kernel_page(ZERO_PAGE(0), addr,327327+ PAGE_READONLY);328328+ put_kernel_page(ZERO_PAGE(0), addr + PERCPU_PAGE_SIZE,329329+ PAGE_READONLY);330330+ }331331+ }319332#endif320333 ia64_patch_gate();321334}
+2-2
arch/ia64/sn/kernel/setup.c
···222222223223extern int platform_intr_list[];224224extern nasid_t master_nasid;225225-static int shub_1_1_found __initdata;225225+static int __initdata shub_1_1_found = 0;226226227227/*228228 * sn_check_for_wars···251251 } else {252252 for_each_online_node(cnode) {253253 if (is_shub_1_1(cnodeid_to_nasid(cnode)))254254- sn_hub_info->shub_1_1_found = 1;254254+ shub_1_1_found = 1;255255 }256256 }257257}
···619619_GLOBAL(flush_icache_range)620620BEGIN_FTR_SECTION621621 blr /* for 601, do nothing */622622-END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE)622622+END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)623623 li r5,L1_CACHE_LINE_SIZE-1624624 andc r3,r3,r5625625 subf r4,r3,r4···736736_GLOBAL(__flush_dcache_icache)737737BEGIN_FTR_SECTION738738 blr /* for 601, do nothing */739739-END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE)739739+END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)740740 rlwinm r3,r3,0,0,19 /* Get page base address */741741 li r4,4096/L1_CACHE_LINE_SIZE /* Number of lines in a page */742742 mtctr r4···764764_GLOBAL(__flush_dcache_icache_phys)765765BEGIN_FTR_SECTION766766 blr /* for 601, do nothing */767767-END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE)767767+END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)768768 mfmsr r10769769 rlwinm r0,r10,0,28,26 /* clear DR */770770 mtmsr r0
+22-6
arch/ppc64/boot/prom.c
···1111#include <linux/string.h>1212#include <linux/ctype.h>13131414+extern __u32 __div64_32(unsigned long long *dividend, __u32 divisor);1515+1616+/* The unnecessary pointer compare is there1717+ * to check for type safety (n must be 64bit)1818+ */1919+# define do_div(n,base) ({ \2020+ __u32 __base = (base); \2121+ __u32 __rem; \2222+ (void)(((typeof((n)) *)0) == ((unsigned long long *)0)); \2323+ if (((n) >> 32) == 0) { \2424+ __rem = (__u32)(n) % __base; \2525+ (n) = (__u32)(n) / __base; \2626+ } else \2727+ __rem = __div64_32(&(n), __base); \2828+ __rem; \2929+ })3030+1431int (*prom)(void *);15321633void *chosen_handle;···369352#define SPECIAL 32 /* 0x */370353#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */371354372372-static char * number(char * str, long num, int base, int size, int precision, int type)355355+static char * number(char * str, unsigned long long num, int base, int size, int precision, int type)373356{374357 char c,sign,tmp[66];375358 const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";···384367 c = (type & ZEROPAD) ? '0' : ' ';385368 sign = 0;386369 if (type & SIGN) {387387- if (num < 0) {370370+ if ((signed long long)num < 0) {388371 sign = '-';389389- num = -num;372372+ num = - (signed long long)num;390373 size--;391374 } else if (type & PLUS) {392375 sign = '+';···406389 if (num == 0)407390 tmp[i++]='0';408391 else while (num != 0) {409409- tmp[i++] = digits[num % base];410410- num /= base;392392+ tmp[i++] = digits[do_div(num, base)];411393 }412394 if (i > precision)413395 precision = i;···442426int vsprintf(char *buf, const char *fmt, va_list args)443427{444428 int len;445445- unsigned long num;429429+ unsigned long long num;446430 int i, base;447431 char * str;448432 const char *s;
+10-8
arch/ppc64/kernel/kprobes.c
···45454646int arch_prepare_kprobe(struct kprobe *p)4747{4848+ int ret = 0;4849 kprobe_opcode_t insn = *p->addr;49505050- if (IS_MTMSRD(insn) || IS_RFID(insn))5151- /* cannot put bp on RFID/MTMSRD */5252- return 1;5353- return 0;5151+ if ((unsigned long)p->addr & 0x03) {5252+ printk("Attempt to register kprobe at an unaligned address\n");5353+ ret = -EINVAL;5454+ } else if (IS_MTMSRD(insn) || IS_RFID(insn)) {5555+ printk("Cannot register a kprobe on rfid or mtmsrd\n");5656+ ret = -EINVAL;5757+ }5858+ return ret;5459}55605661void arch_copy_kprobe(struct kprobe *p)···177172 ret = emulate_step(regs, p->ainsn.insn[0]);178173 if (ret == 0)179174 regs->nip = (unsigned long)p->addr + 4;180180-181181- regs->msr &= ~MSR_SE;182175}183176184177static inline int post_kprobe_handler(struct pt_regs *regs)···213210214211 if (kprobe_status & KPROBE_HIT_SS) {215212 resume_execution(current_kprobe, regs);213213+ regs->msr &= ~MSR_SE;216214 regs->msr |= kprobe_saved_msr;217215218216 unlock_kprobes();···237233 */238234 preempt_disable();239235 switch (val) {240240- case DIE_IABR_MATCH:241241- case DIE_DABR_MATCH:242236 case DIE_BPT:243237 if (kprobe_handler(args->regs))244238 ret = NOTIFY_STOP;
···791791}792792793793794794-asmlinkage int ppc64_newuname(struct new_utsname __user * name)795795-{796796- int errno = sys_newuname(name);797797-798798- if (current->personality == PER_LINUX32 && !errno) {799799- if(copy_to_user(name->machine, "ppc\0\0", 8)) {800800- errno = -EFAULT;801801- }802802- }803803- return errno;804804-}805805-806806-asmlinkage int ppc64_personality(unsigned long personality)807807-{808808- int ret;809809- if (current->personality == PER_LINUX32 && personality == PER_LINUX)810810- personality = PER_LINUX32;811811- ret = sys_personality(personality);812812- if (ret == PER_LINUX32)813813- ret = PER_LINUX;814814- return ret;815815-}816816-817817-818818-819794/* Note: it is necessary to treat mode as an unsigned int,820795 * with the corresponding cast to a signed int to insure that the 821796 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)···11331158}11341159#endif1135116011611161+asmlinkage int sys32_uname(struct old_utsname __user * name)11621162+{11631163+ int err = 0;11641164+11651165+ down_read(&uts_sem);11661166+ if (copy_to_user(name, &system_utsname, sizeof(*name)))11671167+ err = -EFAULT;11681168+ up_read(&uts_sem);11691169+ if (!err && personality(current->personality) == PER_LINUX32) {11701170+ /* change "ppc64" to "ppc" */11711171+ if (__put_user(0, name->machine + 3)11721172+ || __put_user(0, name->machine + 4))11731173+ err = -EFAULT;11741174+ }11751175+ return err;11761176+}11771177+11361178asmlinkage int sys32_olduname(struct oldold_utsname __user * name)11371179{11381180 int error;11391139-11401140- if (!name)11411141- return -EFAULT;11811181+11421182 if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))11431183 return -EFAULT;1144118411451185 down_read(&uts_sem);11461186 error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN);11471147- error -= __put_user(0,name->sysname+__OLD_UTS_LEN);11481148- error -= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);11491149- error -= __put_user(0,name->nodename+__OLD_UTS_LEN);11501150- error -= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);11511151- error -= __put_user(0,name->release+__OLD_UTS_LEN);11521152- error -= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);11531153- error -= __put_user(0,name->version+__OLD_UTS_LEN);11541154- error -= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);11551155- error = __put_user(0,name->machine+__OLD_UTS_LEN);11871187+ error |= __put_user(0,name->sysname+__OLD_UTS_LEN);11881188+ error |= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);11891189+ error |= __put_user(0,name->nodename+__OLD_UTS_LEN);11901190+ error |= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);11911191+ error |= __put_user(0,name->release+__OLD_UTS_LEN);11921192+ error |= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);11931193+ error |= __put_user(0,name->version+__OLD_UTS_LEN);11941194+ error |= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);11951195+ error |= __put_user(0,name->machine+__OLD_UTS_LEN);11961196+ if (personality(current->personality) == PER_LINUX32) {11971197+ /* change "ppc64" to "ppc" */11981198+ error |= __put_user(0, name->machine + 3);11991199+ error |= __put_user(0, name->machine + 4);12001200+ }12011201+11561202 up_read(&uts_sem);1157120311581204 error = error ? -EFAULT : 0;
+22-13
arch/ppc64/kernel/syscalls.c
···199199 return ret;200200}201201202202-static int __init set_fakeppc(char *str)202202+long ppc64_personality(unsigned long personality)203203{204204- if (*str)205205- return 0;206206- init_task.personality = PER_LINUX32;207207- return 1;208208-}209209-__setup("fakeppc", set_fakeppc);204204+ long ret;210205211211-asmlinkage int sys_uname(struct old_utsname __user * name)206206+ if (personality(current->personality) == PER_LINUX32207207+ && personality == PER_LINUX)208208+ personality = PER_LINUX32;209209+ ret = sys_personality(personality);210210+ if (ret == PER_LINUX32)211211+ ret = PER_LINUX;212212+ return ret;213213+}214214+215215+long ppc64_newuname(struct new_utsname __user * name)212216{213213- int err = -EFAULT;214214-217217+ int err = 0;218218+215219 down_read(&uts_sem);216216- if (name && !copy_to_user(name, &system_utsname, sizeof (*name)))217217- err = 0;220220+ if (copy_to_user(name, &system_utsname, sizeof(*name)))221221+ err = -EFAULT;218222 up_read(&uts_sem);219219-223223+ if (!err && personality(current->personality) == PER_LINUX32) {224224+ /* change ppc64 to ppc */225225+ if (__put_user(0, name->machine + 3)226226+ || __put_user(0, name->machine + 4))227227+ err = -EFAULT;228228+ }220229 return err;221230}222231
+6
arch/um/Kconfig_char
···204204 http://sourceforge.net/projects/gkernel/). rngd periodically reads205205 /dev/hwrng and injects the entropy into /dev/random.206206207207+config MMAPPER208208+ tristate "iomem emulation driver"209209+ help210210+ This driver allows a host file to be used as emulated IO memory inside211211+ UML.212212+207213endmenu208214
···1212 char *addr;1313 char *gate_addr;1414 int slave;1515- char ibuf[ENC_BUF_SIZE];1616- char obuf[ENC_BUF_SIZE];1515+ unsigned char ibuf[ENC_BUF_SIZE];1616+ unsigned char obuf[ENC_BUF_SIZE];1717 int more; /* more data: do not read fd until ibuf has been drained */1818 int pos;1919 int esc;
+2-1
arch/um/drivers/slip_proto.h
···1212#define SLIP_ESC_END 0334 /* ESC ESC_END means END 'data' */1313#define SLIP_ESC_ESC 0335 /* ESC ESC_ESC means ESC 'data' */14141515-static inline int slip_unesc(unsigned char c,char *buf,int *pos, int *esc)1515+static inline int slip_unesc(unsigned char c, unsigned char *buf, int *pos,1616+ int *esc)1617{1718 int ret;1819
+2-2
arch/um/drivers/slirp.h
···2424 struct arg_list_dummy_wrapper argw;2525 int pid;2626 int slave;2727- char ibuf[ENC_BUF_SIZE];2828- char obuf[ENC_BUF_SIZE];2727+ unsigned char ibuf[ENC_BUF_SIZE];2828+ unsigned char obuf[ENC_BUF_SIZE];2929 int more; /* more data: do not read fd until ibuf has been drained */3030 int pos;3131 int esc;
···5656 int as_interrupt;57575858 int originating_fd;5959- int originlen;5959+ unsigned int originlen;6060 unsigned char origin[128]; /* sockaddr_un */61616262 struct mconsole_request request;
···136136extern int os_open_file(char *file, struct openflags flags, int mode);137137extern int os_read_file(int fd, void *buf, int len);138138extern int os_write_file(int fd, const void *buf, int count);139139-extern int os_file_size(char *file, long long *size_out);139139+extern int os_file_size(char *file, unsigned long long *size_out);140140extern int os_file_modtime(char *file, unsigned long *modtime);141141extern int os_pipe(int *fd, int stream, int close_on_exec);142142extern int os_set_fd_async(int fd, int owner);
-3
arch/um/include/user_util.h
···4141extern char host_info[];42424343extern char saved_command_line[];4444-extern char command_line[];4545-4646-extern char *tempdir;47444845extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end;4946extern unsigned long _unprotected_end;
+6-1
arch/um/kernel/skas/process_kern.c
···6868 * 0 if it just exits6969 */7070 n = run_kernel_thread(fn, arg, ¤t->thread.exec_buf);7171- if(n == 1)7171+ if(n == 1){7272+ /* Handle any immediate reschedules or signals */7373+ interrupt_end();7274 userspace(¤t->thread.regs.regs);7575+ }7376 else do_exit(0);7477}7578···9996 schedule_tail(current->thread.prev_sched);10097 current->thread.prev_sched = NULL;101989999+ /* Handle any immediate reschedules or signals */100100+ interrupt_end();102101 userspace(¤t->thread.regs.regs);103102}104103
+5-1
arch/um/os-Linux/elf_aux.c
···4545 elf_aux_hwcap = auxv->a_un.a_val;4646 break;4747 case AT_PLATFORM:4848- elf_aux_platform = auxv->a_un.a_ptr;4848+ /* elf.h removed the pointer elements from4949+ * a_un, so we have to use a_val, which is5050+ * all that's left.5151+ */5252+ elf_aux_platform = (char *) auxv->a_un.a_val;4953 break;5054 case AT_PAGESZ:5155 page_size = auxv->a_un.a_val;
+1-1
arch/um/os-Linux/file.c
···363363 (int (*)(int, void *, int)) write, copy_to_user_proc));364364}365365366366-int os_file_size(char *file, long long *size_out)366366+int os_file_size(char *file, unsigned long long *size_out)367367{368368 struct uml_stat buf;369369 int err;
+11-30
arch/x86_64/kernel/aperture.c
···33333434int fix_aperture __initdata = 1;35353636-#define NB_ID_3 (PCI_VENDOR_ID_AMD | (0x1103<<16))3636+/* This code runs before the PCI subsystem is initialized, so just3737+ access the northbridge directly. */37383838-static struct resource aper_res = {3939- .name = "Aperture",4040- .flags = IORESOURCE_MEM,4141-};3939+#define NB_ID_3 (PCI_VENDOR_ID_AMD | (0x1103<<16))42404341static u32 __init allocate_aperture(void) 4442{···5355 aper_size = (32 * 1024 * 1024) << fallback_aper_order; 54565557 /* 5656- * Aperture has to be naturally aligned. This means an 2GB5757- * aperture won't have much chances to find a place in the5858- * lower 4GB of memory. Unfortunately we cannot move it up5959- * because that would make the IOMMU useless.5858+ * Aperture has to be naturally aligned. This means an 2GB aperture won't5959+ * have much chances to find a place in the lower 4GB of memory.6060+ * Unfortunately we cannot move it up because that would make the6161+ * IOMMU useless.6062 */6161-6262- /* First try to find some free unused space */6363- if (!allocate_resource(&iomem_resource, &aper_res,6464- aper_size,6565- 0, 0xffffffff,6666- aper_size,6767- NULL, NULL)) {6868- printk(KERN_INFO "Putting aperture at %lx-%lx\n",6969- aper_res.start, aper_res.end);7070- return aper_res.start;7171- }7272-7373- /* No free space found. Go on to waste some memory... */7463 p = __alloc_bootmem_node(nd0, aper_size, aper_size, 0); 7564 if (!p || __pa(p)+aper_size > 0xffffffff) {7665 printk("Cannot allocate aperture memory hole (%p,%uK)\n",···6681 free_bootmem_node(nd0, (unsigned long)p, aper_size); 6782 return 0;6883 }6969- printk("Mapping aperture over %d KB of precious RAM @ %lx\n",8484+ printk("Mapping aperture over %d KB of RAM @ %lx\n",7085 aper_size >> 10, __pa(p)); 7186 return (u32)__pa(p); 7287}···87102 printk("Aperture from %s pointing to e820 RAM. Ignoring.\n",name);88103 return 0; 89104 } 9090- /* Don't check the resource here because the aperture is usually9191- in an e820 reserved area, and we allocated these earlier. */92105 return 1;93106} 941079595-/*9696- * Find a PCI capability.9797- * This code runs before the PCI subsystem is initialized, so just9898- * access the northbridge directly.9999- */108108+/* Find a PCI capability */100109static __u32 __init find_cap(int num, int slot, int func, int cap) 101110{ 102111 u8 pos;···255276 fallback_aper_force) { 256277 printk("Your BIOS doesn't leave a aperture memory hole\n");257278 printk("Please enable the IOMMU option in the BIOS setup\n");279279+ printk("This costs you %d MB of RAM\n",280280+ 32 << fallback_aper_order);258281259282 aper_order = fallback_aper_order;260283 aper_alloc = allocate_aperture();
···148148 return -ENOMEM;149149 }150150151151- bridge->scratch_page_real = virt_to_phys(addr);151151+ bridge->scratch_page_real = virt_to_gart(addr);152152 bridge->scratch_page =153153 bridge->driver->mask_memory(bridge, bridge->scratch_page_real, 0);154154 }···189189err_out:190190 if (bridge->driver->needs_scratch_page)191191 bridge->driver->agp_destroy_page(192192- phys_to_virt(bridge->scratch_page_real));192192+ gart_to_virt(bridge->scratch_page_real));193193 if (got_gatt)194194 bridge->driver->free_gatt_table(bridge);195195 if (got_keylist) {···214214 if (bridge->driver->agp_destroy_page &&215215 bridge->driver->needs_scratch_page)216216 bridge->driver->agp_destroy_page(217217- phys_to_virt(bridge->scratch_page_real));217217+ gart_to_virt(bridge->scratch_page_real));218218}219219220220/* When we remove the global variable agp_bridge from all drivers
+1-1
drivers/char/agp/efficeon-agp.c
···219219220220 efficeon_private.l1_table[index] = page;221221222222- value = __pa(page) | pati | present | index;222222+ value = virt_to_gart(page) | pati | present | index;223223224224 pci_write_config_dword(agp_bridge->dev,225225 EFFICEON_ATTPAGE, value);
+11-25
drivers/char/agp/generic.c
···153153 }154154 if (curr->page_count != 0) {155155 for (i = 0; i < curr->page_count; i++) {156156- curr->bridge->driver->agp_destroy_page(phys_to_virt(curr->memory[i]));156156+ curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i]));157157 }158158 }159159 agp_free_key(curr->key);···209209 agp_free_memory(new);210210 return NULL;211211 }212212- new->memory[i] = virt_to_phys(addr);212212+ new->memory[i] = virt_to_gart(addr);213213 new->page_count++;214214 }215215 new->bridge = bridge;···295295EXPORT_SYMBOL_GPL(agp_num_entries);296296297297298298-static int check_bridge_mode(struct pci_dev *dev)299299-{300300- u32 agp3;301301- u8 cap_ptr;302302-303303- cap_ptr = pci_find_capability(dev, PCI_CAP_ID_AGP);304304- pci_read_config_dword(dev, cap_ptr+AGPSTAT, &agp3);305305- if (agp3 & AGPSTAT_MODE_3_0)306306- return 1;307307- return 0;308308-}309309-310310-311298/**312299 * agp_copy_info - copy bridge state information313300 *···315328 info->version.minor = bridge->version->minor;316329 info->chipset = SUPPORTED;317330 info->device = bridge->dev;318318- if (check_bridge_mode(bridge->dev))331331+ if (bridge->mode & AGPSTAT_MODE_3_0)319332 info->mode = bridge->mode & ~AGP3_RESERVED_MASK;320333 else321334 info->mode = bridge->mode & ~AGP2_RESERVED_MASK;···648661 bridge_agpstat &= ~AGPSTAT_FW;649662650663 /* Check to see if we are operating in 3.0 mode */651651- if (check_bridge_mode(agp_bridge->dev))664664+ if (agp_bridge->mode & AGPSTAT_MODE_3_0)652665 agp_v3_parse_one(&requested_mode, &bridge_agpstat, &vga_agpstat);653666 else654667 agp_v2_parse_one(&requested_mode, &bridge_agpstat, &vga_agpstat);···719732720733 /* Do AGP version specific frobbing. */721734 if (bridge->major_version >= 3) {722722- if (check_bridge_mode(bridge->dev)) {735735+ if (bridge->mode & AGPSTAT_MODE_3_0) {723736 /* If we have 3.5, we can do the isoch stuff. */724737 if (bridge->minor_version >= 5)725738 agp_3_5_enable(bridge);···793806 break;794807 }795808796796- table = (char *) __get_free_pages(GFP_KERNEL,797797- page_order);809809+ table = alloc_gatt_pages(page_order);798810799811 if (table == NULL) {800812 i++;···824838 size = ((struct aper_size_info_fixed *) temp)->size;825839 page_order = ((struct aper_size_info_fixed *) temp)->page_order;826840 num_entries = ((struct aper_size_info_fixed *) temp)->num_entries;827827- table = (char *) __get_free_pages(GFP_KERNEL, page_order);841841+ table = alloc_gatt_pages(page_order);828842 }829843830844 if (table == NULL)···839853 agp_gatt_table = (void *)table;840854841855 bridge->driver->cache_flush();842842- bridge->gatt_table = ioremap_nocache(virt_to_phys(table),856856+ bridge->gatt_table = ioremap_nocache(virt_to_gart(table),843857 (PAGE_SIZE * (1 << page_order)));844858 bridge->driver->cache_flush();845859···847861 for (page = virt_to_page(table); page <= virt_to_page(table_end); page++)848862 ClearPageReserved(page);849863850850- free_pages((unsigned long) table, page_order);864864+ free_gatt_pages(table, page_order);851865852866 return -ENOMEM;853867 }854854- bridge->gatt_bus_addr = virt_to_phys(bridge->gatt_table_real);868868+ bridge->gatt_bus_addr = virt_to_gart(bridge->gatt_table_real);855869856870 /* AK: bogus, should encode addresses > 4GB */857871 for (i = 0; i < num_entries; i++) {···905919 for (page = virt_to_page(table); page <= virt_to_page(table_end); page++)906920 ClearPageReserved(page);907921908908- free_pages((unsigned long) bridge->gatt_table_real, page_order);922922+ free_gatt_pages(bridge->gatt_table_real, page_order);909923910924 agp_gatt_table = NULL;911925 bridge->gatt_table = NULL;
···286286 if (new == NULL)287287 return NULL;288288289289- new->memory[0] = virt_to_phys(addr);289289+ new->memory[0] = virt_to_gart(addr);290290 if (pg_count == 4) {291291 /* kludge to get 4 physical pages for ARGB cursor */292292 new->memory[1] = new->memory[0] + PAGE_SIZE;···329329 agp_free_key(curr->key);330330 if(curr->type == AGP_PHYS_MEMORY) {331331 if (curr->page_count == 4)332332- i8xx_destroy_pages(phys_to_virt(curr->memory[0]));332332+ i8xx_destroy_pages(gart_to_virt(curr->memory[0]));333333 else334334 agp_bridge->driver->agp_destroy_page(335335- phys_to_virt(curr->memory[0]));335335+ gart_to_virt(curr->memory[0]));336336 vfree(curr->memory);337337 }338338 kfree(curr);···418418 case I915_GMCH_GMS_STOLEN_48M:419419 /* Check it's really I915G */420420 if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB ||421421- agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB)421421+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB ||422422+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB)422423 gtt_entries = MB(48) - KB(size);423424 else424425 gtt_entries = 0;···427426 case I915_GMCH_GMS_STOLEN_64M:428427 /* Check it's really I915G */429428 if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB ||430430- agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB)429429+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB ||430430+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB)431431 gtt_entries = MB(64) - KB(size);432432 else433433 gtt_entries = 0;···16641662 }16651663 name = "915GM";16661664 break;16651665+ case PCI_DEVICE_ID_INTEL_82945G_HB:16661666+ if (find_i830(PCI_DEVICE_ID_INTEL_82945G_IG)) {16671667+ bridge->driver = &intel_915_driver;16681668+ } else {16691669+ bridge->driver = &intel_845_driver;16701670+ }16711671+ name = "945G";16721672+ break;16671673 case PCI_DEVICE_ID_INTEL_7505_0:16681674 bridge->driver = &intel_7505_driver;16691675 name = "E7505";···18111801 ID(PCI_DEVICE_ID_INTEL_7205_0),18121802 ID(PCI_DEVICE_ID_INTEL_82915G_HB),18131803 ID(PCI_DEVICE_ID_INTEL_82915GM_HB),18041804+ ID(PCI_DEVICE_ID_INTEL_82945G_HB),18141805 { }18151806};18161807
+9-3
drivers/char/agp/sgi-agp.c
···133133 off_t j;134134 void *temp;135135 struct agp_bridge_data *bridge;136136+ u64 *table;136137137138 bridge = mem->bridge;138139 if (!bridge)139140 return -EINVAL;141141+142142+ table = (u64 *)bridge->gatt_table;140143141144 temp = bridge->current_size;142145···178175 j = pg_start;179176180177 while (j < (pg_start + mem->page_count)) {181181- if (*(bridge->gatt_table + j))178178+ if (table[j])182179 return -EBUSY;183180 j++;184181 }···189186 }190187191188 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {192192- *(bridge->gatt_table + j) =189189+ table[j] =193190 bridge->driver->mask_memory(bridge, mem->memory[i],194191 mem->type);195192 }···203200{204201 size_t i;205202 struct agp_bridge_data *bridge;203203+ u64 *table;206204207205 bridge = mem->bridge;208206 if (!bridge)···213209 return -EINVAL;214210 }215211212212+ table = (u64 *)bridge->gatt_table;213213+216214 for (i = pg_start; i < (mem->page_count + pg_start); i++) {217217- *(bridge->gatt_table + i) = 0;215215+ table[i] = 0;218216 }219217220218 bridge->driver->tlb_flush(mem);
+4-4
drivers/char/agp/sworks-agp.c
···5151 }5252 SetPageReserved(virt_to_page(page_map->real));5353 global_cache_flush();5454- page_map->remapped = ioremap_nocache(virt_to_phys(page_map->real), 5454+ page_map->remapped = ioremap_nocache(virt_to_gart(page_map->real),5555 PAGE_SIZE);5656 if (page_map->remapped == NULL) {5757 ClearPageReserved(virt_to_page(page_map->real));···162162 /* Create a fake scratch directory */163163 for(i = 0; i < 1024; i++) {164164 writel(agp_bridge->scratch_page, serverworks_private.scratch_dir.remapped+i);165165- writel(virt_to_phys(serverworks_private.scratch_dir.real) | 1, page_dir.remapped+i);165165+ writel(virt_to_gart(serverworks_private.scratch_dir.real) | 1, page_dir.remapped+i);166166 }167167168168 retval = serverworks_create_gatt_pages(value->num_entries / 1024);···174174175175 agp_bridge->gatt_table_real = (u32 *)page_dir.real;176176 agp_bridge->gatt_table = (u32 __iomem *)page_dir.remapped;177177- agp_bridge->gatt_bus_addr = virt_to_phys(page_dir.real);177177+ agp_bridge->gatt_bus_addr = virt_to_gart(page_dir.real);178178179179 /* Get the address for the gart region.180180 * This is a bus address even on the alpha, b/c its···187187 /* Calculate the agp offset */ 188188189189 for(i = 0; i < value->num_entries / 1024; i++)190190- writel(virt_to_phys(serverworks_private.gatt_pages[i]->real)|1, page_dir.remapped+i);190190+ writel(virt_to_gart(serverworks_private.gatt_pages[i]->real)|1, page_dir.remapped+i);191191192192 return 0;193193}
+1-1
drivers/char/agp/uninorth-agp.c
···407407408408 bridge->gatt_table_real = (u32 *) table;409409 bridge->gatt_table = (u32 *)table;410410- bridge->gatt_bus_addr = virt_to_phys(table);410410+ bridge->gatt_bus_addr = virt_to_gart(table);411411412412 for (i = 0; i < num_entries; i++)413413 bridge->gatt_table[i] = 0;
+13-25
drivers/char/mxser.c
···19951995 unsigned char ch, gdl;19961996 int ignored = 0;19971997 int cnt = 0;19981998- unsigned char *cp;19991999- char *fp;20002000- int count;20011998 int recv_room;20021999 int max = 256;20032000 unsigned long flags;···20072010 mxser_stoprx(tty);20082011 //return;20092012 }20102010-20112011- cp = tty->flip.char_buf;20122012- fp = tty->flip.flag_buf;20132013- count = 0;2014201320152014 // following add by Victor Yu. 09-02-200220162015 if (info->IsMoxaMustChipFlag != MOXA_OTHER_UART) {···20342041 }20352042 while (gdl--) {20362043 ch = inb(info->base + UART_RX);20372037- count++;20382038- *cp++ = ch;20392039- *fp++ = 0;20442044+ tty_insert_flip_char(tty, ch, 0);20402045 cnt++;20412046 /*20422042- if((count>=HI_WATER) && (info->stop_rx==0)){20472047+ if((cnt>=HI_WATER) && (info->stop_rx==0)){20432048 mxser_stoprx(tty);20442049 info->stop_rx=1;20452050 break;···20522061 if (max-- < 0)20532062 break;20542063 /*20552055- if((count>=HI_WATER) && (info->stop_rx==0)){20642064+ if((cnt>=HI_WATER) && (info->stop_rx==0)){20562065 mxser_stoprx(tty);20572066 info->stop_rx=1;20582067 break;···20692078 if (++ignored > 100)20702079 break;20712080 } else {20722072- count++;20812081+ char flag = 0;20732082 if (*status & UART_LSR_SPECIAL) {20742083 if (*status & UART_LSR_BI) {20752075- *fp++ = TTY_BREAK;20842084+ flag = TTY_BREAK;20762085/* added by casper 1/11/2000 */20772086 info->icount.brk++;20782078-20792087/* */20802088 if (info->flags & ASYNC_SAK)20812089 do_SAK(tty);20822090 } else if (*status & UART_LSR_PE) {20832083- *fp++ = TTY_PARITY;20912091+ flag = TTY_PARITY;20842092/* added by casper 1/11/2000 */20852093 info->icount.parity++;20862094/* */20872095 } else if (*status & UART_LSR_FE) {20882088- *fp++ = TTY_FRAME;20962096+ flag = TTY_FRAME;20892097/* added by casper 1/11/2000 */20902098 info->icount.frame++;20912099/* */20922100 } else if (*status & UART_LSR_OE) {20932093- *fp++ = TTY_OVERRUN;21012101+ flag = TTY_OVERRUN;20942102/* added by casper 1/11/2000 */20952103 info->icount.overrun++;20962104/* */20972097- } else20982098- *fp++ = 0;20992099- } else21002100- *fp++ = 0;21012101- *cp++ = ch;21052105+ }21062106+ }21072107+ tty_insert_flip_char(tty, ch, flag);21022108 cnt++;21032109 if (cnt >= recv_room) {21042110 if (!info->ldisc_stop_rx) {···21202132 // above add by Victor Yu. 09-02-200221212133 } while (*status & UART_LSR_DR);2122213421232123- end_intr: // add by Victor Yu. 09-02-200221352135+end_intr: // add by Victor Yu. 09-02-20022124213621252137 mxvar_log.rxcnt[info->port] += cnt;21262138 info->mon_data.rxcnt += cnt;21272139 info->mon_data.up_rxcnt += cnt;21282140 spin_unlock_irqrestore(&info->slock, flags);21292129-21412141+21302142 tty_flip_buffer_push(tty);21312143}21322144
+1-1
drivers/input/keyboard/atkbd.c
···5454module_param_named(softraw, atkbd_softraw, bool, 0);5555MODULE_PARM_DESC(softraw, "Use software generated rawmode");56565757-static int atkbd_scroll = 1;5757+static int atkbd_scroll = 0;5858module_param_named(scroll, atkbd_scroll, bool, 0);5959MODULE_PARM_DESC(scroll, "Enable scroll-wheel on MS Office and similar keyboards");6060
+3
drivers/md/dm-mpath.c
···985985 if (!error)986986 return 0; /* I/O complete */987987988988+ if ((error == -EWOULDBLOCK) && bio_rw_ahead(bio))989989+ return error;990990+988991 spin_lock(&m->lock);989992 if (!m->nr_valid_paths) {990993 if (!m->queue_if_no_path || m->suspended) {
+34-5
drivers/net/tg3.c
···77 * Copyright (C) 2005 Broadcom Corporation.88 *99 * Firmware is:1010- * Copyright (C) 2000-2003 Broadcom Corporation.1010+ * Derived from proprietary unpublished source code,1111+ * Copyright (C) 2000-2003 Broadcom Corporation.1212+ *1313+ * Permission is hereby granted for the distribution of this firmware1414+ * data in hexadecimal or equivalent format, provided this copyright1515+ * notice is accompanying it.1116 */12171318#include <linux/config.h>···66616762#define DRV_MODULE_NAME "tg3"6863#define PFX DRV_MODULE_NAME ": "6969-#define DRV_MODULE_VERSION "3.29"7070-#define DRV_MODULE_RELDATE "May 23, 2005"6464+#define DRV_MODULE_VERSION "3.31"6565+#define DRV_MODULE_RELDATE "June 8, 2005"71667267#define TG3_DEF_MAC_MODE 07368#define TG3_DEF_RX_MODE 0···8560855585618556 case NIC_SRAM_DATA_CFG_LED_MODE_MAC:85628557 tp->led_ctrl = LED_CTRL_MODE_MAC;85588558+85598559+ /* Default to PHY_1_MODE if 0 (MAC_MODE) is85608560+ * read on some older 5700/5701 bootcode.85618561+ */85628562+ if (GET_ASIC_REV(tp->pci_chip_rev_id) ==85638563+ ASIC_REV_5700 ||85648564+ GET_ASIC_REV(tp->pci_chip_rev_id) ==85658565+ ASIC_REV_5701)85668566+ tp->led_ctrl = LED_CTRL_MODE_PHY_1;85678567+85638568 break;8564856985658570 case SHASTA_EXT_LED_SHARED:···96959680 }96969681 if ((tp->dma_rwctrl & DMA_RWCTRL_WRITE_BNDRY_MASK) !=96979682 DMA_RWCTRL_WRITE_BNDRY_16) {96839683+ static struct pci_device_id dma_wait_state_chipsets[] = {96849684+ { PCI_DEVICE(PCI_VENDOR_ID_APPLE,96859685+ PCI_DEVICE_ID_APPLE_UNI_N_PCI15) },96869686+ { },96879687+ };96889688+96989689 /* DMA test passed without adjusting DMA boundary,96999699- * just restore the calculated DMA boundary96909690+ * now look for chipsets that are known to expose the96919691+ * DMA bug without failing the test.97009692 */97019701- tp->dma_rwctrl = saved_dma_rwctrl;96939693+ if (pci_dev_present(dma_wait_state_chipsets)) {96949694+ tp->dma_rwctrl &= ~DMA_RWCTRL_WRITE_BNDRY_MASK;96959695+ tp->dma_rwctrl |= DMA_RWCTRL_WRITE_BNDRY_16;96969696+ }96979697+ else96989698+ /* Safe to use the calculated DMA boundary. */96999699+ tp->dma_rwctrl = saved_dma_rwctrl;97009700+97029701 tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl);97039702 }97049703
+2
drivers/pci/hotplug/cpci_hotplug_core.c
···217217 kfree(slot->hotplug_slot->info);218218 kfree(slot->hotplug_slot->name);219219 kfree(slot->hotplug_slot);220220+ if (slot->dev)221221+ pci_dev_put(slot->dev);220222 kfree(slot);221223}222224
···460460461461462462/*463463- * Via 686A/B: The PCI_INTERRUPT_LINE register for the on-chip464464- * devices, USB0/1, AC97, MC97, and ACPI, has an unusual feature:465465- * when written, it makes an internal connection to the PIC.466466- * For these devices, this register is defined to be 4 bits wide.467467- * Normally this is fine. However for IO-APIC motherboards, or468468- * non-x86 architectures (yes Via exists on PPC among other places),469469- * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get470470- * interrupts delivered properly.471471- */472472-473473-/*474463 * FIXME: it is questionable that quirk_via_acpi475464 * is needed. It shows up as an ISA bridge, and does not476465 * support the PCI_INTERRUPT_LINE register at all. Therefore···481492DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_acpi );482493DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_acpi );483494484484-static void quirk_via_irqpic(struct pci_dev *dev)495495+/*496496+ * Via 686A/B: The PCI_INTERRUPT_LINE register for the on-chip497497+ * devices, USB0/1, AC97, MC97, and ACPI, has an unusual feature:498498+ * when written, it makes an internal connection to the PIC.499499+ * For these devices, this register is defined to be 4 bits wide.500500+ * Normally this is fine. However for IO-APIC motherboards, or501501+ * non-x86 architectures (yes Via exists on PPC among other places),502502+ * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get503503+ * interrupts delivered properly.504504+ */505505+static void quirk_via_irq(struct pci_dev *dev)485506{486507 u8 irq, new_irq;487508488488-#ifdef CONFIG_X86_IO_APIC489489- if (nr_ioapics && !skip_ioapic_setup)490490- return;491491-#endif492492-#ifdef CONFIG_ACPI493493- if (acpi_irq_model != ACPI_IRQ_MODEL_PIC)494494- return;495495-#endif496509 new_irq = dev->irq & 0xf;497510 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);498511 if (new_irq != irq) {499499- printk(KERN_INFO "PCI: Via PIC IRQ fixup for %s, from %d to %d\n",512512+ printk(KERN_INFO "PCI: Via IRQ fixup for %s, from %d to %d\n",500513 pci_name(dev), irq, new_irq);501514 udelay(15); /* unknown if delay really needed */502515 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);503516 }504517}505505-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irqpic);518518+DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq);506519507520/*508521 * PIIX3 USB: We have to disable USB interrupts that are
···197197sa1100_rx_chars(struct sa1100_port *sport, struct pt_regs *regs)198198{199199 struct tty_struct *tty = sport->port.info->tty;200200- unsigned int status, ch, flg, ignored = 0;200200+ unsigned int status, ch, flg;201201202202 status = UTSR1_TO_SM(UART_GET_UTSR1(sport)) |203203 UTSR0_TO_SM(UART_GET_UTSR0(sport));
+91-27
drivers/usb/serial/ftdi_sio.c
···264264/*265265 * Version Information266266 */267267-#define DRIVER_VERSION "v1.4.1"267267+#define DRIVER_VERSION "v1.4.2"268268#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, Kuba Ober <kuba@mareimbrium.org>"269269#define DRIVER_DESC "USB FTDI Serial Converters Driver"270270···687687 char prev_status, diff_status; /* Used for TIOCMIWAIT */688688 __u8 rx_flags; /* receive state flags (throttling) */689689 spinlock_t rx_lock; /* spinlock for receive state */690690+ struct work_struct rx_work;691691+ int rx_processed;690692691693 __u16 interface; /* FT2232C port interface (0 for FT232/245) */692694···719717static int ftdi_chars_in_buffer (struct usb_serial_port *port);720718static void ftdi_write_bulk_callback (struct urb *urb, struct pt_regs *regs);721719static void ftdi_read_bulk_callback (struct urb *urb, struct pt_regs *regs);722722-static void ftdi_process_read (struct usb_serial_port *port);720720+static void ftdi_process_read (void *param);723721static void ftdi_set_termios (struct usb_serial_port *port, struct termios * old);724722static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file);725723static int ftdi_tiocmset (struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear);···13891387 port->read_urb->transfer_buffer_length = BUFSZ;13901388 }1391138913901390+ INIT_WORK(&priv->rx_work, ftdi_process_read, port);13911391+13921392 /* Free port's existing write urb and transfer buffer. */13931393 if (port->write_urb) {13941394 usb_free_urb (port->write_urb);···16211617 spin_unlock_irqrestore(&priv->rx_lock, flags);1622161816231619 /* Start reading from the device */16201620+ priv->rx_processed = 0;16241621 usb_fill_bulk_urb(port->read_urb, dev,16251622 usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress),16261623 port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,···16721667 err("Error from RTS LOW urb");16731668 }16741669 } /* Note change no line if hupcl is off */16701670+16711671+ /* cancel any scheduled reading */16721672+ cancel_delayed_work(&priv->rx_work);16731673+ flush_scheduled_work();1675167416761675 /* shutdown our bulk read */16771676 if (port->read_urb)···18711862 return;18721863 }1873186418741874- /* If throttled, delay receive processing until unthrottled. */18751875- spin_lock(&priv->rx_lock);18761876- if (priv->rx_flags & THROTTLED) {18771877- dbg("Deferring read urb processing until unthrottled");18781878- priv->rx_flags |= ACTUALLY_THROTTLED;18791879- spin_unlock(&priv->rx_lock);18801880- return;18811881- }18821882- spin_unlock(&priv->rx_lock);18831883-18841865 ftdi_process_read(port);1885186618861867} /* ftdi_read_bulk_callback */188718681888186918891889-static void ftdi_process_read (struct usb_serial_port *port)18701870+static void ftdi_process_read (void *param)18901871{ /* ftdi_process_read */18721872+ struct usb_serial_port *port = (struct usb_serial_port*)param;18911873 struct urb *urb;18921874 struct tty_struct *tty;18931875 struct ftdi_private *priv;···18891889 int result;18901890 int need_flip;18911891 int packet_offset;18921892+ unsigned long flags;1892189318931894 dbg("%s - port %d", __FUNCTION__, port->number);18941895···1916191519171916 data = urb->transfer_buffer;1918191719191919- /* The first two bytes of every read packet are status */19201920- if (urb->actual_length > 2) {19211921- usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);19181918+ if (priv->rx_processed) {19191919+ dbg("%s - already processed: %d bytes, %d remain", __FUNCTION__,19201920+ priv->rx_processed,19211921+ urb->actual_length - priv->rx_processed);19221922 } else {19231923- dbg("Status only: %03oo %03oo",data[0],data[1]);19241924- }19231923+ /* The first two bytes of every read packet are status */19241924+ if (urb->actual_length > 2) {19251925+ usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);19261926+ } else {19271927+ dbg("Status only: %03oo %03oo",data[0],data[1]);19281928+ }19291929+ }192519301926193119271932 /* TO DO -- check for hung up line and handle appropriately: */···19361929 /* if CD is dropped and the line is not CLOCAL then we should hangup */1937193019381931 need_flip = 0;19391939- for (packet_offset=0; packet_offset < urb->actual_length; packet_offset += PKTSZ) {19321932+ for (packet_offset = priv->rx_processed; packet_offset < urb->actual_length; packet_offset += PKTSZ) {19331933+ int length;19341934+19401935 /* Compare new line status to the old one, signal if different */19361936+ /* N.B. packet may be processed more than once, but differences19371937+ * are only processed once. */19411938 if (priv != NULL) {19421939 char new_status = data[packet_offset+0] & FTDI_STATUS_B0_MASK;19431940 if (new_status != priv->prev_status) {···19491938 wake_up_interruptible(&priv->delta_msr_wait);19501939 priv->prev_status = new_status;19511940 }19411941+ }19421942+19431943+ length = min(PKTSZ, urb->actual_length-packet_offset)-2;19441944+ if (length < 0) {19451945+ err("%s - bad packet length: %d", __FUNCTION__, length+2);19461946+ length = 0;19471947+ }19481948+19491949+ /* have to make sure we don't overflow the buffer19501950+ with tty_insert_flip_char's */19511951+ if (tty->flip.count+length > TTY_FLIPBUF_SIZE) {19521952+ tty_flip_buffer_push(tty);19531953+ need_flip = 0;19541954+19551955+ if (tty->flip.count != 0) {19561956+ /* flip didn't work, this happens when ftdi_process_read() is19571957+ * called from ftdi_unthrottle, because TTY_DONT_FLIP is set */19581958+ dbg("%s - flip buffer push failed", __FUNCTION__);19591959+ break;19601960+ }19611961+ }19621962+ if (priv->rx_flags & THROTTLED) {19631963+ dbg("%s - throttled", __FUNCTION__);19641964+ break;19651965+ }19661966+ if (tty->ldisc.receive_room(tty)-tty->flip.count < length) {19671967+ /* break out & wait for throttling/unthrottling to happen */19681968+ dbg("%s - receive room low", __FUNCTION__);19691969+ break;19521970 }1953197119541972 /* Handle errors and break */···20021962 error_flag = TTY_FRAME;20031963 dbg("FRAMING error");20041964 }20052005- if (urb->actual_length > packet_offset + 2) {20062006- for (i = 2; (i < PKTSZ) && ((i+packet_offset) < urb->actual_length); ++i) {20072007- /* have to make sure we don't overflow the buffer20082008- with tty_insert_flip_char's */20092009- if(tty->flip.count >= TTY_FLIPBUF_SIZE) {20102010- tty_flip_buffer_push(tty);20112011- }19651965+ if (length > 0) {19661966+ for (i = 2; i < length+2; i++) {20121967 /* Note that the error flag is duplicated for 20131968 every character received since we don't know20141969 which character it applied to */···20392004 if (need_flip) {20402005 tty_flip_buffer_push(tty);20412006 }20072007+20082008+ if (packet_offset < urb->actual_length) {20092009+ /* not completely processed - record progress */20102010+ priv->rx_processed = packet_offset;20112011+ dbg("%s - incomplete, %d bytes processed, %d remain",20122012+ __FUNCTION__, packet_offset,20132013+ urb->actual_length - packet_offset);20142014+ /* check if we were throttled while processing */20152015+ spin_lock_irqsave(&priv->rx_lock, flags);20162016+ if (priv->rx_flags & THROTTLED) {20172017+ priv->rx_flags |= ACTUALLY_THROTTLED;20182018+ spin_unlock_irqrestore(&priv->rx_lock, flags);20192019+ dbg("%s - deferring remainder until unthrottled",20202020+ __FUNCTION__);20212021+ return;20222022+ }20232023+ spin_unlock_irqrestore(&priv->rx_lock, flags);20242024+ /* if the port is closed stop trying to read */20252025+ if (port->open_count > 0){20262026+ /* delay processing of remainder */20272027+ schedule_delayed_work(&priv->rx_work, 1);20282028+ } else {20292029+ dbg("%s - port is closed", __FUNCTION__);20302030+ }20312031+ return;20322032+ }20332033+20342034+ /* urb is completely processed */20352035+ priv->rx_processed = 0;2042203620432037 /* if the port is closed stop trying to read */20442038 if (port->open_count > 0){···25082444 spin_unlock_irqrestore(&priv->rx_lock, flags);2509244525102446 if (actually_throttled)25112511- ftdi_process_read(port);24472447+ schedule_work(&priv->rx_work);25122448}2513244925142450static int __init ftdi_init (void)
···493493 return PTR_ERR(link);494494}495495496496-static inline int __do_follow_link(struct dentry *dentry, struct nameidata *nd)496496+struct path {497497+ struct vfsmount *mnt;498498+ struct dentry *dentry;499499+};500500+501501+static inline int __do_follow_link(struct path *path, struct nameidata *nd)497502{498503 int error;504504+ struct dentry *dentry = path->dentry;499505500500- touch_atime(nd->mnt, dentry);506506+ touch_atime(path->mnt, dentry);501507 nd_set_link(nd, NULL);508508+509509+ if (path->mnt == nd->mnt)510510+ mntget(path->mnt);502511 error = dentry->d_inode->i_op->follow_link(dentry, nd);503512 if (!error) {504513 char *s = nd_get_link(nd);···516507 if (dentry->d_inode->i_op->put_link)517508 dentry->d_inode->i_op->put_link(dentry, nd);518509 }510510+ dput(dentry);511511+ mntput(path->mnt);519512520513 return error;521514}···529518 * Without that kind of total limit, nasty chains of consecutive530519 * symlinks can cause almost arbitrarily long lookups. 531520 */532532-static inline int do_follow_link(struct dentry *dentry, struct nameidata *nd)521521+static inline int do_follow_link(struct path *path, struct nameidata *nd)533522{534523 int err = -ELOOP;535524 if (current->link_count >= MAX_NESTED_LINKS)···538527 goto loop;539528 BUG_ON(nd->depth >= MAX_NESTED_LINKS);540529 cond_resched();541541- err = security_inode_follow_link(dentry, nd);530530+ err = security_inode_follow_link(path->dentry, nd);542531 if (err)543532 goto loop;544533 current->link_count++;545534 current->total_link_count++;546535 nd->depth++;547547- err = __do_follow_link(dentry, nd);536536+ err = __do_follow_link(path, nd);548537 current->link_count--;549538 nd->depth--;550539 return err;551540loop:541541+ dput(path->dentry);542542+ if (path->mnt != nd->mnt)543543+ mntput(path->mnt);552544 path_release(nd);553545 return err;554546}···579565/* no need for dcache_lock, as serialization is taken care in580566 * namespace.c581567 */582582-static int follow_mount(struct vfsmount **mnt, struct dentry **dentry)568568+static int __follow_mount(struct path *path)583569{584570 int res = 0;585585- while (d_mountpoint(*dentry)) {586586- struct vfsmount *mounted = lookup_mnt(*mnt, *dentry);571571+ while (d_mountpoint(path->dentry)) {572572+ struct vfsmount *mounted = lookup_mnt(path->mnt, path->dentry);587573 if (!mounted)588574 break;589589- mntput(*mnt);590590- *mnt = mounted;591591- dput(*dentry);592592- *dentry = dget(mounted->mnt_root);575575+ dput(path->dentry);576576+ if (res)577577+ mntput(path->mnt);578578+ path->mnt = mounted;579579+ path->dentry = dget(mounted->mnt_root);593580 res = 1;594581 }595582 return res;596583}597584585585+static void follow_mount(struct vfsmount **mnt, struct dentry **dentry)586586+{587587+ while (d_mountpoint(*dentry)) {588588+ struct vfsmount *mounted = lookup_mnt(*mnt, *dentry);589589+ if (!mounted)590590+ break;591591+ dput(*dentry);592592+ mntput(*mnt);593593+ *mnt = mounted;594594+ *dentry = dget(mounted->mnt_root);595595+ }596596+}597597+598598/* no need for dcache_lock, as serialization is taken care in599599 * namespace.c600600 */601601-static inline int __follow_down(struct vfsmount **mnt, struct dentry **dentry)601601+int follow_down(struct vfsmount **mnt, struct dentry **dentry)602602{603603 struct vfsmount *mounted;604604605605 mounted = lookup_mnt(*mnt, *dentry);606606 if (mounted) {607607+ dput(*dentry);607608 mntput(*mnt);608609 *mnt = mounted;609609- dput(*dentry);610610 *dentry = dget(mounted->mnt_root);611611 return 1;612612 }613613 return 0;614614}615615616616-int follow_down(struct vfsmount **mnt, struct dentry **dentry)617617-{618618- return __follow_down(mnt,dentry);619619-}620620-621621-static inline void follow_dotdot(struct vfsmount **mnt, struct dentry **dentry)616616+static inline void follow_dotdot(struct nameidata *nd)622617{623618 while(1) {624619 struct vfsmount *parent;625625- struct dentry *old = *dentry;620620+ struct dentry *old = nd->dentry;626621627622 read_lock(¤t->fs->lock);628628- if (*dentry == current->fs->root &&629629- *mnt == current->fs->rootmnt) {623623+ if (nd->dentry == current->fs->root &&624624+ nd->mnt == current->fs->rootmnt) {630625 read_unlock(¤t->fs->lock);631626 break;632627 }633628 read_unlock(¤t->fs->lock);634629 spin_lock(&dcache_lock);635635- if (*dentry != (*mnt)->mnt_root) {636636- *dentry = dget((*dentry)->d_parent);630630+ if (nd->dentry != nd->mnt->mnt_root) {631631+ nd->dentry = dget(nd->dentry->d_parent);637632 spin_unlock(&dcache_lock);638633 dput(old);639634 break;640635 }641636 spin_unlock(&dcache_lock);642637 spin_lock(&vfsmount_lock);643643- parent = (*mnt)->mnt_parent;644644- if (parent == *mnt) {638638+ parent = nd->mnt->mnt_parent;639639+ if (parent == nd->mnt) {645640 spin_unlock(&vfsmount_lock);646641 break;647642 }648643 mntget(parent);649649- *dentry = dget((*mnt)->mnt_mountpoint);644644+ nd->dentry = dget(nd->mnt->mnt_mountpoint);650645 spin_unlock(&vfsmount_lock);651646 dput(old);652652- mntput(*mnt);653653- *mnt = parent;647647+ mntput(nd->mnt);648648+ nd->mnt = parent;654649 }655655- follow_mount(mnt, dentry);650650+ follow_mount(&nd->mnt, &nd->dentry);656651}657657-658658-struct path {659659- struct vfsmount *mnt;660660- struct dentry *dentry;661661-};662652663653/*664654 * It's more convoluted than I'd like it to be, but... it's still fairly···682664done:683665 path->mnt = mnt;684666 path->dentry = dentry;667667+ __follow_mount(path);685668 return 0;686669687670need_lookup:···770751 case 2: 771752 if (this.name[1] != '.')772753 break;773773- follow_dotdot(&nd->mnt, &nd->dentry);754754+ follow_dotdot(nd);774755 inode = nd->dentry->d_inode;775756 /* fallthrough */776757 case 1:···790771 err = do_lookup(nd, &this, &next);791772 if (err)792773 break;793793- /* Check mountpoints.. */794794- follow_mount(&next.mnt, &next.dentry);795774796775 err = -ENOENT;797776 inode = next.dentry->d_inode;···800783 goto out_dput;801784802785 if (inode->i_op->follow_link) {803803- mntget(next.mnt);804804- err = do_follow_link(next.dentry, nd);805805- dput(next.dentry);806806- mntput(next.mnt);786786+ err = do_follow_link(&next, nd);807787 if (err)808788 goto return_err;809789 err = -ENOENT;···812798 break;813799 } else {814800 dput(nd->dentry);801801+ if (nd->mnt != next.mnt)802802+ mntput(nd->mnt);815803 nd->mnt = next.mnt;816804 nd->dentry = next.dentry;817805 }···835819 case 2: 836820 if (this.name[1] != '.')837821 break;838838- follow_dotdot(&nd->mnt, &nd->dentry);822822+ follow_dotdot(nd);839823 inode = nd->dentry->d_inode;840824 /* fallthrough */841825 case 1:···849833 err = do_lookup(nd, &this, &next);850834 if (err)851835 break;852852- follow_mount(&next.mnt, &next.dentry);853836 inode = next.dentry->d_inode;854837 if ((lookup_flags & LOOKUP_FOLLOW)855838 && inode && inode->i_op && inode->i_op->follow_link) {856856- mntget(next.mnt);857857- err = do_follow_link(next.dentry, nd);858858- dput(next.dentry);859859- mntput(next.mnt);839839+ err = do_follow_link(&next, nd);860840 if (err)861841 goto return_err;862842 inode = nd->dentry->d_inode;863843 } else {864844 dput(nd->dentry);845845+ if (nd->mnt != next.mnt)846846+ mntput(nd->mnt);865847 nd->mnt = next.mnt;866848 nd->dentry = next.dentry;867849 }···899885 return 0;900886out_dput:901887 dput(next.dentry);888888+ if (nd->mnt != next.mnt)889889+ mntput(next.mnt);902890 break;903891 }904892 path_release(nd);···14141398int open_namei(const char * pathname, int flag, int mode, struct nameidata *nd)14151399{14161400 int acc_mode, error = 0;14171417- struct dentry *dentry;14011401+ struct path path;14181402 struct dentry *dir;14191403 int count = 0;14201404···14581442 dir = nd->dentry;14591443 nd->flags &= ~LOOKUP_PARENT;14601444 down(&dir->d_inode->i_sem);14611461- dentry = __lookup_hash(&nd->last, nd->dentry, nd);14451445+ path.dentry = __lookup_hash(&nd->last, nd->dentry, nd);14461446+ path.mnt = nd->mnt;1462144714631448do_last:14641464- error = PTR_ERR(dentry);14651465- if (IS_ERR(dentry)) {14491449+ error = PTR_ERR(path.dentry);14501450+ if (IS_ERR(path.dentry)) {14661451 up(&dir->d_inode->i_sem);14671452 goto exit;14681453 }1469145414701455 /* Negative dentry, just create the file */14711471- if (!dentry->d_inode) {14561456+ if (!path.dentry->d_inode) {14721457 if (!IS_POSIXACL(dir->d_inode))14731458 mode &= ~current->fs->umask;14741474- error = vfs_create(dir->d_inode, dentry, mode, nd);14591459+ error = vfs_create(dir->d_inode, path.dentry, mode, nd);14751460 up(&dir->d_inode->i_sem);14761461 dput(nd->dentry);14771477- nd->dentry = dentry;14621462+ nd->dentry = path.dentry;14781463 if (error)14791464 goto exit;14801465 /* Don't check for write permission, don't truncate */···14931476 if (flag & O_EXCL)14941477 goto exit_dput;1495147814961496- if (d_mountpoint(dentry)) {14791479+ if (__follow_mount(&path)) {14971480 error = -ELOOP;14981481 if (flag & O_NOFOLLOW)14991482 goto exit_dput;15001500- while (__follow_down(&nd->mnt,&dentry) && d_mountpoint(dentry));15011483 }15021484 error = -ENOENT;15031503- if (!dentry->d_inode)14851485+ if (!path.dentry->d_inode)15041486 goto exit_dput;15051505- if (dentry->d_inode->i_op && dentry->d_inode->i_op->follow_link)14871487+ if (path.dentry->d_inode->i_op && path.dentry->d_inode->i_op->follow_link)15061488 goto do_link;1507148915081490 dput(nd->dentry);15091509- nd->dentry = dentry;14911491+ nd->dentry = path.dentry;14921492+ if (nd->mnt != path.mnt)14931493+ mntput(nd->mnt);14941494+ nd->mnt = path.mnt;15101495 error = -EISDIR;15111511- if (dentry->d_inode && S_ISDIR(dentry->d_inode->i_mode))14961496+ if (path.dentry->d_inode && S_ISDIR(path.dentry->d_inode->i_mode))15121497 goto exit;15131498ok:15141499 error = may_open(nd, acc_mode, flag);···15191500 return 0;1520150115211502exit_dput:15221522- dput(dentry);15031503+ dput(path.dentry);15041504+ if (nd->mnt != path.mnt)15051505+ mntput(path.mnt);15231506exit:15241507 path_release(nd);15251508 return error;···15411520 * are done. Procfs-like symlinks just set LAST_BIND.15421521 */15431522 nd->flags |= LOOKUP_PARENT;15441544- error = security_inode_follow_link(dentry, nd);15231523+ error = security_inode_follow_link(path.dentry, nd);15451524 if (error)15461525 goto exit_dput;15471547- error = __do_follow_link(dentry, nd);15481548- dput(dentry);15261526+ error = __do_follow_link(&path, nd);15491527 if (error)15501528 return error;15511529 nd->flags &= ~LOOKUP_PARENT;15521552- if (nd->last_type == LAST_BIND) {15531553- dentry = nd->dentry;15301530+ if (nd->last_type == LAST_BIND)15541531 goto ok;15551555- }15561532 error = -EISDIR;15571533 if (nd->last_type != LAST_NORM)15581534 goto exit;···15641546 }15651547 dir = nd->dentry;15661548 down(&dir->d_inode->i_sem);15671567- dentry = __lookup_hash(&nd->last, nd->dentry, nd);15491549+ path.dentry = __lookup_hash(&nd->last, nd->dentry, nd);15501550+ path.mnt = nd->mnt;15681551 putname(nd->last.name);15691552 goto do_last;15701553}
+35-14
fs/nfs/dir.c
···528528 dentry->d_time = jiffies;529529}530530531531+/*532532+ * Return the intent data that applies to this particular path component533533+ *534534+ * Note that the current set of intents only apply to the very last535535+ * component of the path.536536+ * We check for this using LOOKUP_CONTINUE and LOOKUP_PARENT.537537+ */538538+static inline unsigned int nfs_lookup_check_intent(struct nameidata *nd, unsigned int mask)539539+{540540+ if (nd->flags & (LOOKUP_CONTINUE|LOOKUP_PARENT))541541+ return 0;542542+ return nd->flags & mask;543543+}544544+545545+/*546546+ * Inode and filehandle revalidation for lookups.547547+ *548548+ * We force revalidation in the cases where the VFS sets LOOKUP_REVAL,549549+ * or if the intent information indicates that we're about to open this550550+ * particular file and the "nocto" mount flag is not set.551551+ *552552+ */531553static inline532554int nfs_lookup_verify_inode(struct inode *inode, struct nameidata *nd)533555{534556 struct nfs_server *server = NFS_SERVER(inode);535557536558 if (nd != NULL) {537537- int ndflags = nd->flags;538559 /* VFS wants an on-the-wire revalidation */539539- if (ndflags & LOOKUP_REVAL)560560+ if (nd->flags & LOOKUP_REVAL)540561 goto out_force;541562 /* This is an open(2) */542542- if ((ndflags & LOOKUP_OPEN) &&543543- !(ndflags & LOOKUP_CONTINUE) &&563563+ if (nfs_lookup_check_intent(nd, LOOKUP_OPEN) != 0 &&544564 !(server->flags & NFS_MOUNT_NOCTO))545565 goto out_force;546566 }···580560int nfs_neg_need_reval(struct inode *dir, struct dentry *dentry,581561 struct nameidata *nd)582562{583583- int ndflags = 0;584584-585585- if (nd)586586- ndflags = nd->flags;587563 /* Don't revalidate a negative dentry if we're creating a new file */588588- if ((ndflags & LOOKUP_CREATE) && !(ndflags & LOOKUP_CONTINUE))564564+ if (nd != NULL && nfs_lookup_check_intent(nd, LOOKUP_CREATE) != 0)589565 return 0;590566 return !nfs_check_verifier(dir, dentry);591567}···716700 .d_iput = nfs_dentry_iput,717701};718702703703+/*704704+ * Use intent information to check whether or not we're going to do705705+ * an O_EXCL create using this path component.706706+ */719707static inline720708int nfs_is_exclusive_create(struct inode *dir, struct nameidata *nd)721709{722710 if (NFS_PROTO(dir)->version == 2)723711 return 0;724724- if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE))712712+ if (nd == NULL || nfs_lookup_check_intent(nd, LOOKUP_CREATE) == 0)725713 return 0;726714 return (nd->intent.open.flags & O_EXCL) != 0;727715}···792772 .d_iput = nfs_dentry_iput,793773};794774775775+/*776776+ * Use intent information to determine whether we need to substitute777777+ * the NFSv4-style stateful OPEN for the LOOKUP call778778+ */795779static int is_atomic_open(struct inode *dir, struct nameidata *nd)796780{797797- if (!nd)798798- return 0;799799- /* Check that we are indeed trying to open this file */800800- if ((nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_OPEN))781781+ if (nd == NULL || nfs_lookup_check_intent(nd, LOOKUP_OPEN) == 0)801782 return 0;802783 /* NFS does not (yet) have a stateful open for directories */803784 if (nd->flags & LOOKUP_DIRECTORY)
+10
include/asm-alpha/agp.h
···1010#define flush_agp_mappings() 1111#define flush_agp_cache() mb()12121313+/* Convert a physical address to an address suitable for the GART. */1414+#define phys_to_gart(x) (x)1515+#define gart_to_phys(x) (x)1616+1717+/* GATT allocation. Returns/accepts GATT kernel virtual address. */1818+#define alloc_gatt_pages(order) \1919+ ((char *)__get_free_pages(GFP_KERNEL, (order)))2020+#define free_gatt_pages(table, order) \2121+ free_pages((unsigned long)(table), (order))2222+1323#endif
+8-8
include/asm-arm/arch-ixp2000/io.h
···7575 * Is this cycle meant for the CS8900?7676 */7777 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && 7878- ((port >= IXDP2X01_CS8900_VIRT_BASE) && 7979- (port <= IXDP2X01_CS8900_VIRT_END))) {7878+ (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&7979+ ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {8080 u8 *buf8 = (u8*)buf;8181 register u32 tmp32;8282···100100 * Is this cycle meant for the CS8900?101101 */102102 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && 103103- ((port >= IXDP2X01_CS8900_VIRT_BASE) && 104104- (port <= IXDP2X01_CS8900_VIRT_END))) {103103+ (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&104104+ ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {105105 register u32 tmp32;106106 u8 *buf8 = (u8*)buf;107107 do {···124124 * Is this cycle meant for the CS8900?125125 */126126 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && 127127- ((port >= IXDP2X01_CS8900_VIRT_BASE) && 128128- (port <= IXDP2X01_CS8900_VIRT_END))) {127127+ (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&128128+ ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {129129 return (u16)(*port); 130130 }131131···137137 register volatile u32 *port = (volatile u32 *)ptr;138138139139 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && 140140- ((port >= IXDP2X01_CS8900_VIRT_BASE) && 141141- (port <= IXDP2X01_CS8900_VIRT_END))) {140140+ (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&141141+ ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {142142 *port = value; 143143 return;144144 }
···3636 * These are used to set parameters in the core dumps.3737 */3838#define ELF_CLASS ELFCLASS323939-#define ELF_DATA ELFDATA2LSB;3939+#define ELF_DATA ELFDATA2LSB4040#define ELF_ARCH EM_ARM41414242#define USE_ELF_CORE_DUMP
···44#define PROT_READ 0x1 /* page can be read */55#define PROT_WRITE 0x2 /* page can be written */66#define PROT_EXEC 0x4 /* page can be executed */77+#define PROT_SEM 0x8 /* page may be used for atomic ops */78#define PROT_NONE 0x0 /* page can not be accessed */89#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */910#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */···2019#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */2120#define MAP_LOCKED 0x2000 /* pages are locked */2221#define MAP_NORESERVE 0x4000 /* don't check for reservations */2222+#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */2323+#define MAP_NONBLOCK 0x10000 /* do not block on IO */23242425#define MS_ASYNC 1 /* sync memory asynchronously */2526#define MS_INVALIDATE 2 /* invalidate the caches */
+10
include/asm-i386/agp.h
···2121 worth it. Would need a page for it. */2222#define flush_agp_cache() asm volatile("wbinvd":::"memory")23232424+/* Convert a physical address to an address suitable for the GART. */2525+#define phys_to_gart(x) (x)2626+#define gart_to_phys(x) (x)2727+2828+/* GATT allocation. Returns/accepts GATT kernel virtual address. */2929+#define alloc_gatt_pages(order) \3030+ ((char *)__get_free_pages(GFP_KERNEL, (order)))3131+#define free_gatt_pages(table, order) \3232+ free_pages((unsigned long)(table), (order))3333+2434#endif
+1-1
include/asm-i386/mach-numaq/mach_ipi.h
···11#ifndef __ASM_MACH_IPI_H22#define __ASM_MACH_IPI_H3344-inline void send_IPI_mask_sequence(cpumask_t, int vector);44+void send_IPI_mask_sequence(cpumask_t, int vector);5566static inline void send_IPI_mask(cpumask_t mask, int vector)77{
+10
include/asm-ia64/agp.h
···1818#define flush_agp_mappings() /* nothing */1919#define flush_agp_cache() mb()20202121+/* Convert a physical address to an address suitable for the GART. */2222+#define phys_to_gart(x) (x)2323+#define gart_to_phys(x) (x)2424+2525+/* GATT allocation. Returns/accepts GATT kernel virtual address. */2626+#define alloc_gatt_pages(order) \2727+ ((char *)__get_free_pages(GFP_KERNEL, (order)))2828+#define free_gatt_pages(table, order) \2929+ free_pages((unsigned long)(table), (order))3030+2131#endif /* _ASM_IA64_AGP_H */
+6-2
include/asm-ia64/pgtable.h
···88 * This hopefully works with any (fixed) IA-64 page-size, as defined99 * in <asm/page.h>.1010 *1111- * Copyright (C) 1998-2004 Hewlett-Packard Co1111+ * Copyright (C) 1998-2005 Hewlett-Packard Co1212 * David Mosberger-Tang <davidm@hpl.hp.com>1313 */1414···551551552552/* These tell get_user_pages() that the first gate page is accessible from user-level. */553553#define FIXADDR_USER_START GATE_ADDR554554-#define FIXADDR_USER_END (GATE_ADDR + 2*PERCPU_PAGE_SIZE)554554+#ifdef HAVE_BUGGY_SEGREL555555+# define FIXADDR_USER_END (GATE_ADDR + 2*PAGE_SIZE)556556+#else557557+# define FIXADDR_USER_END (GATE_ADDR + 2*PERCPU_PAGE_SIZE)558558+#endif555559556560#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG557561#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
+8-2
include/asm-ia64/processor.h
···403403 * task_struct at this point.404404 */405405406406-/* Return TRUE if task T owns the fph partition of the CPU we're running on. */406406+/*407407+ * Return TRUE if task T owns the fph partition of the CPU we're running on.408408+ * Must be called from code that has preemption disabled.409409+ */407410#define ia64_is_local_fpu_owner(t) \408411({ \409412 struct task_struct *__ia64_islfo_task = (t); \···414411 && __ia64_islfo_task == (struct task_struct *) ia64_get_kr(IA64_KR_FPU_OWNER)); \415412})416413417417-/* Mark task T as owning the fph partition of the CPU we're running on. */414414+/*415415+ * Mark task T as owning the fph partition of the CPU we're running on.416416+ * Must be called from code that has preemption disabled.417417+ */418418#define ia64_set_local_fpu_owner(t) do { \419419 struct task_struct *__ia64_slfo_task = (t); \420420 __ia64_slfo_task->thread.last_fph_cpu = smp_processor_id(); \
+10
include/asm-ppc/agp.h
···1010#define flush_agp_mappings()1111#define flush_agp_cache() mb()12121313+/* Convert a physical address to an address suitable for the GART. */1414+#define phys_to_gart(x) (x)1515+#define gart_to_phys(x) (x)1616+1717+/* GATT allocation. Returns/accepts GATT kernel virtual address. */1818+#define alloc_gatt_pages(order) \1919+ ((char *)__get_free_pages(GFP_KERNEL, (order)))2020+#define free_gatt_pages(table, order) \2121+ free_pages((unsigned long)(table), (order))2222+1323#endif
+1-1
include/asm-ppc/sigcontext.h
···22#define _ASM_PPC_SIGCONTEXT_H3344#include <asm/ptrace.h>55-55+#include <linux/compiler.h>6677struct sigcontext {88 unsigned long _unused[4];
+10
include/asm-ppc64/agp.h
···1010#define flush_agp_mappings()1111#define flush_agp_cache() mb()12121313+/* Convert a physical address to an address suitable for the GART. */1414+#define phys_to_gart(x) (x)1515+#define gart_to_phys(x) (x)1616+1717+/* GATT allocation. Returns/accepts GATT kernel virtual address. */1818+#define alloc_gatt_pages(order) \1919+ ((char *)__get_free_pages(GFP_KERNEL, (order)))2020+#define free_gatt_pages(table, order) \2121+ free_pages((unsigned long)(table), (order))2222+1323#endif
+1-3
include/asm-ppc64/elf.h
···221221 set_thread_flag(TIF_ABI_PENDING); \222222 else \223223 clear_thread_flag(TIF_ABI_PENDING); \224224- if (ibcs2) \225225- set_personality(PER_SVR4); \226226- else if (current->personality != PER_LINUX32) \224224+ if (personality(current->personality) != PER_LINUX32) \227225 set_personality(PER_LINUX); \228226} while (0)229227
+3-2
include/asm-sparc/uaccess.h
···4141 * No one can read/write anything from userland in the kernel space by setting4242 * large size and address near to PAGE_OFFSET - a fault will break his intentions.4343 */4444-#define __user_ok(addr,size) ((addr) < STACK_TOP)4444+#define __user_ok(addr, size) ({ (void)(size); (addr) < STACK_TOP; })4545#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS))4646#define __access_ok(addr,size) (__user_ok((addr) & get_fs().seg,(size)))4747-#define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size))4747+#define access_ok(type, addr, size) \4848+ ({ (void)(type); __access_ok((unsigned long)(addr), size); })48494950/* this function will go away soon - use access_ok() instead */5051static inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size)
+10
include/asm-sparc64/agp.h
···88#define flush_agp_mappings() 99#define flush_agp_cache() mb()10101111+/* Convert a physical address to an address suitable for the GART. */1212+#define phys_to_gart(x) (x)1313+#define gart_to_phys(x) (x)1414+1515+/* GATT allocation. Returns/accepts GATT kernel virtual address. */1616+#define alloc_gatt_pages(order) \1717+ ((char *)__get_free_pages(GFP_KERNEL, (order)))1818+#define free_gatt_pages(table, order) \1919+ free_pages((unsigned long)(table), (order))2020+1121#endif
+10
include/asm-x86_64/agp.h
···1919 worth it. Would need a page for it. */2020#define flush_agp_cache() asm volatile("wbinvd":::"memory")21212222+/* Convert a physical address to an address suitable for the GART. */2323+#define phys_to_gart(x) (x)2424+#define gart_to_phys(x) (x)2525+2626+/* GATT allocation. Returns/accepts GATT kernel virtual address. */2727+#define alloc_gatt_pages(order) \2828+ ((char *)__get_free_pages(GFP_KERNEL, (order)))2929+#define free_gatt_pages(table, order) \3030+ free_pages((unsigned long)(table), (order))3131+2232#endif
···356356{357357 struct ethtool_coalesce coalesce;358358359359- if (!dev->ethtool_ops->get_coalesce)359359+ if (!dev->ethtool_ops->set_coalesce)360360 return -EOPNOTSUPP;361361362362 if (copy_from_user(&coalesce, useraddr, sizeof(coalesce)))
···405405 ---help---406406 Size of the local stack variable used while evaluating the tree of407407 ematches. Limits the depth of the tree, i.e. the number of408408- encapsulated precedences. Every level requires 4 bytes of addtional408408+ encapsulated precedences. Every level requires 4 bytes of additional409409 stack space.410410411411config NET_EMATCH_CMP