forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Pull arch/tile updates from Chris Metcalf: "This adds support for an <arch/intreg.h> to help with removing __need_xxx #defines from glibc, and removes some dead code in arch/tile/mm/init.c" * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: mm, tile: drop arch_{add,remove}_memory tile: prefer <arch/intreg.h> to __need_int_reg_t
- Loading branch information
Showing
3 changed files
with
74 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* Copyright 2017 Tilera Corporation. All Rights Reserved. | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation, version 2. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
* NON INFRINGEMENT. See the GNU General Public License for | ||
* more details. | ||
*/ | ||
|
||
/** | ||
* @file | ||
* | ||
* Provide types and defines for the type that can hold a register, | ||
* in the implementation namespace. | ||
*/ | ||
|
||
#ifndef __ARCH_INTREG_H__ | ||
#define __ARCH_INTREG_H__ | ||
|
||
/* | ||
* Get number of bits in a register. __INT_REG_BITS may be defined | ||
* prior to including this header to force a particular bit width. | ||
*/ | ||
|
||
#ifndef __INT_REG_BITS | ||
# if defined __tilegx__ | ||
# define __INT_REG_BITS 64 | ||
# elif defined __tilepro__ | ||
# define __INT_REG_BITS 32 | ||
# else | ||
# error Unrecognized architecture | ||
# endif | ||
#endif | ||
|
||
#if __INT_REG_BITS == 64 | ||
|
||
# ifndef __ASSEMBLER__ | ||
/** Unsigned type that can hold a register. */ | ||
typedef unsigned long long __uint_reg_t; | ||
|
||
/** Signed type that can hold a register. */ | ||
typedef long long __int_reg_t; | ||
# endif | ||
|
||
/** String prefix to use for printf(). */ | ||
# define __INT_REG_FMT "ll" | ||
|
||
#elif __INT_REG_BITS == 32 | ||
|
||
# ifndef __ASSEMBLER__ | ||
/** Unsigned type that can hold a register. */ | ||
typedef unsigned long __uint_reg_t; | ||
|
||
/** Signed type that can hold a register. */ | ||
typedef long __int_reg_t; | ||
# endif | ||
|
||
/** String prefix to use for printf(). */ | ||
# define __INT_REG_FMT "l" | ||
|
||
#else | ||
# error Unrecognized value of __INT_REG_BITS | ||
#endif | ||
|
||
#endif /* !__ARCH_INTREG_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters