提交 01ea9177 编写于 作者: L Linus Torvalds

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
......@@ -20,58 +20,17 @@
#ifndef __ARCH_ABI_H__
#if !defined __need_int_reg_t && !defined __DOXYGEN__
# define __ARCH_ABI_H__
# include <arch/chip.h>
#endif
/* Provide the basic machine types. */
#ifndef __INT_REG_BITS
/** Number of bits in a register. */
#if defined __tilegx__
# define __INT_REG_BITS 64
#elif defined __tilepro__
# define __INT_REG_BITS 32
#elif !defined __need_int_reg_t
#ifndef __tile__ /* support uncommon use of arch headers in non-tile builds */
# include <arch/chip.h>
# define __INT_REG_BITS CHIP_WORD_SIZE()
#else
# error Unrecognized architecture with __need_int_reg_t
#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"
#else
#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"
#endif
#endif /* __INT_REG_BITS */
#include <arch/intreg.h>
/* __need_int_reg_t is deprecated: just include <arch/intreg.h> */
#ifndef __need_int_reg_t
#define __ARCH_ABI_H__
#ifndef __ASSEMBLER__
/** Unsigned type that can hold a register. */
......
/*
* 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__ */
......@@ -857,36 +857,6 @@ void __init mem_init(void)
#endif
}
/*
* this is for the non-NUMA, single node SMP system case.
* Specifically, in the case of x86, we will always add
* memory to the highmem for now.
*/
#ifndef CONFIG_NEED_MULTIPLE_NODES
int arch_add_memory(u64 start, u64 size, bool for_device)
{
struct pglist_data *pgdata = &contig_page_data;
struct zone *zone = pgdata->node_zones + MAX_NR_ZONES-1;
unsigned long start_pfn = start >> PAGE_SHIFT;
unsigned long nr_pages = size >> PAGE_SHIFT;
return __add_pages(zone, start_pfn, nr_pages);
}
int remove_memory(u64 start, u64 size)
{
return -EINVAL;
}
#ifdef CONFIG_MEMORY_HOTREMOVE
int arch_remove_memory(u64 start, u64 size)
{
/* TODO */
return -EBUSY;
}
#endif
#endif
struct kmem_cache *pgd_cache;
void __init pgtable_cache_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册