Commit fa5f17f2 authored by Anton Blanchard's avatar Anton Blanchard

Merge bk://linux.bkbits.net/linux-2.5

into samba.org:/home/anton/ppc64/for-linus-ppc64
parents d2d20c26 e176a712
......@@ -84,8 +84,6 @@ int cpu_idle(void)
lpaca = get_paca();
while (1) {
irq_stat[smp_processor_id()].idle_timestamp = jiffies;
if (lpaca->xLpPaca.xSharedProc) {
if (ItLpQueue_isLpIntPending(lpaca->lpQueuePtr))
process_iSeries_events();
......@@ -125,7 +123,6 @@ int cpu_idle(void)
long oldval;
while (1) {
irq_stat[smp_processor_id()].idle_timestamp = jiffies;
oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED);
if (!oldval) {
......
......@@ -359,7 +359,7 @@ _GLOBAL(_outsl)
bdnz 00b
blr
_GLOBAL(ide_insw)
/* _GLOBAL(ide_insw) now in drivers/ide/ide-iops.c */
_GLOBAL(_insw_ns)
cmpwi 0,r5,0
mtctr r5
......@@ -371,7 +371,7 @@ _GLOBAL(_insw_ns)
bdnz 00b
blr
_GLOBAL(ide_outsw)
/* _GLOBAL(ide_outsw) now in drivers/ide/ide-iops.c */
_GLOBAL(_outsw_ns)
cmpwi 0,r5,0
mtctr r5
......
......@@ -227,3 +227,4 @@ EXPORT_SYMBOL(debugger_fault_handler);
#endif
EXPORT_SYMBOL(tb_ticks_per_usec);
EXPORT_SYMBOL(paca);
......@@ -726,3 +726,22 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long ea,
__hash_page(ea, pte_val(pte) & (_PAGE_USER|_PAGE_RW), vsid, ptep,
0x300, local);
}
kmem_cache_t *zero_cache;
static void zero_ctor(void *pte, kmem_cache_t *cache, unsigned long flags)
{
memset(pte, 0, PAGE_SIZE);
}
void pgtable_cache_init(void)
{
zero_cache = kmem_cache_create("zero",
PAGE_SIZE,
0,
SLAB_HWCACHE_ALIGN | SLAB_MUST_HWCACHE_ALIGN,
zero_ctor,
NULL);
if (!zero_cache)
panic("pgtable_cache_init(): could not create zero_cache!\n");
}
......@@ -306,6 +306,7 @@ void __init paging_init(void)
{
unsigned long zones_size[MAX_NR_ZONES];
int i, nid;
struct page *node_mem_map;
for (i = 1; i < MAX_NR_ZONES; i++)
zones_size[i] = 0;
......@@ -314,16 +315,24 @@ void __init paging_init(void)
unsigned long start_pfn;
unsigned long end_pfn;
if (node_data[nid].node_spanned_pages == 0)
continue;
start_pfn = plat_node_bdata[nid].node_boot_start >> PAGE_SHIFT;
end_pfn = plat_node_bdata[nid].node_low_pfn;
zones_size[ZONE_DMA] = end_pfn - start_pfn;
dbg("free_area_init node %d %lx %lx\n", nid,
zones_size[ZONE_DMA], start_pfn);
free_area_init_node(nid, NODE_DATA(nid), NULL, zones_size,
start_pfn, NULL);
/*
* Give this empty node a dummy struct page to avoid
* us from trying to allocate a node local mem_map
* in free_area_init_node (which will fail).
*/
if (!node_data[nid].node_spanned_pages)
node_mem_map = alloc_bootmem(sizeof(struct page));
else
node_mem_map = NULL;
free_area_init_node(nid, NODE_DATA(nid), node_mem_map,
zones_size, start_pfn, NULL);
}
}
......@@ -15,9 +15,7 @@
typedef struct {
unsigned int __softirq_pending;
unsigned int __syscall_count;
struct task_struct * __ksoftirqd_task;
unsigned long idle_timestamp;
} ____cacheline_aligned irq_cpustat_t;
#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
......
......@@ -17,6 +17,12 @@
#include <asm/memory.h>
#include <asm/delay.h>
#define __ide_mm_insw(p, a, c) _insw_ns((volatile u16 *)(p), (a), (c))
#define __ide_mm_insl(p, a, c) _insl_ns((volatile u32 *)(p), (a), (c))
#define __ide_mm_outsw(p, a, c) _outsw_ns((volatile u16 *)(p), (a), (c))
#define __ide_mm_outsl(p, a, c) _outsl_ns((volatile u32 *)(p), (a), (c))
#define SIO_CONFIG_RA 0x398
#define SIO_CONFIG_RD 0x399
......@@ -93,7 +99,7 @@ extern void _outsl_ns(volatile u32 *port, const void *buf, int nl);
#define inw_p(port) inw(port)
#define outw_p(val, port) (udelay(1), outw((val), (port)))
#define inl_p(port) inl(port)
#define outl_p(val, port) (udelay(1), outl((val, (port)))
#define outl_p(val, port) (udelay(1), outl((val), (port)))
/*
* The *_ns versions below don't do byte-swapping.
......
......@@ -2,8 +2,11 @@
#define _PPC64_PGALLOC_H
#include <linux/mm.h>
#include <linux/slab.h>
#include <asm/processor.h>
extern kmem_cache_t *zero_cache;
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -14,16 +17,13 @@
static inline pgd_t *
pgd_alloc(struct mm_struct *mm)
{
pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL);
if (pgd != NULL)
clear_page(pgd);
return pgd;
return kmem_cache_alloc(zero_cache, GFP_KERNEL);
}
static inline void
pgd_free(pgd_t *pgd)
{
free_page((unsigned long)pgd);
kmem_cache_free(zero_cache, pgd);
}
#define pgd_populate(MM, PGD, PMD) pgd_set(PGD, PMD)
......@@ -31,18 +31,13 @@ pgd_free(pgd_t *pgd)
static inline pmd_t *
pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
{
pmd_t *pmd;
pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
if (pmd)
clear_page(pmd);
return pmd;
return kmem_cache_alloc(zero_cache, GFP_KERNEL|__GFP_REPEAT);
}
static inline void
pmd_free(pmd_t *pmd)
{
free_page((unsigned long)pmd);
kmem_cache_free(zero_cache, pmd);
}
#define __pmd_free_tlb(tlb, pmd) pmd_free(pmd)
......@@ -54,12 +49,7 @@ pmd_free(pmd_t *pmd)
static inline pte_t *
pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr)
{
pte_t *pte;
pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
if (pte)
clear_page(pte);
return pte;
return kmem_cache_alloc(zero_cache, GFP_KERNEL|__GFP_REPEAT);
}
static inline struct page *
......@@ -76,7 +66,7 @@ pte_alloc_one(struct mm_struct *mm, unsigned long address)
static inline void
pte_free_kernel(pte_t *pte)
{
free_page((unsigned long)pte);
kmem_cache_free(zero_cache, pte);
}
#define pte_free(pte_page) pte_free_kernel(page_address(pte_page))
......
......@@ -395,10 +395,7 @@ extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
#define io_remap_page_range remap_page_range
/*
* No page table caches to initialise
*/
#define pgtable_cache_init() do { } while (0)
void pgtable_cache_init(void);
extern void hpte_init_pSeries(void);
extern void hpte_init_iSeries(void);
......
......@@ -8,8 +8,8 @@
* 2 of the License, or (at your option) any later version.
*/
#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 4)
#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
#include <asm-generic/siginfo.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment