cregit-Linux how code gets into the kernel

Release 4.14 arch/microblaze/include/asm/cmpxchg.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_MICROBLAZE_CMPXCHG_H

#define _ASM_MICROBLAZE_CMPXCHG_H

#include <linux/irqflags.h>

void __bad_xchg(volatile void *ptr, int size);


static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) { unsigned long ret; unsigned long flags; switch (size) { case 1: local_irq_save(flags); ret = *(volatile unsigned char *)ptr; *(volatile unsigned char *)ptr = x; local_irq_restore(flags); break; case 4: local_irq_save(flags); ret = *(volatile unsigned long *)ptr; *(volatile unsigned long *)ptr = x; local_irq_restore(flags); break; default: __bad_xchg(ptr, size), ret = 0; break; } return ret; }

Contributors

PersonTokensPropCommitsCommitProp
David Howells122100.00%1100.00%
Total122100.00%1100.00%

#define xchg(ptr, x) \ ((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) #include <asm-generic/cmpxchg.h> #include <asm-generic/cmpxchg-local.h> #endif /* _ASM_MICROBLAZE_CMPXCHG_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
David Howells15997.55%133.33%
Michal Simek31.84%133.33%
Greg Kroah-Hartman10.61%133.33%
Total163100.00%3100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.