Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130895
b: refs/heads/master
c: d352264
h: refs/heads/master
i:
  130893: e54cc8f
  130891: 6314cf2
  130887: 171e040
  130879: e92afb1
v: v3
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed Feb 4, 2009
1 parent e92f01f commit c87c6c7
Show file tree
Hide file tree
Showing 41 changed files with 358 additions and 680 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 024bb9617e01716c5ac7d235f54483cc6018978f
refs/heads/master: d3522648676d4c8869e5539bca081820e69e24a4
53 changes: 15 additions & 38 deletions trunk/arch/blackfin/include/asm/kgdb.h
Original file line number Diff line number Diff line change
@@ -1,32 +1,8 @@
/*
* File: include/asm-blackfin/kgdb.h
* Based on:
* Author: Sonic Zhang
*
* Created:
* Description:
*
* Rev: $Id: kgdb_bfin_linux-2.6.x.patch 4934 2007-02-13 09:32:11Z sonicz $
*
* Modified:
* Copyright 2005-2006 Analog Devices Inc.
*
* Bugs: Enter bugs at http://blackfin.uclinux.org/
/* Blackfin KGDB header
*
* 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.
* Copyright 2005-2009 Analog Devices Inc.
*
* 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. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see the file COPYING, or write
* to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Licensed under the GPL-2 or later.
*/

#ifndef __ASM_BLACKFIN_KGDB_H__
Expand All @@ -37,17 +13,18 @@
/* gdb locks */
#define KGDB_MAX_NO_CPUS 8

/************************************************************************/
/* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/
/* at least NUMREGBYTES*2 are needed for register packets */
/* Longer buffer is needed to list all threads */
/*
* BUFMAX defines the maximum number of characters in inbound/outbound buffers.
* At least NUMREGBYTES*2 are needed for register packets.
* Longer buffer is needed to list all threads.
*/
#define BUFMAX 2048

