dsisr = regs->dsisr;
/* Power4 doesn't set DSISR for an alignment interrupt */
- if (__is_processor(PV_POWER4))
+ if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p))
dsisr = make_dsisr( *((unsigned *)regs->nip) );
/* extract the operation and registers from the dsisr */
mask = pteg_count-1;
/* XXX we currently map kernel text rw, should fix this */
- if (__is_processor(PV_POWER4) && _naca->physicalMemorySize > 256*MB) {
+ if (cpu_has_largepage() && _naca->physicalMemorySize > 256*MB) {
create_pte_mapping((unsigned long)KERNELBASE,
KERNELBASE + 256*MB, mode_rw, mask, 0);
create_pte_mapping((unsigned long)KERNELBASE + 256*MB,
#define PPC64_HWNOEXEC (1 << 2)
- /* We do lazy icache flushing on POWER4 */
- if (unlikely(__is_processor(PV_POWER4) &&
- pfn_valid(pte_pfn(new_pte)))) {
+ /* We do lazy icache flushing on cpus that support it */
+ if (unlikely(cpu_has_noexecute() && pfn_valid(pte_pfn(new_pte)))) {
struct page *page = pte_page(new_pte);
/* page is dirty */
{
unsigned long i;
unsigned long mem_blocks = 0;
- if ( __is_processor( PV_POWER4 ) )
+ if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p))
mem_blocks = iSeries_process_Regatta_mainstore_vpd( mb_array, max_entries );
else
mem_blocks = iSeries_process_Condor_mainstore_vpd( mb_array, max_entries );
hptep->dw0.dword0 = 0;
/* Invalidate the tlb */
- if (!large && local && __is_processor(PV_POWER4)) {
+ if (cpu_has_tlbiel() && !large && local) {
_tlbiel(va);
} else {
spin_lock_irqsave(&pSeries_tlbie_lock, flags);
hptep->dw0.dword0 = 0;
}
- if (!large && local && __is_processor(PV_POWER4)) {
+ if (cpu_has_tlbiel() && !large && local) {
asm volatile("ptesync":::"memory");
for (i = 0; i < j; i++) {
* __get_free_pages() might give us a page > KERNBASE+256M which
* is mapped with large ptes so we can't set up the guard page.
*/
- if (__is_processor(PV_POWER4))
+ if (cpu_has_largepage())
return;
for (i=0; i < NR_CPUS; i++) {
case PV_SSTAR:
seq_printf(m, "RS64-IV (sstar)\n");
break;
+ case PV_POWER4p:
+ seq_printf(m, "POWER4+ (gq)\n");
+ break;
case PV_630:
seq_printf(m, "POWER3 (630)\n");
break;
int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid);
void make_slbe(unsigned long esid, unsigned long vsid, int large);
-#define cpu_has_slb() (__is_processor(PV_POWER4))
-
/*
* Build an entry for the base kernel segment and put it into
* the segment table or SLB. All other segment table or SLB
if (!user_mode(regs)) {
/* Attempt to recover if the interrupt is recoverable */
if (regs->msr & MSR_RI) {
- if (__is_processor(PV_POWER4) &&
- power4_handle_mce(regs))
+ if ((__is_processor(PV_POWER4) ||
+ __is_processor(PV_POWER4p)) &&
+ power4_handle_mce(regs))
return;
}
#include <asm/tlb.h>
#include <asm/naca.h>
#include <asm/eeh.h>
+#include <asm/processor.h>
#include <asm/ppcdebug.h>
void flush_icache_page(struct vm_area_struct *vma, struct page *page)
{
- if (__is_processor(PV_POWER4))
+ if (cpu_has_noexecute())
return;
if ((vma->vm_flags & VM_EXEC) == 0)
clear_page(page);
/* XXX we shouldnt have to do this, but glibc requires it */
- if (__is_processor(PV_POWER4))
+ if (cpu_has_noexecute())
clear_bit(PG_arch_1, &pg->flags);
else
__flush_dcache_icache(page);
return;
#endif
- if (__is_processor(PV_POWER4))
+ if (cpu_has_noexecute())
clear_bit(PG_arch_1, &pg->flags);
else
__flush_dcache_icache(vto);
}
}
- if (!__is_processor(PV_POWER4)) {
+ if (!__is_processor(PV_POWER4) && !__is_processor(PV_POWER4p)) {
if (dabr.enabled)
set_dabr(dabr.address);
if (iabr.enabled)
if (naca->platform != PLATFORM_PSERIES)
return;
- if (!__is_processor(PV_POWER4)) {
+ if (!__is_processor(PV_POWER4) && !__is_processor(PV_POWER4p)) {
set_dabr(0);
set_iabr(0);
}
cmd = inchar();
switch (cmd) {
case 'd': /* bd - hardware data breakpoint */
- if (__is_processor(PV_POWER4)) {
+ if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p)) {
printf("Not implemented on POWER4\n");
break;
}
dabr.address = (dabr.address & ~7) | mode;
break;
case 'i': /* bi - hardware instr breakpoint */
- if (__is_processor(PV_POWER4)) {
+ if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p)) {
printf("Not implemented on POWER4\n");
break;
}
#define PV_POWER4 0x0035
#define PV_ICESTAR 0x0036
#define PV_SSTAR 0x0037
+#define PV_POWER4p 0x0038
#define PV_630 0x0040
#define PV_630p 0x0041
#define spin_lock_prefetch(x) prefetchw(x)
+#define cpu_has_largepage() (__is_processor(PV_POWER4) || \
+ __is_processor(PV_POWER4p))
+
+#define cpu_has_slb() (__is_processor(PV_POWER4) || \
+ __is_processor(PV_POWER4p))
+
+#define cpu_has_tlbiel() (__is_processor(PV_POWER4) || \
+ __is_processor(PV_POWER4p))
+
+#define cpu_has_noexecute() (__is_processor(PV_POWER4) || \
+ __is_processor(PV_POWER4p))
+
#endif /* ASSEMBLY */
#endif /* __ASM_PPC64_PROCESSOR_H */