Commit 72b7a11a authored by Paul Mackerras's avatar Paul Mackerras

Merge samba.org:/home/paulus/kernel/linux-2.5

into samba.org:/home/paulus/kernel/for-linus-ppc
parents 90a8d4f3 0e67de54
...@@ -54,7 +54,7 @@ else ...@@ -54,7 +54,7 @@ else
endif endif
core-y += arch/ppc/kernel/ arch/ppc/platforms/ \ core-y += arch/ppc/kernel/ arch/ppc/platforms/ \
arch/ppc/mm/ arch/ppc/lib/ arch/ppc/mm/ arch/ppc/lib/ arch/ppc/syslib/
core-$(CONFIG_4xx) += arch/ppc/platforms/4xx/ core-$(CONFIG_4xx) += arch/ppc/platforms/4xx/
core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/ core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/
core-$(CONFIG_XMON) += arch/ppc/xmon/ core-$(CONFIG_XMON) += arch/ppc/xmon/
......
...@@ -9,9 +9,6 @@ ifdef CONFIG_4xx ...@@ -9,9 +9,6 @@ ifdef CONFIG_4xx
EXTRA_AFLAGS := -Wa,-m405 EXTRA_AFLAGS := -Wa,-m405
endif endif
CFLAGS_prom_init.o += -mrelocatable-lib
CFLAGS_btext.o += -mrelocatable-lib
# Start off with 'head.o', change as needed. # Start off with 'head.o', change as needed.
HEAD-y := head.o HEAD-y := head.o
HEAD-$(CONFIG_40x) := head_4xx.o HEAD-$(CONFIG_40x) := head_4xx.o
...@@ -20,71 +17,27 @@ HEAD-$(CONFIG_PPC_ISERIES) := iSeries_head.o ...@@ -20,71 +17,27 @@ HEAD-$(CONFIG_PPC_ISERIES) := iSeries_head.o
EXTRA_TARGETS := $(HEAD-y) EXTRA_TARGETS := $(HEAD-y)
export-objs := ppc_ksyms.o time.o ppc405_dma.o export-objs := ppc_ksyms.o time.o
obj-y := entry.o traps.o irq.o idle.o time.o misc.o \ obj-y := entry.o traps.o irq.o idle.o time.o misc.o \
process.o signal.o ptrace.o align.o \ process.o signal.o ptrace.o align.o \
semaphore.o syscalls.o setup.o \ semaphore.o syscalls.o setup.o \
cputable.o ppc_htab.o cputable.o ppc_htab.o
obj-$(CONFIG_6xx) += l2cr.o obj-$(CONFIG_6xx) += l2cr.o ppc6xx_idle.o
obj-$(CONFIG_ALL_PPC) += ppc6xx_idle.o
obj-$(CONFIG_MODULES) += ppc_ksyms.o obj-$(CONFIG_MODULES) += ppc_ksyms.o
obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_PCI) += pci.o
ifneq ($(CONFIG_PPC_ISERIES),y) ifneq ($(CONFIG_PPC_ISERIES),y)
obj-$(CONFIG_PCI) += pci-dma.o obj-$(CONFIG_PCI) += pci-dma.o
endif endif
obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o
obj-$(CONFIG_KGDB) += ppc-stub.o obj-$(CONFIG_KGDB) += ppc-stub.o
obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_TAU) += temp.o obj-$(CONFIG_TAU) += temp.o
ifeq ($(CONFIG_4xx),y)
obj-$(CONFIG_4xx) += ppc4xx_setup.o ppc4xx_pic.o ppc4xx_serial.o
obj-$(CONFIG_PPC_RTC) += todc_time.o
obj-$(CONFIG_KGDB) += ppc4xx_kgdb.o
obj-$(CONFIG_405_DMA) += ppc405_dma.o
obj-$(CONFIG_PCI) += ppc405_pci.o indirect_pci.o pci_auto.o
obj-$(CONFIG_PM) += ppc4xx_pm.o
endif
obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o
ifeq ($(CONFIG_8xx),y) ifeq ($(CONFIG_8xx),y)
obj-$(CONFIG_PCI) += qspan_pci.o i8259.o
ifneq ($(CONFIG_MATH_EMULATION),n) ifneq ($(CONFIG_MATH_EMULATION),n)
obj-y += softemu8xx.o obj-y += softemu8xx.o
endif endif
endif endif
obj-$(CONFIG_ALL_PPC) += prom_init.o prom.o open_pic.o \
indirect_pci.o i8259.o
obj-$(CONFIG_ADIR) += i8259.o indirect_pci.o pci_auto.o \
todc_time.o
obj-$(CONFIG_EV64260) += gt64260_common.o gt64260_pic.o \
indirect_pci.o todc_time.o pci_auto.o
obj-$(CONFIG_GEMINI) += open_pic.o i8259.o indirect_pci.o
obj-$(CONFIG_K2) += i8259.o indirect_pci.o todc_time.o \
pci_auto.o
obj-$(CONFIG_LOPEC) += mpc10x_common.o indirect_pci.o pci_auto.o \
open_pic.o i8259.o todc_time.o
obj-$(CONFIG_MCPN765) += todc_time.o indirect_pci.o pci_auto.o \
open_pic.o i8259.o pplus_common.o
obj-$(CONFIG_MENF1) += todc_time.o i8259.o mpc10x_common.o \
pci_auto.o indirect_pci.o
obj-$(CONFIG_MVME5100) += open_pic.o todc_time.o indirect_pci.o \
i8259.o pci_auto.o pplus_common.o
obj-$(CONFIG_PCORE) += mpc10x_common.o todc_time.o i8259.o \
indirect_pci.o pci_auto.o
obj-$(CONFIG_POWERPMC250) += open_pic.o mpc10x_common.o \
indirect_pci.o pci_auto.o
obj-$(CONFIG_PPLUS) += pplus_common.o open_pic.o i8259.o \
indirect_pci.o todc_time.o pci_auto.o
obj-$(CONFIG_PRPMC750) += open_pic.o indirect_pci.o pci_auto.o \
pplus_common.o
obj-$(CONFIG_PRPMC800) += open_pic.o indirect_pci.o pci_auto.o \
pplus_common.o harrier.o
obj-$(CONFIG_SANDPOINT) += i8259.o open_pic.o mpc10x_common.o \
pci_auto.o indirect_pci.o todc_time.o
obj-$(CONFIG_SPRUCE) += indirect_pci.o pci_auto.o todc_time.o
obj-$(CONFIG_ZX4500) += indirect_pci.o pci_auto.o mpc10x_common.o \
i8259.o open_pic.o
obj-$(CONFIG_8260) += m8260_setup.o ppc8260_pic.o
obj-$(CONFIG_BOOTX_TEXT) += btext.o
obj-$(CONFIG_PPC_ISERIES) += iSeries_misc.o obj-$(CONFIG_PPC_ISERIES) += iSeries_misc.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
......
/*
* BK Id: %F% %I% %G% %U% %#%
*/
/*
* Idle task for iSeries.
*
* 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; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/smp.h>
#include <linux/smp_lock.h>
#include <linux/stddef.h>
#include <linux/unistd.h>
#include <linux/ptrace.h>
#include <linux/slab.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/cache.h>
#include <asm/cputable.h>
#include <asm/machdep.h>
#include <asm/time.h>
#include <asm/iSeries/LparData.h>
#include <asm/iSeries/HvCall.h>
#include <asm/hardirq.h>
static void yield_shared_processor(void);
static void run_light_on(int on);
extern unsigned long yield_count;
void iSeries_idle(void)
{
if (!need_resched()) {
/* Turn off the run light */
run_light_on(0);
yield_shared_processor();
HMT_low();
#ifdef CONFIG_SMP
set_thread_flag(TIF_POLLING_NRFLAG);
while (!need_resched())
barrier();
clear_thread_flag(TIF_POLLING_NRFLAG);
#endif
}
if (need_resched()) {
run_light_on(1);
schedule();
return;
}
}
extern void fake_interrupt(void);
extern u64 get_tb64(void);
static void run_light_on(int on)
{
unsigned long CTRL;
CTRL = mfspr(CTRLF);
CTRL = on? (CTRL | RUNLATCH): (CTRL & ~RUNLATCH);
mtspr(CTRLT, CTRL);
}
static void yield_shared_processor(void)
{
struct Paca *paca;
u64 tb;
/* Poll for I/O events */
local_irq_disable();
local_irq_enable();
paca = (struct Paca *)mfspr(SPRG1);
if ( paca->xLpPaca.xSharedProc ) {
HvCall_setEnabledInterrupts( HvCall_MaskIPI |
HvCall_MaskLpEvent |
HvCall_MaskLpProd |
HvCall_MaskTimeout );
/*
* Check here for any of the above pending...
* IPI and Decrementers are indicated in ItLpPaca
* LpEvents are indicated on the LpQueue
*
* Disabling/enabling will check for LpEvents, IPIs
* and decrementers
*/
local_irq_disable();
local_irq_enable();
++yield_count;
/* Get current tb value */
tb = get_tb64();
/* Compute future tb value when yield will expire */
tb += tb_ticks_per_jiffy;
HvCall_yieldProcessor( HvCall_YieldTimed, tb );
/* Check here for any of the above pending or timeout expired*/
local_irq_disable();
/*
* The decrementer stops during the yield. Just force
* a fake decrementer now and the timer_interrupt
* code will straighten it all out
*/
paca->xLpPaca.xDecrInt = 1;
local_irq_enable();
}
}
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
* Idle daemon for PowerPC. Idle daemon will handle any action * Idle daemon for PowerPC. Idle daemon will handle any action
* that needs to be taken when the system becomes idle. * that needs to be taken when the system becomes idle.
* *
* Written by Cort Dougan (cort@cs.nmt.edu) * Written by Cort Dougan (cort@cs.nmt.edu). Subsequently hacked
* on by Tom Rini, Armin Kuster, Paul Mackerras and others.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -29,175 +30,39 @@ ...@@ -29,175 +30,39 @@
#include <asm/mmu.h> #include <asm/mmu.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/cputable.h> #include <asm/cputable.h>
#ifdef CONFIG_PPC_ISERIES #include <asm/machdep.h>
#include <asm/time.h>
#include <asm/iSeries/LparData.h>
#include <asm/iSeries/HvCall.h>
#include <asm/hardirq.h>
static void yield_shared_processor(void);
static void run_light_on(int on);
extern unsigned long yield_count;
#else /* CONFIG_PPC_ISERIES */
#define run_light_on(x) do { } while (0)
#endif /* CONFIG_PPC_ISERIES */
void power_save(void);
unsigned long zero_paged_on;
unsigned long powersave_nap;
void default_idle(void) void default_idle(void)
{ {
int do_power_save = 0; void (*powersave)(void);
/* Check if CPU can powersave */ powersave = ppc_md.power_save;
if (cur_cpu_spec[smp_processor_id()]->cpu_features &
(CPU_FTR_CAN_DOZE | CPU_FTR_CAN_NAP))
do_power_save = 1;
#ifdef CONFIG_PPC_ISERIES if (!need_resched()) {
if (!current->need_resched) { if (powersave != NULL)
/* Turn off the run light */ powersave();
run_light_on(0);
yield_shared_processor();
}
HMT_low();
#endif
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (!do_power_save) { else {
if (!need_resched()) {
set_thread_flag(TIF_POLLING_NRFLAG); set_thread_flag(TIF_POLLING_NRFLAG);
while (!test_thread_flag(TIF_NEED_RESCHED)) while (!need_resched())
barrier(); barrier();
clear_thread_flag(TIF_POLLING_NRFLAG); clear_thread_flag(TIF_POLLING_NRFLAG);
} }
}
#endif #endif
if (do_power_save && !need_resched())
power_save();
if (need_resched()) {
run_light_on(1);
schedule();
} }
#ifdef CONFIG_PPC_ISERIES if (need_resched())
else { schedule();
run_light_on(0);
yield_shared_processor();
HMT_low();
}
#endif /* CONFIG_PPC_ISERIES */
} }
/* /*
* SMP entry into the idle task - calls the same thing as the * The body of the idle task.
* non-smp versions. -- Cort
*/ */
int cpu_idle(void) int cpu_idle(void)
{ {
for (;;) for (;;)
default_idle(); if (ppc_md.idle != NULL)
ppc_md.idle();
else
default_idle();
return 0; return 0;
} }
void power_save(void)
{
unsigned long hid0;
int nap = powersave_nap;
/* 7450 has no DOZE mode mode, we return if powersave_nap
* isn't enabled
*/
if (!(nap || (cur_cpu_spec[smp_processor_id()]->cpu_features & CPU_FTR_CAN_DOZE)))
return;
/*
* Disable interrupts to prevent a lost wakeup
* when going to sleep. This is necessary even with
* RTLinux since we are not guaranteed an interrupt
* didn't come in and is waiting for a local_irq_enable() before
* emulating one. This way, we really do hard disable.
*
* We assume that we're sti-ed when we come in here. We
* are in the idle loop so if we're cli-ed then it's a bug
* anyway.
* -- Cort
*/
_nmask_and_or_msr(MSR_EE, 0);
if (!need_resched())
{
asm("mfspr %0,1008" : "=r" (hid0) :);
hid0 &= ~(HID0_NAP | HID0_SLEEP | HID0_DOZE);
hid0 |= (powersave_nap? HID0_NAP: HID0_DOZE) | HID0_DPM;
asm("mtspr 1008,%0" : : "r" (hid0));
/* set the POW bit in the MSR, and enable interrupts
* so we wake up sometime! */
_nmask_and_or_msr(0, MSR_POW | MSR_EE);
}
_nmask_and_or_msr(0, MSR_EE);
}
#ifdef CONFIG_PPC_ISERIES
extern void fake_interrupt(void);
extern u64 get_tb64(void);
void run_light_on(int on)
{
unsigned long CTRL;
CTRL = mfspr(CTRLF);
CTRL = on? (CTRL | RUNLATCH): (CTRL & ~RUNLATCH);
mtspr(CTRLT, CTRL);
}
void yield_shared_processor(void)
{
struct Paca *paca;
u64 tb;
/* Poll for I/O events */
local_irq_disable();
local_irq_enable();
paca = (struct Paca *)mfspr(SPRG1);
if ( paca->xLpPaca.xSharedProc ) {
HvCall_setEnabledInterrupts( HvCall_MaskIPI |
HvCall_MaskLpEvent |
HvCall_MaskLpProd |
HvCall_MaskTimeout );
/*
* Check here for any of the above pending...
* IPI and Decrementers are indicated in ItLpPaca
* LpEvents are indicated on the LpQueue
*
* Disabling/enabling will check for LpEvents, IPIs
* and decrementers
*/
local_irq_disable();
local_irq_enable();
++yield_count;
/* Get current tb value */
tb = get_tb64();
/* Compute future tb value when yield will expire */
tb += tb_ticks_per_jiffy;
HvCall_yieldProcessor( HvCall_YieldTimed, tb );
/* Check here for any of the above pending or timeout expired*/
local_irq_disable();
/*
* The decrementer stops during the yield. Just force
* a fake decrementer now and the timer_interrupt
* code will straighten it all out
*/
paca->xLpPaca.xDecrInt = 1;
local_irq_enable();
}
}
#endif /* CONFIG_PPC_ISERIES */
...@@ -1290,6 +1290,11 @@ _GLOBAL(sys_call_table) ...@@ -1290,6 +1290,11 @@ _GLOBAL(sys_call_table)
.long sys_ni_syscall /* reserved for alloc_hugepages */ .long sys_ni_syscall /* reserved for alloc_hugepages */
.long sys_ni_syscall /* reserved for free_hugepages */ .long sys_ni_syscall /* reserved for free_hugepages */
.long sys_exit_group .long sys_exit_group
.long sys_lookup_dcookie /* 235 */
.long sys_epoll_create
.long sys_epoll_ctl
.long sys_epoll_wait
.long sys_remap_file_pages
.rept NR_syscalls-(.-sys_call_table)/4 .rept NR_syscalls-(.-sys_call_table)/4
.long sys_ni_syscall .long sys_ni_syscall
......
/*
* BK Id: %F% %I% %G% %U% %#%
*/
/*
* power_save() rountine for classic PPC CPUs.
*
* Written by Cort Dougan (cort@cs.nmt.edu)
*
* 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; either version
* 2 of the License, or (at your option) any later version.
*
*/
#include <linux/sched.h>
#include <linux/smp.h>
#include <linux/stringify.h>
#include <asm/cputable.h>
#include <asm/current.h>
#include <asm/processor.h>
unsigned long powersave_nap = 0;
#define DSSALL .long (0x1f<<26)+(0x10<<21)+(0x336<<1)
void
ppc6xx_idle(void)
{
unsigned long hid0;
int nap = powersave_nap;
/* 7450 has no DOZE mode mode, we return if powersave_nap
* isn't enabled
*/
if (!(nap || (cur_cpu_spec[smp_processor_id()]->cpu_features
& CPU_FTR_CAN_DOZE)))
return;
/*
* Disable interrupts to prevent a lost wakeup
* when going to sleep. This is necessary even with
* RTLinux since we are not guaranteed an interrupt
* didn't come in and is waiting for a __sti() before
* emulating one. This way, we really do hard disable.
*
* We assume that we're sti-ed when we come in here. We
* are in the idle loop so if we're cli-ed then it's a bug
* anyway.
* -- Cort
*/
_nmask_and_or_msr(MSR_EE, 0);
if (!need_resched()) {
__asm__ __volatile__("mfspr %0,1008":"=r"(hid0):);
hid0 &= ~(HID0_NAP | HID0_SLEEP | HID0_DOZE);
hid0 |= (powersave_nap ? HID0_NAP : HID0_DOZE) | HID0_DPM;
__asm__ __volatile__("mtspr 1008,%0"::"r"(hid0));
/* Flush pending data streams, consider this instruction
* exist on all altivec capable CPUs
*/
__asm__ __volatile__("98: " __stringify(DSSALL) "\n"
" sync\n"
"99:\n"
".section __ftr_fixup,\"a\"\n"
" .long %0\n"
" .long %1\n"
" .long 98b\n"
" .long 99b\n"
".previous"::"i"
(CPU_FTR_ALTIVEC), "i"(CPU_FTR_ALTIVEC));
/* set the POW bit in the MSR, and enable interrupts
* so we wake up sometime! */
_nmask_and_or_msr(0, MSR_POW | MSR_EE);
}
_nmask_and_or_msr(0, MSR_EE);
}
...@@ -54,6 +54,8 @@ extern void xmon_map_scc(void); ...@@ -54,6 +54,8 @@ extern void xmon_map_scc(void);
extern void kgdb_map_scc(void); extern void kgdb_map_scc(void);
#endif #endif
extern void ppc6xx_idle(void);
extern boot_infos_t *boot_infos; extern boot_infos_t *boot_infos;
char saved_command_line[256]; char saved_command_line[256];
unsigned char aux_device_present; unsigned char aux_device_present;
...@@ -528,6 +530,10 @@ machine_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -528,6 +530,10 @@ machine_init(unsigned long r3, unsigned long r4, unsigned long r5,
strcpy(cmd_line, CONFIG_CMDLINE); strcpy(cmd_line, CONFIG_CMDLINE);
#endif /* CONFIG_CMDLINE */ #endif /* CONFIG_CMDLINE */
#if defined(CONFIG_6xx) || defined(CONFIG_ALL_PPC)
ppc_md.power_save = ppc6xx_idle;
#endif
platform_init(r3, r4, r5, r6, r7); platform_init(r3, r4, r5, r6, r7);
if (ppc_md.progress) if (ppc_md.progress)
......
...@@ -472,11 +472,23 @@ void __init mem_init(void) ...@@ -472,11 +472,23 @@ void __init mem_init(void)
if (agp_special_page) if (agp_special_page)
printk(KERN_INFO "AGP special page: 0x%08lx\n", agp_special_page); printk(KERN_INFO "AGP special page: 0x%08lx\n", agp_special_page);
#endif /* defined(CONFIG_ALL_PPC) */ #endif /* defined(CONFIG_ALL_PPC) */
#ifdef CONFIG_PPC_ISERIES
#ifdef CONFIG_PPC_ISERIES
create_virtual_bus_tce_table(); create_virtual_bus_tce_table();
#endif /* CONFIG_PPC_ISERIES */ #endif /* CONFIG_PPC_ISERIES */
/* Make sure all our pagetable pages have page->mapping
and page->index set correctly. */
for (addr = KERNELBASE; addr != 0; addr += PGDIR_SIZE) {
struct page *pg;
pmd_t *pmd = pmd_offset(pgd_offset_k(addr), addr);
if (pmd_present(*pmd)) {
pg = pmd_page(*pmd);
pg->mapping = (void *) &init_mm;
pg->index = addr;
}
}
mem_init_done = 1; mem_init_done = 1;
} }
...@@ -556,28 +568,17 @@ void flush_dcache_page(struct page *page) ...@@ -556,28 +568,17 @@ void flush_dcache_page(struct page *page)
clear_bit(PG_arch_1, &page->flags); clear_bit(PG_arch_1, &page->flags);
} }
void flush_icache_page(struct vm_area_struct *vma, struct page *page)
{
unsigned long phys;
if (page->mapping && !PageReserved(page)
&& !test_bit(PG_arch_1, &page->flags)) {
phys = page_to_pfn(page) << PAGE_SHIFT;
__flush_dcache_icache_phys(phys);
set_bit(PG_arch_1, &page->flags);
}
}
void clear_user_page(void *page, unsigned long vaddr, struct page *pg) void clear_user_page(void *page, unsigned long vaddr, struct page *pg)
{ {
clear_page(page); clear_page(page);
clear_bit(PG_arch_1, &pg->flags);
} }
void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
struct page *pg) struct page *pg)
{ {
copy_page(vto, vfrom); copy_page(vto, vfrom);
__flush_dcache_icache(vto); clear_bit(PG_arch_1, &pg->flags);
} }
void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
...@@ -589,3 +590,38 @@ void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, ...@@ -589,3 +590,38 @@ void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
flush_icache_range(maddr, maddr + len); flush_icache_range(maddr, maddr + len);
kunmap(page); kunmap(page);
} }
/*
* This is called at the end of handling a user page fault, when the
* fault has been handled by updating a PTE in the linux page tables.
* We use it to preload an HPTE into the hash table corresponding to
* the updated linux PTE.
*/
void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
pte_t pte)
{
/* handle i-cache coherency */
unsigned long pfn = pte_pfn(pte);
if (pfn_valid(pfn)) {
struct page *page = pfn_to_page(pfn);
if (!PageReserved(page)
&& !test_bit(PG_arch_1, &page->flags)) {
__flush_dcache_icache((void *) address);
set_bit(PG_arch_1, &page->flags);
}
}
#ifdef CONFIG_PPC_STD_MMU
/* We only want HPTEs for linux PTEs that have _PAGE_ACCESSED set */
if (Hash != 0 && pte_young(pte)) {
struct mm_struct *mm;
pmd_t *pmd;
mm = (address < TASK_SIZE)? vma->vm_mm: &init_mm;
pmd = pmd_offset(pgd_offset(mm, address), address);
if (!pmd_none(*pmd))
add_hash_page(mm->context, address, pmd_val(*pmd));
}
#endif
}
...@@ -280,27 +280,3 @@ void __init MMU_init_hw(void) ...@@ -280,27 +280,3 @@ void __init MMU_init_hw(void)
if ( ppc_md.progress ) ppc_md.progress("hash:done", 0x205); if ( ppc_md.progress ) ppc_md.progress("hash:done", 0x205);
} }
/*
* This is called at the end of handling a user page fault, when the
* fault has been handled by updating a PTE in the linux page tables.
* We use it to preload an HPTE into the hash table corresponding to
* the updated linux PTE.
*/
void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
pte_t pte)
{
struct mm_struct *mm;
pmd_t *pmd;
static int nopreload;
if (Hash == 0 || nopreload)
return;
/* We only want HPTEs for linux PTEs that have _PAGE_ACCESSED set */
if (!pte_young(pte))
return;
mm = (address < TASK_SIZE)? vma->vm_mm: &init_mm;
pmd = pmd_offset(pgd_offset(mm, address), address);
if (!pmd_none(*pmd))
add_hash_page(mm->context, address, pmd_val(*pmd));
}
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#ifndef __ASM_ASH_H__ #ifndef __ASM_ASH_H__
#define __ASM_ASH_H__ #define __ASM_ASH_H__
#include <platforms/ibm_ocp.h> #include <platforms/4xx/ibm_ocp.h>
#include <platforms/ibmnp405h.h> #include <platforms/4xx/ibmnp405h.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/* /*
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#ifndef __ASM_CEDER_H__ #ifndef __ASM_CEDER_H__
#define __ASM_CEDER_H__ #define __ASM_CEDER_H__
#include <platforms/ibmnp405l.h> #include <platforms/4xx/ibmnp405l.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/* /*
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/todc.h> #include <asm/todc.h>
#include <platforms/ibm_ocp.h> #include <platforms/4xx/ibm_ocp.h>
#undef DEBUG #undef DEBUG
#ifdef DEBUG #ifdef DEBUG
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#define __ASM_EP405_H__ #define __ASM_EP405_H__
/* We have a 405GP core */ /* We have a 405GP core */
#include <platforms/ibm405gp.h> #include <platforms/4xx/ibm405gp.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
typedef struct board_info { typedef struct board_info {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <linux/threads.h> #include <linux/threads.h>
#include <linux/param.h> #include <linux/param.h>
#include <linux/string.h> #include <linux/string.h>
#include <platforms/ibm405gp.h> #include <platforms/4xx/ibm405gp.h>
const struct pcil0_regs *PCIL_ADDR[] = { const struct pcil0_regs *PCIL_ADDR[] = {
(struct pcil0_regs *) PCIL0_BASE, (struct pcil0_regs *) PCIL0_BASE,
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#define __ASM_IBM405GP_H__ #define __ASM_IBM405GP_H__
#include <linux/config.h> #include <linux/config.h>
#include <platforms/ibm_ocp.h> #include <platforms/4xx/ibm_ocp.h>
/* ibm405.h at bottom of this file */ /* ibm405.h at bottom of this file */
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
#define DCRN_UIC0_BASE 0x0C0 #define DCRN_UIC0_BASE 0x0C0
#define UIC0 DCRN_UIC0_BASE #define UIC0 DCRN_UIC0_BASE
#include <platforms/ibm405.h> #include <asm/ibm405.h>
#endif /* __ASM_IBM405GP_H__ */ #endif /* __ASM_IBM405GP_H__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <linux/threads.h> #include <linux/threads.h>
#include <linux/param.h> #include <linux/param.h>
#include <linux/string.h> #include <linux/string.h>
#include <platforms/ibmnp405h.h> #include <platforms/4xx/ibmnp405h.h>
const struct NS16550* COM_PORTS[] = const struct NS16550* COM_PORTS[] =
{ {
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#define __ASM_IBMNP405H_H__ #define __ASM_IBMNP405H_H__
#include <linux/config.h> #include <linux/config.h>
#include <platforms/ibm_ocp.h> #include <platforms/4xx/ibm_ocp.h>
/* ibm405.h at bottom of this file */ /* ibm405.h at bottom of this file */
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
#define DCRN_UIC1_VCR (DCRN_UIC1_BASE + 0x8) #define DCRN_UIC1_VCR (DCRN_UIC1_BASE + 0x8)
#endif #endif
#include <platforms/ibm405.h> #include <asm/ibm405.h>
#endif /* __ASM_IBMNP405H_H__ */ #endif /* __ASM_IBMNP405H_H__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <linux/threads.h> #include <linux/threads.h>
#include <linux/param.h> #include <linux/param.h>
#include <linux/string.h> #include <linux/string.h>
#include <platforms/ibmnp405l.h> #include <platforms/4xx/ibmnp405l.h>
const struct NS16550* COM_PORTS[] = const struct NS16550* COM_PORTS[] =
{ {
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#define __ASM_IBMNP405L_H__ #define __ASM_IBMNP405L_H__
#include <linux/config.h> #include <linux/config.h>
#include <platforms/ibm_ocp.h> #include <platforms/4xx/ibm_ocp.h>
/* ibm405.h at bottom of this file */ /* ibm405.h at bottom of this file */
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
#define DCRN_UIC1_VCR (DCRN_UIC1_BASE + 0x8) #define DCRN_UIC1_VCR (DCRN_UIC1_BASE + 0x8)
#endif #endif
#include <platforms/ibm405.h> #include <asm/ibm405.h>
#endif /* __ASM_IBMNP405L_H__ */ #endif /* __ASM_IBMNP405L_H__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <platforms/ibmstb3.h> #include <platforms/4xx/ibmstb3.h>
const struct NS16550* COM_PORTS[] = const struct NS16550* COM_PORTS[] =
{ {
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#define __ASM_IBMSTBX_H__ #define __ASM_IBMSTBX_H__
#include <linux/config.h> #include <linux/config.h>
#include <platforms/ibm_ocp.h> #include <platforms/4xx/ibm_ocp.h>
/* ibm405.h at bottom of this file */ /* ibm405.h at bottom of this file */
...@@ -282,7 +282,7 @@ ...@@ -282,7 +282,7 @@
#define DCRN_OCMDSCR (DCRN_OCM0_BASE + 0x3) /* OCM Data Side Control */ #define DCRN_OCMDSCR (DCRN_OCM0_BASE + 0x3) /* OCM Data Side Control */
#endif #endif
#include <platforms/ibm405.h> #include <asm/ibm405.h>
#endif /* __ASM_IBMSTBX_H__ */ #endif /* __ASM_IBMSTBX_H__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <platforms/ibmstb4.h> #include <platforms/4xx/ibmstb4.h>
const struct NS16550* COM_PORTS[] = const struct NS16550* COM_PORTS[] =
{ {
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#define __ASM_IBMSTB4_H__ #define __ASM_IBMSTB4_H__
#include <linux/config.h> #include <linux/config.h>
#include <platforms/ibm_ocp.h> #include <platforms/4xx/ibm_ocp.h>
/* serial port defines */ /* serial port defines */
#define STB04xxx_IO_BASE ((uint)0xe0000000) #define STB04xxx_IO_BASE ((uint)0xe0000000)
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
#define DCRN_BESR0 (DCRN_EBIMC_BASE + 0x21) /* Bus Error Status Register */ #define DCRN_BESR0 (DCRN_EBIMC_BASE + 0x21) /* Bus Error Status Register */
#define DCRN_BIUCR (DCRN_EBIMC_BASE + 0x2A) /* Bus Interfac Unit Ctrl Reg */ #define DCRN_BIUCR (DCRN_EBIMC_BASE + 0x2A) /* Bus Interfac Unit Ctrl Reg */
#include <platforms/ibm405.h> #include <asm/ibm405.h>
#endif /* __ASM_IBMSTB4_H__ */ #endif /* __ASM_IBMSTB4_H__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#define __ASM_REDWOOD_H__ #define __ASM_REDWOOD_H__
/* Redwoods have an STB03xxx or STB04xxx core */ /* Redwoods have an STB03xxx or STB04xxx core */
#include <platforms/ibmstb3.h> #include <platforms/4xx/ibmstb3.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
typedef struct board_info { typedef struct board_info {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#define __ASM_REDWOOD5_H__ #define __ASM_REDWOOD5_H__
/* Redwood5 has an STB04xxx core */ /* Redwood5 has an STB04xxx core */
#include <platforms/ibmstb4.h> #include <platforms/4xx/ibmstb4.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
typedef struct board_info { typedef struct board_info {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/time.h> #include <asm/time.h>
#include <asm/io.h> #include <asm/io.h>
#include <platforms/ibm_ocp.h> #include <platforms/4xx/ibm_ocp.h>
#ifdef CONFIG_PPC_RTC #ifdef CONFIG_PPC_RTC
#include <asm/todc.h> #include <asm/todc.h>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#define __ASM_WALNUT_H__ #define __ASM_WALNUT_H__
/* We have a 405GP core */ /* We have a 405GP core */
#include <platforms/ibm405gp.h> #include <platforms/4xx/ibm405gp.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/* /*
......
...@@ -37,14 +37,14 @@ obj-$(CONFIG_LOPEC) += lopec_setup.o lopec_pci.o ...@@ -37,14 +37,14 @@ obj-$(CONFIG_LOPEC) += lopec_setup.o lopec_pci.o
obj-$(CONFIG_MCPN765) += mcpn765_setup.o mcpn765_pci.o obj-$(CONFIG_MCPN765) += mcpn765_setup.o mcpn765_pci.o
obj-$(CONFIG_MENF1) += menf1_setup.o menf1_pci.o obj-$(CONFIG_MENF1) += menf1_setup.o menf1_pci.o
obj-$(CONFIG_MVME5100) += mvme5100_setup.o mvme5100_pci.o obj-$(CONFIG_MVME5100) += mvme5100_setup.o mvme5100_pci.o
obj-$(CONFIG_PAL4) += pal4_setup.o pal4_pci.o cpc700_pic.o obj-$(CONFIG_PAL4) += pal4_setup.o pal4_pci.o
obj-$(CONFIG_PCORE) += pcore_setup.o pcore_pci.o obj-$(CONFIG_PCORE) += pcore_setup.o pcore_pci.o
obj-$(CONFIG_POWERPMC250) += powerpmc250.o obj-$(CONFIG_POWERPMC250) += powerpmc250.o
obj-$(CONFIG_PPLUS) += pplus_pci.o pplus_setup.o obj-$(CONFIG_PPLUS) += pplus_pci.o pplus_setup.o
obj-$(CONFIG_PRPMC750) += prpmc750_setup.o prpmc750_pci.o obj-$(CONFIG_PRPMC750) += prpmc750_setup.o prpmc750_pci.o
obj-$(CONFIG_PRPMC800) += prpmc800_setup.o prpmc800_pci.o obj-$(CONFIG_PRPMC800) += prpmc800_setup.o prpmc800_pci.o
obj-$(CONFIG_SANDPOINT) += sandpoint_setup.o sandpoint_pci.o obj-$(CONFIG_SANDPOINT) += sandpoint_setup.o sandpoint_pci.o
obj-$(CONFIG_SPRUCE) += spruce_setup.o spruce_pci.o cpc700_pic.o obj-$(CONFIG_SPRUCE) += spruce_setup.o spruce_pci.o
obj-$(CONFIG_ZX4500) += zx4500_setup.o zx4500_pci.o obj-$(CONFIG_ZX4500) += zx4500_setup.o zx4500_pci.o
obj-$(CONFIG_PPC_ISERIES) += iSeries_setup.o iSeries_time.o \ obj-$(CONFIG_PPC_ISERIES) += iSeries_setup.o iSeries_time.o \
iSeries_dma.o iSeries_pic.o iSeries_dma.o iSeries_pic.o
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
#include "cpc710.h" #include <syslib/cpc710.h>
#include "adir.h" #include "adir.h"
#undef DEBUG #undef DEBUG
......
...@@ -57,6 +57,7 @@ static void setup_iSeries_cache_sizes( void ); ...@@ -57,6 +57,7 @@ static void setup_iSeries_cache_sizes( void );
extern void iSeries_pci_Initialize(void); extern void iSeries_pci_Initialize(void);
static int iSeries_show_cpuinfo(struct seq_file *m); static int iSeries_show_cpuinfo(struct seq_file *m);
static int iSeries_show_percpuinfo(struct seq_file *m, int i); static int iSeries_show_percpuinfo(struct seq_file *m, int i);
extern void iSeries_idle(void);
extern struct pci_ops iSeries_pci_ops; extern struct pci_ops iSeries_pci_ops;
/* Global Variables */ /* Global Variables */
...@@ -537,6 +538,8 @@ iSeries_setup_arch(void) ...@@ -537,6 +538,8 @@ iSeries_setup_arch(void)
mf_init(); mf_init();
viopath_init(); viopath_init();
*/ */
ppc_md.idle = iSeries_idle;
} }
/* /*
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
#include "cpc710.h" #include <syslib/cpc710.h>
#include "k2.h" #include "k2.h"
#undef DEBUG #undef DEBUG
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include "cpc700.h" #include <syslib/cpc700.h>
#include "pal4.h" #include "pal4.h"
/* not much to this.... */ /* not much to this.... */
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
#include <asm/todc.h> #include <asm/todc.h>
#include <asm/bootinfo.h> #include <asm/bootinfo.h>
#include "cpc700.h" #include <syslib/cpc700.h>
#include "pal4.h" #include "pal4.h"
extern void pal4_find_bridges(void); extern void pal4_find_bridges(void);
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
#include <platforms/spruce.h> #include <platforms/spruce.h>
#include "cpc700.h" #include <syslib/cpc700.h>
static inline int static inline int
spruce_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) spruce_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#include <asm/todc.h> #include <asm/todc.h>
#include <asm/bootinfo.h> #include <asm/bootinfo.h>
#include "cpc700.h" #include <syslib/cpc700.h>
extern void spruce_init_IRQ(void); extern void spruce_init_IRQ(void);
extern int spruce_get_irq(struct pt_regs *); extern int spruce_get_irq(struct pt_regs *);
...@@ -185,8 +185,6 @@ spruce_halt(void) ...@@ -185,8 +185,6 @@ spruce_halt(void)
spruce_restart(NULL); spruce_restart(NULL);
} }
extern int boot_mem_size;
static void __init static void __init
spruce_map_io(void) spruce_map_io(void)
{ {
......
#
# Makefile for the linux kernel.
#
ifdef CONFIG_PPC64BRIDGE
EXTRA_AFLAGS := -Wa,-mppc64bridge
endif
ifdef CONFIG_4xx
EXTRA_AFLAGS := -Wa,-m405
endif
CFLAGS_prom_init.o += -mrelocatable-lib
CFLAGS_btext.o += -mrelocatable-lib
obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o
ifeq ($(CONFIG_4xx),y)
obj-$(CONFIG_4xx) += ppc4xx_setup.o ppc4xx_pic.o ppc4xx_serial.o
obj-$(CONFIG_PPC_RTC) += todc_time.o
obj-$(CONFIG_KGDB) += ppc4xx_kgdb.o
obj-$(CONFIG_405_DMA) += ppc405_dma.o
obj-$(CONFIG_PCI) += ppc405_pci.o indirect_pci.o pci_auto.o
obj-$(CONFIG_PM) += ppc4xx_pm.o
endif
obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o
ifeq ($(CONFIG_8xx),y)
obj-$(CONFIG_PCI) += qspan_pci.o i8259.o
endif
obj-$(CONFIG_ALL_PPC) += prom_init.o prom.o open_pic.o \
indirect_pci.o i8259.o
obj-$(CONFIG_ADIR) += i8259.o indirect_pci.o pci_auto.o \
todc_time.o
obj-$(CONFIG_EV64260) += gt64260_common.o gt64260_pic.o \
indirect_pci.o todc_time.o pci_auto.o
obj-$(CONFIG_GEMINI) += open_pic.o i8259.o indirect_pci.o
obj-$(CONFIG_K2) += i8259.o indirect_pci.o todc_time.o \
pci_auto.o
obj-$(CONFIG_LOPEC) += mpc10x_common.o indirect_pci.o pci_auto.o \
open_pic.o i8259.o todc_time.o
obj-$(CONFIG_MCPN765) += todc_time.o indirect_pci.o pci_auto.o \
open_pic.o i8259.o pplus_common.o
obj-$(CONFIG_MENF1) += todc_time.o i8259.o mpc10x_common.o \
pci_auto.o indirect_pci.o
obj-$(CONFIG_MVME5100) += open_pic.o todc_time.o indirect_pci.o \
i8259.o pci_auto.o pplus_common.o
obj-$(CONFIG_PAL4) += cpc700_pic.o
obj-$(CONFIG_PCORE) += mpc10x_common.o todc_time.o i8259.o \
indirect_pci.o pci_auto.o
obj-$(CONFIG_POWERPMC250) += open_pic.o mpc10x_common.o \
indirect_pci.o pci_auto.o
obj-$(CONFIG_PPLUS) += pplus_common.o open_pic.o i8259.o \
indirect_pci.o todc_time.o pci_auto.o
obj-$(CONFIG_PRPMC750) += open_pic.o indirect_pci.o pci_auto.o \
pplus_common.o
obj-$(CONFIG_PRPMC800) += open_pic.o indirect_pci.o pci_auto.o \
pplus_common.o harrier.o
obj-$(CONFIG_SANDPOINT) += i8259.o open_pic.o mpc10x_common.o \
pci_auto.o indirect_pci.o todc_time.o
obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \
todc_time.o
obj-$(CONFIG_ZX4500) += indirect_pci.o pci_auto.o mpc10x_common.o \
i8259.o open_pic.o
obj-$(CONFIG_8260) += m8260_setup.o ppc8260_pic.o
obj-$(CONFIG_BOOTX_TEXT) += btext.o
include $(TOPDIR)/Rules.make
find_name : find_name.c
$(HOSTCC) $(HOSTCFLAGS) -o find_name find_name.c
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <asm/ibm4xx.h> #include <asm/ibm4xx.h>
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
#include <platforms/ibm_ocp.h> #include <platforms/4xx/ibm_ocp.h>
#ifdef CONFIG_DEBUG_BRINGUP #ifdef CONFIG_DEBUG_BRINGUP
#define DBG(x...) printk(x) #define DBG(x...) printk(x)
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#define LSR_TEMT 0x40 /* Xmitter empty */ #define LSR_TEMT 0x40 /* Xmitter empty */
#define LSR_ERR 0x80 /* Error */ #define LSR_ERR 0x80 /* Error */
#include <platforms/ibm_ocp.h> #include <platforms/4xx/ibm_ocp.h>
extern struct NS16550* COM_PORTS[]; extern struct NS16550* COM_PORTS[];
#ifndef NULL #ifndef NULL
......
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
#define flush_cache_range(vma, a, b) do { } while (0) #define flush_cache_range(vma, a, b) do { } while (0)
#define flush_cache_page(vma, p) do { } while (0) #define flush_cache_page(vma, p) do { } while (0)
#define flush_page_to_ram(page) do { } while (0) #define flush_page_to_ram(page) do { } while (0)
#define flush_icache_page(vma, page) do { } while (0)
extern void flush_dcache_page(struct page *page); extern void flush_dcache_page(struct page *page);
extern void flush_icache_page(struct vm_area_struct *vma, struct page *page);
extern void flush_icache_range(unsigned long, unsigned long); extern void flush_icache_range(unsigned long, unsigned long);
extern void flush_icache_user_range(struct vm_area_struct *vma, extern void flush_icache_user_range(struct vm_area_struct *vma,
struct page *page, unsigned long addr, int len); struct page *page, unsigned long addr, int len);
......
...@@ -19,35 +19,35 @@ ...@@ -19,35 +19,35 @@
#ifdef CONFIG_40x #ifdef CONFIG_40x
#if defined(CONFIG_ASH) #if defined(CONFIG_ASH)
#include <platforms/ash.h> #include <platforms/4xx/ash.h>
#endif #endif
#if defined (CONFIG_CEDER) #if defined (CONFIG_CEDER)
#include <platforms/ceder.h> #include <platforms/4xx/ceder.h>
#endif #endif
#if defined(CONFIG_CPCI405) #if defined(CONFIG_CPCI405)
#include <platforms/cpci405.h> #include <platforms/4xx/cpci405.h>
#endif #endif
#if defined(CONFIG_EP405) #if defined(CONFIG_EP405)
#include <platforms/ep405.h> #include <platforms/4xx/ep405.h>
#endif #endif
#if defined(CONFIG_OAK) #if defined(CONFIG_OAK)
#include <platforms/oak.h> #include <platforms/4xx/oak.h>
#endif #endif
#if defined(CONFIG_REDWOOD_4) #if defined(CONFIG_REDWOOD_4)
#include <platforms/redwood.h> #include <platforms/4xx/redwood.h>
#endif #endif
#if defined(CONFIG_REDWOOD_5) #if defined(CONFIG_REDWOOD_5)
#include <platforms/redwood5.h> #include <platforms/4xx/redwood5.h>
#endif #endif
#if defined(CONFIG_WALNUT) #if defined(CONFIG_WALNUT)
#include <platforms/walnut.h> #include <platforms/4xx/walnut.h>
#endif #endif
#ifndef PPC4xx_MACHINE_NAME #ifndef PPC4xx_MACHINE_NAME
......
...@@ -37,6 +37,9 @@ struct machdep_calls { ...@@ -37,6 +37,9 @@ struct machdep_calls {
void (*power_off)(void); void (*power_off)(void);
void (*halt)(void); void (*halt)(void);
void (*idle)(void);
void (*power_save)(void);
long (*time_init)(void); /* Optional, may be NULL */ long (*time_init)(void); /* Optional, may be NULL */
int (*set_rtc_time)(unsigned long nowtime); int (*set_rtc_time)(unsigned long nowtime);
unsigned long (*get_rtc_time)(void); unsigned long (*get_rtc_time)(void);
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#define MAP_GROWSDOWN 0x0100 /* stack-like segment */ #define MAP_GROWSDOWN 0x0100 /* stack-like segment */
#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ #define MAP_DENYWRITE 0x0800 /* ETXTBSY */
#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
#define MAP_NONBLOCK 0x10000 /* do not block on IO */
#define MS_ASYNC 1 /* sync memory asynchronously */ #define MS_ASYNC 1 /* sync memory asynchronously */
#define MS_INVALIDATE 2 /* invalidate the caches */ #define MS_INVALIDATE 2 /* invalidate the caches */
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#define POLLWRNORM 0x0100 #define POLLWRNORM 0x0100
#define POLLWRBAND 0x0200 #define POLLWRBAND 0x0200
#define POLLMSG 0x0400 #define POLLMSG 0x0400
#define POLLREMOVE 0x1000
struct pollfd { struct pollfd {
int fd; int fd;
......
...@@ -30,7 +30,6 @@ static inline void flush_tlb_range(struct vm_area_struct *vma, ...@@ -30,7 +30,6 @@ static inline void flush_tlb_range(struct vm_area_struct *vma,
static inline void flush_tlb_kernel_range(unsigned long start, static inline void flush_tlb_kernel_range(unsigned long start,
unsigned long end) unsigned long end)
{ _tlbia(); } { _tlbia(); }
#define update_mmu_cache(vma, addr, pte) do { } while (0)
#elif defined(CONFIG_8xx) #elif defined(CONFIG_8xx)
#define __tlbia() asm volatile ("tlbia; sync" : : : "memory") #define __tlbia() asm volatile ("tlbia; sync" : : : "memory")
...@@ -46,7 +45,6 @@ static inline void flush_tlb_range(struct mm_struct *mm, ...@@ -46,7 +45,6 @@ static inline void flush_tlb_range(struct mm_struct *mm,
static inline void flush_tlb_kernel_range(unsigned long start, static inline void flush_tlb_kernel_range(unsigned long start,
unsigned long end) unsigned long end)
{ __tlbia(); } { __tlbia(); }
#define update_mmu_cache(vma, addr, pte) do { } while (0)
#else /* 6xx, 7xx, 7xxx cpus */ #else /* 6xx, 7xx, 7xxx cpus */
struct mm_struct; struct mm_struct;
...@@ -56,15 +54,6 @@ extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); ...@@ -56,15 +54,6 @@ extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
unsigned long end); unsigned long end);
extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
/*
* This gets called at the end of handling a page fault, when
* the kernel has put a new PTE into the page table for the process.
* We use it to put a corresponding HPTE into the hash table
* ahead of time, instead of waiting for the inevitable extra
* hash-table miss exception.
*/
extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
#endif #endif
/* /*
...@@ -77,5 +66,16 @@ static inline void flush_tlb_pgtables(struct mm_struct *mm, ...@@ -77,5 +66,16 @@ static inline void flush_tlb_pgtables(struct mm_struct *mm,
{ {
} }
/*
* This gets called at the end of handling a page fault, when
* the kernel has put a new PTE into the page table for the process.
* We use it to ensure coherency between the i-cache and d-cache
* for the page which has just been mapped in.
* On machines which use an MMU hash table, we use this to put a
* corresponding HPTE into the hash table ahead of time, instead of
* waiting for the inevitable extra hash-table miss exception.
*/
extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
#endif /* _PPC_TLBFLUSH_H */ #endif /* _PPC_TLBFLUSH_H */
#endif /*__KERNEL__ */ #endif /*__KERNEL__ */
...@@ -239,6 +239,11 @@ ...@@ -239,6 +239,11 @@
#define __NR_alloc_hugepages 232 #define __NR_alloc_hugepages 232
#define __NR_free_hugepages 233 #define __NR_free_hugepages 233
#define __NR_exit_group 234 #define __NR_exit_group 234
#define __NR_lookup_dcookie 235
#define __NR_sys_epoll_create 236
#define __NR_sys_epoll_ctl 237
#define __NR_sys_epoll_wait 238
#define __NR_remap_file_pages 239
#define __NR(n) #n #define __NR(n) #n
......
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