···3232/* All records are aligned to 4 bytes */33333434typedef struct bp_tag {3535- unsigned short id; /* tag id */3636- unsigned short size; /* size of this record excluding the structure*/3737- unsigned long data[0]; /* data */3535+ unsigned short id; /* tag id */3636+ unsigned short size; /* size of this record excluding the structure*/3737+ unsigned long data[0]; /* data */3838} bp_tag_t;39394040typedef struct meminfo {4141- unsigned long type;4242- unsigned long start;4343- unsigned long end;4141+ unsigned long type;4242+ unsigned long start;4343+ unsigned long end;4444} meminfo_t;45454646#define SYSMEM_BANKS_MAX 5···4949#define MEMORY_TYPE_NONE 0x200050505151typedef struct sysmem_info {5252- int nr_banks;5353- meminfo_t bank[SYSMEM_BANKS_MAX];5252+ int nr_banks;5353+ meminfo_t bank[SYSMEM_BANKS_MAX];5454} sysmem_info_t;55555656extern sysmem_info_t sysmem;57575858#endif5959#endif6060-6161-6262-
···3636 * better 64-bit) boundary3737 */38383939-asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst, int len, __wsum sum,4040- int *src_err_ptr, int *dst_err_ptr);3939+asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst,4040+ int len, __wsum sum,4141+ int *src_err_ptr, int *dst_err_ptr);41424243/*4344 * Note: when you get a NULL pointer exception here this means someone···55545655static inline5756__wsum csum_partial_copy_from_user(const void __user *src, void *dst,5858- int len, __wsum sum, int *err_ptr)5757+ int len, __wsum sum, int *err_ptr)5958{6059 return csum_partial_copy_generic((__force const void *)src, dst,6160 len, sum, err_ptr, NULL);···113112 /* Since the input registers which are loaded with iph and ihl114113 are modified, we must also specify them as outputs, or gcc115114 will assume they contain their original values. */116116- : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (tmp), "=&r" (endaddr)115115+ : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (tmp),116116+ "=&r" (endaddr)117117 : "1" (iph), "2" (ihl)118118 : "memory");119119···170168171169static __inline__ __sum16 ip_compute_csum(const void *buff, int len)172170{173173- return csum_fold (csum_partial(buff, len, 0));171171+ return csum_fold (csum_partial(buff, len, 0));174172}175173176174#define _HAVE_ARCH_IPV6_CSUM···240238 * Copy and checksum to user241239 */242240#define HAVE_CSUM_COPY_USER243243-static __inline__ __wsum csum_and_copy_to_user(const void *src, void __user *dst,244244- int len, __wsum sum, int *err_ptr)241241+static __inline__ __wsum csum_and_copy_to_user(const void *src,242242+ void __user *dst, int len,243243+ __wsum sum, int *err_ptr)245244{246245 if (access_ok(VERIFY_WRITE, dst, len))247247- return csum_partial_copy_generic(src, dst, len, sum, NULL, err_ptr);246246+ return csum_partial_copy_generic(src,dst,len,sum,NULL,err_ptr);248247249248 if (len)250249 *err_ptr = -EFAULT;
+2-1
arch/xtensa/include/asm/cmpxchg.h
···134134#endif135135}136136137137-#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))137137+#define xchg(ptr,x) \138138+ ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))138139139140/*140141 * This only works if the compiler isn't horribly bad at optimizing.
···3535struct pci_controller {3636 int index; /* used for pci_controller_num */3737 struct pci_controller *next;3838- struct pci_bus *bus;3838+ struct pci_bus *bus;3939 void *arch_data;40404141 int first_busno;
+1-1
arch/xtensa/include/asm/pci.h
···53535454/* Map a range of PCI memory or I/O space for a device into user space */5555int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,5656- enum pci_mmap_state mmap_state, int write_combine);5656+ enum pci_mmap_state mmap_state, int write_combine);57575858/* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */5959#define HAVE_PCI_MMAP 1
···874874875875 _bnei a0, 1, 1f # no 'movsp a1, ax': jump876876877877- /* Move the save area. This implies the use of the L32E877877+ /* Move the save area. This implies the use of the L32E878878 * and S32E instructions, because this move must be done with879879 * the user's PS.RING privilege levels, not with ring 0880880 * (kernel's) privileges currently active with PS.EXCM···1008100810091009ENTRY(fast_syscall_unrecoverable)1010101010111011- /* Restore all states. */10111011+ /* Restore all states. */1012101210131013- l32i a0, a2, PT_AREG0 # restore a010141014- xsr a2, depc # restore a2, depc10151015- rsr a3, excsave110131013+ l32i a0, a2, PT_AREG0 # restore a010141014+ xsr a2, depc # restore a2, depc10151015+ rsr a3, excsave11016101610171017- wsr a0, excsave110181018- movi a0, unrecoverable_exception10191019- callx0 a010171017+ wsr a0, excsave110181018+ movi a0, unrecoverable_exception10191019+ callx0 a01020102010211021ENDPROC(fast_syscall_unrecoverable)10221022···1253125312541254 movi a3, exc_table12551255 rsr a0, exccause12561256- addx4 a0, a0, a3 # find entry in table12571257- l32i a0, a0, EXC_TABLE_FAST_USER # load handler12581258- jx a012561256+ addx4 a0, a0, a3 # find entry in table12571257+ l32i a0, a0, EXC_TABLE_FAST_USER # load handler12581258+ jx a01259125912601260fast_syscall_spill_registers_fixup_return:12611261···14571457 rsr a0, ps14581458 _bbci.l a0, PS_UM_BIT, 1f1459145914601460- /* User space: Setup a dummy frame and kill application.14601460+ /* User space: Setup a dummy frame and kill application.14611461 * Note: We assume EXC_TABLE_KSTK contains a valid stack pointer.14621462 */14631463
···108108109109void cpu_idle(void)110110{111111- local_irq_enable();111111+ local_irq_enable();112112113113 /* endless idle loop with no priority at all */114114 while (1) {
+1-2
arch/xtensa/kernel/ptrace.c
···154154 coprocessor_flush_all(ti);155155 coprocessor_release_all(ti);156156157157- ret |= __copy_from_user(&ti->xtregs_cp, &xtregs->cp0, 157157+ ret |= __copy_from_user(&ti->xtregs_cp, &xtregs->cp0,158158 sizeof(xtregs_coprocessor_t));159159#endif160160 ret |= __copy_from_user(®s->xtregs_opt, &xtregs->opt,···343343 && (current->ptrace & PT_PTRACED))344344 do_syscall_trace();345345}346346-
···212212 if (err)213213 return err;214214215215- /* The signal handler may have used coprocessors in which215215+ /* The signal handler may have used coprocessors in which216216 * case they are still enabled. We disable them to force a217217 * reloading of the original task's CP state by the lazy218218 * context-switching mechanisms of CP exception handling.···396396 */397397398398 /* Set up registers for signal handler */399399- start_thread(regs, (unsigned long) ka->sa.sa_handler, 399399+ start_thread(regs, (unsigned long) ka->sa.sa_handler,400400 (unsigned long) frame);401401402402 /* Set up a stack frame for a call4···424424 return -EFAULT;425425}426426427427-asmlinkage long xtensa_sigaltstack(const stack_t __user *uss, 427427+asmlinkage long xtensa_sigaltstack(const stack_t __user *uss,428428 stack_t __user *uoss,429429- long a2, long a3, long a4, long a5,429429+ long a2, long a3, long a4, long a5,430430 struct pt_regs *regs)431431{432432 return do_sigaltstack(uss, uoss, regs->areg[1]);
···41414242.text4343ENTRY(csum_partial)4444- /*4545- * Experiments with Ethernet and SLIP connections show that buf4646- * is aligned on either a 2-byte or 4-byte boundary.4747- */4444+4545+ /*4646+ * Experiments with Ethernet and SLIP connections show that buf4747+ * is aligned on either a 2-byte or 4-byte boundary.4848+ */4849 entry sp, 324950 extui a5, a2, 0, 25051 bnez a5, 8f /* branch if 2-byte aligned */···410409 retw411410412411.previous413413-
+4-2
arch/xtensa/lib/memcopy.S
···210210 _beqz a4, .Ldone # avoid loading anything for zero-length copies211211 # copy 16 bytes per iteration for word-aligned dst and unaligned src212212 ssa8 a3 # set shift amount from byte offset213213-#define SIM_CHECKS_ALIGNMENT 1 /* set to 1 when running on ISS (simulator) with the214214- lint or ferret client, or 0 to save a few cycles */213213+214214+/* set to 1 when running on ISS (simulator) with the215215+ lint or ferret client, or 0 to save a few cycles */216216+#define SIM_CHECKS_ALIGNMENT 1215217#if XCHAL_UNALIGNED_LOAD_EXCEPTION || SIM_CHECKS_ALIGNMENT216218 and a11, a3, a8 # save unalignment offset for below217219 sub a3, a3, a11 # align a3