/*
* Note that this register image is different from
* the register image that Linux produces at interrupt time.
*
* Linux's register image is defined by struct pt_regs in ptrace.h.
* Note that this register image is different from
* the register image that Linux produces at interrupt time.
*
* Linux's register image is defined by struct pt_regs in ptrace.h.
*/
enum regnames {
/* Core Registers */
Expand Down Expand Up @@ -104,14 +81,14 @@ enum regnames {
BFIN_RETX,
BFIN_RETN,
BFIN_RETE,

/* Pseudo Registers */
BFIN_PC,
BFIN_CC,
BFIN_EXTRA1, /* Address of .text section. */
BFIN_EXTRA2, /* Address of .data section. */
BFIN_EXTRA3, /* Address of .bss section. */
BFIN_FDPIC_EXEC,
BFIN_FDPIC_EXEC,
BFIN_FDPIC_INTERP,

/* MMRs */
Expand All @@ -126,7 +103,7 @@ enum regnames {

static inline void arch_kgdb_breakpoint(void)
{
asm(" EXCPT 2;");
asm("EXCPT 2;");
}
#define BREAK_INSTR_SIZE 2
#define CACHE_FLUSH_IS_SAFE 1
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/include/asm/cpudata_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
typedef struct {
/* Dcache line 1 */
unsigned int __softirq_pending; /* must be 1st, see rtrap.S */
unsigned int __nmi_count;
unsigned int __pad0;
unsigned long clock_tick; /* %tick's per second */
unsigned long __pad;
unsigned int __pad1;
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/sparc/include/asm/irq_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ extern void virt_irq_free(unsigned int virt_irq);
extern void __init init_IRQ(void);
extern void fixup_irqs(void);

extern int register_perfctr_intr(void (*handler)(struct pt_regs *));
extern void release_perfctr_intr(void (*handler)(struct pt_regs *));

static inline void set_softint(unsigned long bits)
{
__asm__ __volatile__("wr %0, 0x0, %%set_softint"
Expand Down Expand Up @@ -95,6 +98,5 @@ void __trigger_all_cpu_backtrace(void);
extern void *hardirq_stack[NR_CPUS];
extern void *softirq_stack[NR_CPUS];
#define __ARCH_HAS_DO_SOFTIRQ
#define ARCH_HAS_NMI_WATCHDOG

#endif
2 changes: 0 additions & 2 deletions trunk/arch/sparc/include/asm/kdebug_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ enum die_val {
DIE_TRAP,
DIE_TRAP_TL1,
DIE_CALL,
DIE_NMI,
DIE_NMIWATCHDOG,
};

#endif
10 changes: 0 additions & 10 deletions trunk/arch/sparc/include/asm/nmi.h

This file was deleted.

46 changes: 0 additions & 46 deletions trunk/arch/sparc/include/asm/pcr.h

This file was deleted.

1 change: 0 additions & 1 deletion trunk/arch/sparc/include/asm/pil.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#define PIL_SMP_CTX_NEW_VERSION 4
#define PIL_DEVICE_IRQ 5
#define PIL_SMP_CALL_FUNC_SNGL 6
#define PIL_DEFERRED_PCR_WORK 7
#define PIL_NORMAL_MAX 14
#define PIL_NMI 15

Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/sparc/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ obj-$(CONFIG_SPARC64) += visemul.o
obj-$(CONFIG_SPARC64) += hvapi.o
obj-$(CONFIG_SPARC64) += sstate.o
obj-$(CONFIG_SPARC64) += mdesc.o
obj-$(CONFIG_SPARC64) += pcr.o
obj-$(CONFIG_SPARC64) += nmi.o

# sparc32 do not use GENERIC_HARDIRQS but uses the generic devres implementation
obj-$(CONFIG_SPARC32) += devres.o
Expand Down
33 changes: 11 additions & 22 deletions trunk/arch/sparc/kernel/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ EXPORT_PER_CPU_SYMBOL(__cpu_data);
struct cpu_info {
int psr_vers;
const char *name;
const char *pmu_name;
};

struct fpu_info {
Expand All @@ -46,9 +45,6 @@ struct manufacturer_info {
#define CPU(ver, _name) \
{ .psr_vers = ver, .name = _name }

#define CPU_PMU(ver, _name, _pmu_name) \
{ .psr_vers = ver, .name = _name, .pmu_name = _pmu_name }

#define FPU(ver, _name) \
{ .fp_vers = ver, .name = _name }

Expand Down Expand Up @@ -187,10 +183,10 @@ static const struct manufacturer_info __initconst manufacturer_info[] = {
},{
0x17,
.cpu_info = {
CPU_PMU(0x10, "TI UltraSparc I (SpitFire)", "ultra12"),
CPU_PMU(0x11, "TI UltraSparc II (BlackBird)", "ultra12"),
CPU_PMU(0x12, "TI UltraSparc IIi (Sabre)", "ultra12"),
CPU_PMU(0x13, "TI UltraSparc IIe (Hummingbird)", "ultra12"),
CPU(0x10, "TI UltraSparc I (SpitFire)"),
CPU(0x11, "TI UltraSparc II (BlackBird)"),
CPU(0x12, "TI UltraSparc IIi (Sabre)"),
CPU(0x13, "TI UltraSparc IIe (Hummingbird)"),
CPU(-1, NULL)
},
.fpu_info = {
Expand All @@ -203,7 +199,7 @@ static const struct manufacturer_info __initconst manufacturer_info[] = {
},{
0x22,
.cpu_info = {
CPU_PMU(0x10, "TI UltraSparc I (SpitFire)", "ultra12"),
CPU(0x10, "TI UltraSparc I (SpitFire)"),
CPU(-1, NULL)
},
.fpu_info = {
Expand All @@ -213,12 +209,12 @@ static const struct manufacturer_info __initconst manufacturer_info[] = {
},{
0x3e,
.cpu_info = {
CPU_PMU(0x14, "TI UltraSparc III (Cheetah)", "ultra3"),
CPU_PMU(0x15, "TI UltraSparc III+ (Cheetah+)", "ultra3+"),
CPU_PMU(0x16, "TI UltraSparc IIIi (Jalapeno)", "ultra3i"),
CPU_PMU(0x18, "TI UltraSparc IV (Jaguar)", "ultra3+"),
CPU_PMU(0x19, "TI UltraSparc IV+ (Panther)", "ultra4+"),
CPU_PMU(0x22, "TI UltraSparc IIIi+ (Serrano)", "ultra3i"),
CPU(0x14, "TI UltraSparc III (Cheetah)"),
CPU(0x15, "TI UltraSparc III+ (Cheetah+)"),
CPU(0x16, "TI UltraSparc IIIi (Jalapeno)"),
CPU(0x18, "TI UltraSparc IV (Jaguar)"),
CPU(0x19, "TI UltraSparc IV+ (Panther)"),
CPU(0x22, "TI UltraSparc IIIi+ (Serrano)"),
CPU(-1, NULL)
},
.fpu_info = {
Expand All @@ -238,7 +234,6 @@ static const struct manufacturer_info __initconst manufacturer_info[] = {

const char *sparc_cpu_type;
const char *sparc_fpu_type;
const char *sparc_pmu_type;

unsigned int fsr_storage;

Expand All @@ -249,7 +244,6 @@ static void set_cpu_and_fpu(int psr_impl, int psr_vers, int fpu_vers)

sparc_cpu_type = NULL;
sparc_fpu_type = NULL;
sparc_pmu_type = NULL;
manuf = NULL;

for (i = 0; i < ARRAY_SIZE(manufacturer_info); i++)
Expand All @@ -269,7 +263,6 @@ static void set_cpu_and_fpu(int psr_impl, int psr_vers, int fpu_vers)
{
if (cpu->psr_vers == psr_vers) {
sparc_cpu_type = cpu->name;
sparc_pmu_type = cpu->pmu_name;
sparc_fpu_type = "No FPU";
break;
}
Expand Down Expand Up @@ -297,8 +290,6 @@ static void set_cpu_and_fpu(int psr_impl, int psr_vers, int fpu_vers)
psr_impl, fpu_vers);
sparc_fpu_type = "Unknown FPU";
}
if (sparc_pmu_type == NULL)
sparc_pmu_type = "Unknown PMU";
}

#ifdef CONFIG_SPARC32
Expand All @@ -324,13 +315,11 @@ static void __init sun4v_cpu_probe(void)
case SUN4V_CHIP_NIAGARA1:
sparc_cpu_type = "UltraSparc T1 (Niagara)";
sparc_fpu_type = "UltraSparc T1 integrated FPU";
sparc_pmu_type = "niagara";
break;

case SUN4V_CHIP_NIAGARA2:
sparc_cpu_type = "UltraSparc T2 (Niagara2)";
sparc_fpu_type = "UltraSparc T2 integrated FPU";
sparc_pmu_type = "niagara2";
break;

default:
Expand Down
68 changes: 63 additions & 5 deletions trunk/arch/sparc/kernel/irq_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,6 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n');
skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) {
seq_printf(p, "NMI: ");
for_each_online_cpu(j)
seq_printf(p, "%10u ", cpu_data(j).__nmi_count);
seq_printf(p, " Non-maskable interrupts\n");
}
return 0;
}
Expand Down Expand Up @@ -783,6 +778,69 @@ void do_softirq(void)
local_irq_restore(flags);
}

static void unhandled_perf_irq(struct pt_regs *regs)
{
unsigned long pcr, pic;

read_pcr(pcr);
read_pic(pic);

write_pcr(0);

printk(KERN_EMERG "CPU %d: Got unexpected perf counter IRQ.\n",
smp_processor_id());
printk(KERN_EMERG "CPU %d: PCR[%016lx] PIC[%016lx]\n",
smp_processor_id(), pcr, pic);
}

/* Almost a direct copy of the powerpc PMC code. */
static DEFINE_SPINLOCK(perf_irq_lock);
static void *perf_irq_owner_caller; /* mostly for debugging */
static void (*perf_irq)(struct pt_regs *regs) = unhandled_perf_irq;

/* Invoked from level 15 PIL handler in trap table. */
void perfctr_irq(int irq, struct pt_regs *regs)
{
clear_softint(1 << irq);
perf_irq(regs);
}

int register_perfctr_intr(void (*handler)(struct pt_regs *))
{
int ret;

if (!handler)
return -EINVAL;

spin_lock(&perf_irq_lock);
if (perf_irq != unhandled_perf_irq) {
printk(KERN_WARNING "register_perfctr_intr: "
"perf IRQ busy (reserved by caller %p)\n",
perf_irq_owner_caller);
ret = -EBUSY;
goto out;
}

perf_irq_owner_caller = __builtin_return_address(0);
perf_irq = handler;

ret = 0;
out:
spin_unlock(&perf_irq_lock);

return ret;
}
EXPORT_SYMBOL_GPL(register_perfctr_intr);

void release_perfctr_intr(void (*handler)(struct pt_regs *))
{
spin_lock(&perf_irq_lock);
perf_irq_owner_caller = NULL;
perf_irq = unhandled_perf_irq;
spin_unlock(&perf_irq_lock);
}
EXPORT_SYMBOL_GPL(release_perfctr_intr);

#ifdef CONFIG_HOTPLUG_CPU
void fixup_irqs(void)
{
Expand Down
Loading

0 comments on commit c87c6c7

Please sign in to comment.