cregit-Linux how code gets into the kernel

Release 4.14 arch/mips/include/asm/mach-cavium-octeon/mangle-port.h

/*
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 2003, 2004 Ralf Baechle
 */
#ifndef __ASM_MACH_GENERIC_MANGLE_PORT_H

#define __ASM_MACH_GENERIC_MANGLE_PORT_H

#include <asm/byteorder.h>

#ifdef __BIG_ENDIAN


static inline bool __should_swizzle_bits(volatile void *a) { extern const bool octeon_should_swizzle_table[]; u64 did = ((u64)(uintptr_t)a >> 40) & 0xff; return octeon_should_swizzle_table[did]; }

Contributors

PersonTokensPropCommitsCommitProp
Steven J. Hill3687.80%150.00%
Aaro Koskinen512.20%150.00%
Total41100.00%2100.00%

# define __swizzle_addr_b(port) (port) # define __swizzle_addr_w(port) (port) # define __swizzle_addr_l(port) (port) # define __swizzle_addr_q(port) (port) #else /* __LITTLE_ENDIAN */ #define __should_swizzle_bits(a) false
static inline bool __should_swizzle_addr(u64 p) { /* boot bus? */ return ((p >> 40) & 0xff) == 0; }

Contributors

PersonTokensPropCommitsCommitProp
David Daney2395.83%150.00%
Aaro Koskinen14.17%150.00%
Total24100.00%2100.00%

# define __swizzle_addr_b(port) \ (__should_swizzle_addr(port) ? (port) ^ 7 : (port)) # define __swizzle_addr_w(port) \ (__should_swizzle_addr(port) ? (port) ^ 6 : (port)) # define __swizzle_addr_l(port) \ (__should_swizzle_addr(port) ? (port) ^ 4 : (port)) # define __swizzle_addr_q(port) (port) #endif /* __BIG_ENDIAN */ # define ioswabb(a, x) (x) # define __mem_ioswabb(a, x) (x) # define ioswabw(a, x) (__should_swizzle_bits(a) ? le16_to_cpu(x) : x) # define __mem_ioswabw(a, x) (x) # define ioswabl(a, x) (__should_swizzle_bits(a) ? le32_to_cpu(x) : x) # define __mem_ioswabl(a, x) (x) # define ioswabq(a, x) (__should_swizzle_bits(a) ? le64_to_cpu(x) : x) # define __mem_ioswabq(a, x) (x) #endif /* __ASM_MACH_GENERIC_MANGLE_PORT_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
David Daney17376.89%133.33%
Steven J. Hill4620.44%133.33%
Aaro Koskinen62.67%133.33%
Total225100.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.