Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/vsx: Fix VSX alignment handler for regs 32-63 powerpc/ps3: Move ps3_mm_add_memory to device_initcall powerpc/mm: Fix numa reserve bootmem page selection powerpc/mm: Fix _PAGE_CHG_MASK to protect _PAGE_SPECIAL
This commit is contained in:
commit
b30b774930
|
@ -60,7 +60,7 @@
|
||||||
/* It should be preserving the high 48 bits and then specifically */
|
/* It should be preserving the high 48 bits and then specifically */
|
||||||
/* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */
|
/* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */
|
||||||
#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \
|
#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \
|
||||||
_PAGE_HPTEFLAGS)
|
_PAGE_HPTEFLAGS | _PAGE_SPECIAL)
|
||||||
|
|
||||||
/* Bits to mask out from a PMD to get to the PTE page */
|
/* Bits to mask out from a PMD to get to the PTE page */
|
||||||
#define PMD_MASKED_BITS 0
|
#define PMD_MASKED_BITS 0
|
||||||
|
|
|
@ -114,7 +114,7 @@ static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd)
|
||||||
* pgprot changes
|
* pgprot changes
|
||||||
*/
|
*/
|
||||||
#define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \
|
#define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \
|
||||||
_PAGE_ACCESSED)
|
_PAGE_ACCESSED | _PAGE_SPECIAL)
|
||||||
|
|
||||||
/* Bits to mask out from a PMD to get to the PTE page */
|
/* Bits to mask out from a PMD to get to the PTE page */
|
||||||
#define PMD_MASKED_BITS 0x1ff
|
#define PMD_MASKED_BITS 0x1ff
|
||||||
|
|
|
@ -429,7 +429,8 @@ extern int icache_44x_need_flush;
|
||||||
#define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE()
|
#define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
|
#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \
|
||||||
|
_PAGE_SPECIAL)
|
||||||
|
|
||||||
|
|
||||||
#define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \
|
#define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \
|
||||||
|
|
|
@ -646,11 +646,16 @@ static int emulate_vsx(unsigned char __user *addr, unsigned int reg,
|
||||||
unsigned int areg, struct pt_regs *regs,
|
unsigned int areg, struct pt_regs *regs,
|
||||||
unsigned int flags, unsigned int length)
|
unsigned int flags, unsigned int length)
|
||||||
{
|
{
|
||||||
char *ptr = (char *) ¤t->thread.TS_FPR(reg);
|
char *ptr;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
flush_vsx_to_thread(current);
|
flush_vsx_to_thread(current);
|
||||||
|
|
||||||
|
if (reg < 32)
|
||||||
|
ptr = (char *) ¤t->thread.TS_FPR(reg);
|
||||||
|
else
|
||||||
|
ptr = (char *) ¤t->thread.vr[reg - 32];
|
||||||
|
|
||||||
if (flags & ST)
|
if (flags & ST)
|
||||||
ret = __copy_to_user(addr, ptr, length);
|
ret = __copy_to_user(addr, ptr, length);
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <linux/notifier.h>
|
#include <linux/notifier.h>
|
||||||
#include <linux/lmb.h>
|
#include <linux/lmb.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
|
#include <linux/pfn.h>
|
||||||
#include <asm/sparsemem.h>
|
#include <asm/sparsemem.h>
|
||||||
#include <asm/prom.h>
|
#include <asm/prom.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
|
@ -882,7 +883,7 @@ static void mark_reserved_regions_for_nid(int nid)
|
||||||
unsigned long physbase = lmb.reserved.region[i].base;
|
unsigned long physbase = lmb.reserved.region[i].base;
|
||||||
unsigned long size = lmb.reserved.region[i].size;
|
unsigned long size = lmb.reserved.region[i].size;
|
||||||
unsigned long start_pfn = physbase >> PAGE_SHIFT;
|
unsigned long start_pfn = physbase >> PAGE_SHIFT;
|
||||||
unsigned long end_pfn = ((physbase + size) >> PAGE_SHIFT);
|
unsigned long end_pfn = PFN_UP(physbase + size);
|
||||||
struct node_active_region node_ar;
|
struct node_active_region node_ar;
|
||||||
unsigned long node_end_pfn = node->node_start_pfn +
|
unsigned long node_end_pfn = node->node_start_pfn +
|
||||||
node->node_spanned_pages;
|
node->node_spanned_pages;
|
||||||
|
@ -908,7 +909,7 @@ static void mark_reserved_regions_for_nid(int nid)
|
||||||
*/
|
*/
|
||||||
if (end_pfn > node_ar.end_pfn)
|
if (end_pfn > node_ar.end_pfn)
|
||||||
reserve_size = (node_ar.end_pfn << PAGE_SHIFT)
|
reserve_size = (node_ar.end_pfn << PAGE_SHIFT)
|
||||||
- (start_pfn << PAGE_SHIFT);
|
- physbase;
|
||||||
/*
|
/*
|
||||||
* Only worry about *this* node, others may not
|
* Only worry about *this* node, others may not
|
||||||
* yet have valid NODE_DATA().
|
* yet have valid NODE_DATA().
|
||||||
|
|
|
@ -328,7 +328,7 @@ static int __init ps3_mm_add_memory(void)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
core_initcall(ps3_mm_add_memory);
|
device_initcall(ps3_mm_add_memory);
|
||||||
|
|
||||||
/*============================================================================*/
|
/*============================================================================*/
|
||||||
/* dma routines */
|
/* dma routines */
|
||||||
|
|
Loading…
Reference in a new issue