Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39545
b: refs/heads/master
c: 52ae7b7
h: refs/heads/master
i:
  39543: c99ec22
v: v3
  • Loading branch information
Russell Cattelan authored and Steven Whitehouse committed Oct 12, 2006
1 parent 9b120fa commit c7c41b1
Show file tree
Hide file tree
Showing 119 changed files with 1,589 additions and 1,117 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: 411fdc1a711665cb4bd13df2a75213153d463375
refs/heads/master: 52ae7b7935a079aaba25da98fe90772d04109f26
2 changes: 1 addition & 1 deletion trunk/arch/alpha/kernel/alpha_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <asm/fpu.h>
#include <asm/machvec.h>

#include <linux/syscalls.h>
#include <asm/unistd.h>

/* these are C runtime functions with special calling conventions: */
extern void __divl (void);
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/i386/mach-voyager/voyager_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct voyager_SUS *voyager_SUS = NULL;

#ifdef CONFIG_SMP
static void
voyager_dump(int dummy1, struct tty_struct *dummy3)
voyager_dump(int dummy1, struct pt_regs *dummy2, struct tty_struct *dummy3)
{
/* get here via a sysrq */
voyager_smp_dump();
Expand Down Expand Up @@ -166,7 +166,7 @@ voyager_memory_detect(int region, __u32 *start, __u32 *length)
* off the timer tick to the SMP code, since the VIC doesn't have an
* internal timer (The QIC does, but that's another story). */
void
voyager_timer_interrupt(void)
voyager_timer_interrupt(struct pt_regs *regs)
{
if((jiffies & 0x3ff) == 0) {

Expand Down Expand Up @@ -202,7 +202,7 @@ voyager_timer_interrupt(void)
}
}
#ifdef CONFIG_SMP
smp_vic_timer_interrupt();
smp_vic_timer_interrupt(regs);
#endif
}

Expand Down
52 changes: 23 additions & 29 deletions trunk/arch/i386/mach-voyager/voyager_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ static int ack_QIC_CPI(__u8 cpi);
static void ack_special_QIC_CPI(__u8 cpi);
static void ack_VIC_CPI(__u8 cpi);
static void send_CPI_allbutself(__u8 cpi);
static void mask_vic_irq(unsigned int irq);
static void unmask_vic_irq(unsigned int irq);
static void enable_vic_irq(unsigned int irq);
static void disable_vic_irq(unsigned int irq);
static unsigned int startup_vic_irq(unsigned int irq);
static void enable_local_vic_irq(unsigned int irq);
static void disable_local_vic_irq(unsigned int irq);
Expand Down Expand Up @@ -205,12 +205,15 @@ ack_CPI(__u8 cpi)
/* The VIC IRQ descriptors -- these look almost identical to the
* 8259 IRQs except that masks and things must be kept per processor
*/
static struct irq_chip vic_chip = {
.name = "VIC",
.startup = startup_vic_irq,
.mask = mask_vic_irq,
.unmask = unmask_vic_irq,
.set_affinity = set_vic_irq_affinity,
static struct hw_interrupt_type vic_irq_type = {
.typename = "VIC-level",
.startup = startup_vic_irq,
.shutdown = disable_vic_irq,
.enable = enable_vic_irq,
.disable = disable_vic_irq,
.ack = before_handle_vic_irq,
.end = after_handle_vic_irq,
.set_affinity = set_vic_irq_affinity,
};

/* used to count up as CPUs are brought on line (starts at 0) */
Expand Down Expand Up @@ -1141,9 +1144,9 @@ smp_apic_timer_interrupt(struct pt_regs *regs)
fastcall void
smp_qic_timer_interrupt(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
ack_QIC_CPI(QIC_TIMER_CPI);
wrapper_smp_local_timer_interrupt();
struct pt_regs *old_regs = set_irq_regs(regs);
wrapper_smp_local_timer_interrupt(void);
set_irq_regs(old_regs);
}

Expand Down Expand Up @@ -1267,10 +1270,12 @@ smp_send_stop(void)
/* this function is triggered in time.c when a clock tick fires
* we need to re-broadcast the tick to all CPUs */
void
smp_vic_timer_interrupt(void)
smp_vic_timer_interrupt(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
send_CPI_allbutself(VIC_TIMER_CPI);
smp_local_timer_interrupt();
set_irq_regs(old_regs);
}

/* local (per CPU) timer interrupt. It does both profiling and
Expand Down Expand Up @@ -1305,7 +1310,7 @@ smp_local_timer_interrupt(void)
per_cpu(prof_counter, cpu);
}

update_process_times(user_mode_vm(get_irq_regs()));
update_process_times(user_mode_vm(irq_regs));
}

if( ((1<<cpu) & voyager_extended_vic_processors) == 0)
Expand Down Expand Up @@ -1392,17 +1397,6 @@ setup_profiling_timer(unsigned int multiplier)
return 0;
}

/* This is a bit of a mess, but forced on us by the genirq changes
* there's no genirq handler that really does what voyager wants
* so hack it up with the simple IRQ handler */
static void fastcall
handle_vic_irq(unsigned int irq, struct irq_desc *desc)
{
before_handle_vic_irq(irq);
handle_simple_irq(irq, desc);
after_handle_vic_irq(irq);
}


/* The CPIs are handled in the per cpu 8259s, so they must be
* enabled to be received: FIX: enabling the CPIs in the early
Expand Down Expand Up @@ -1439,7 +1433,7 @@ smp_intr_init(void)
* This is for later: first 16 correspond to PC IRQs; next 16
* are Primary MC IRQs and final 16 are Secondary MC IRQs */
for(i = 0; i < 48; i++)
set_irq_chip_and_handler(i, &vic_chip, handle_vic_irq);
irq_desc[i].chip = &vic_irq_type;
}

/* send a CPI at level cpi to a set of cpus in cpuset (set 1 bit per
Expand Down Expand Up @@ -1537,7 +1531,7 @@ ack_VIC_CPI(__u8 cpi)
static unsigned int
startup_vic_irq(unsigned int irq)
{
unmask_vic_irq(irq);
enable_vic_irq(irq);

return 0;
}
Expand All @@ -1564,7 +1558,7 @@ startup_vic_irq(unsigned int irq)
* adjust their masks accordingly. */

static void
unmask_vic_irq(unsigned int irq)
enable_vic_irq(unsigned int irq)
{
/* linux doesn't to processor-irq affinity, so enable on
* all CPUs we know about */
Expand All @@ -1573,7 +1567,7 @@ unmask_vic_irq(unsigned int irq)
__u32 processorList = 0;
unsigned long flags;

VDEBUG(("VOYAGER: unmask_vic_irq(%d) CPU%d affinity 0x%lx\n",
VDEBUG(("VOYAGER: enable_vic_irq(%d) CPU%d affinity 0x%lx\n",
irq, cpu, cpu_irq_affinity[cpu]));
spin_lock_irqsave(&vic_irq_lock, flags);
for_each_online_cpu(real_cpu) {
Expand All @@ -1597,7 +1591,7 @@ unmask_vic_irq(unsigned int irq)
}

static void
mask_vic_irq(unsigned int irq)
disable_vic_irq(unsigned int irq)
{
/* lazy disable, do nothing */
}
Expand Down Expand Up @@ -1825,7 +1819,7 @@ set_vic_irq_affinity(unsigned int irq, cpumask_t mask)
* disabled again as it comes in (voyager lazy disable). If
* the affinity map is tightened to disable the interrupt on a
* cpu, it will be pushed off when it comes in */
unmask_vic_irq(irq);
enable_vic_irq(irq);
}

static void
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ config GENERIC_CALIBRATE_DELAY
config GENERIC_IOMAP
bool

config GENERIC_TIME
def_bool n

config ARCH_MAY_HAVE_PC_FDC
bool

Expand Down Expand Up @@ -360,7 +357,6 @@ config CPU_HAS_SR_RB
endmenu

menu "Timer support"
depends on !GENERIC_TIME

config SH_TMU
bool "TMU timer support"
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/sh/boards/hp6xx/hp6xx_apm.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static int hp6x0_apm_get_info(char *buf, char **start, off_t fpos, int length)
return p - buf;
}

static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev)
static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev, struct pt_regs *regs)
{
if (!apm_suspended)
apm_queue_event(APM_USER_SUSPEND);
Expand All @@ -96,7 +96,7 @@ static int __init hp6x0_apm_init(void)
int ret;

ret = request_irq(HP680_BTN_IRQ, hp6x0_apm_interrupt,
IRQF_DISABLED, MODNAME, 0);
SA_INTERRUPT, MODNAME, 0);
if (unlikely(ret < 0)) {
printk(KERN_ERR MODNAME ": IRQ %d request failed\n",
HP680_BTN_IRQ);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/landisk/landisk_pwb.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static int swdrv_write(struct file *filp, const char *buff, size_t count,
return count;
}

static irqreturn_t sw_interrupt(int irq, void *dev_id)
static irqreturn_t sw_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
landisk_btn = (0x0ff & (~ctrl_inb(PA_STATUS)));
disable_irq(IRQ_BUTTON);
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/sh/boards/mpc1211/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ static void __init pci_write_config(unsigned long busNo,

static unsigned char m_irq_mask = 0xfb;
static unsigned char s_irq_mask = 0xff;
volatile unsigned long irq_err_count;

static void disable_mpc1211_irq(unsigned int irq)
{
Expand Down Expand Up @@ -117,7 +118,7 @@ static void mask_and_ack_mpc1211(unsigned int irq)
if(irq < 8) {
if(m_irq_mask & (1<<irq)){
if(!mpc1211_irq_real(irq)){
atomic_inc(&irq_err_count)
irq_err_count++;
printk("spurious 8259A interrupt: IRQ %x\n",irq);
}
} else {
Expand All @@ -130,7 +131,7 @@ static void mask_and_ack_mpc1211(unsigned int irq)
} else {
if(s_irq_mask & (1<<(irq - 8))){
if(!mpc1211_irq_real(irq)){
atomic_inc(&irq_err_count);
irq_err_count++;
printk("spurious 8259A interrupt: IRQ %x\n",irq);
}
} else {
Expand Down
105 changes: 83 additions & 22 deletions trunk/arch/sh/boards/renesas/r7780rp/irq.c
Original file line number Diff line number Diff line change
@@ -1,54 +1,115 @@
/*
* Renesas Solutions Highlander R7780RP-1 Support.
* linux/arch/sh/boards/renesas/r7780rp/irq.c
*
* Copyright (C) 2000 Kazumoto Kojima
*
* Copyright (C) 2002 Atom Create Engineering Co., Ltd.
* Copyright (C) 2006 Paul Mundt
* Renesas Solutions Highlander R7780RP-1 Support.
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
* Modified for R7780RP-1 by
* Atom Create Engineering Co., Ltd. 2002.
*/
#include <linux/init.h>
#include <linux/irq.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/r7780rp/r7780rp.h>

#ifdef CONFIG_SH_R7780MP
static int mask_pos[] = {12, 11, 9, 14, 15, 8, 13, 6, 5, 4, 3, 2, 0, 0, 1, 0};
#else
static int mask_pos[] = {15, 14, 13, 12, 11, 10, 9, 8, 7, 5, 6, 4, 0, 1, 2, 0};
#endif

static void enable_r7780rp_irq(unsigned int irq)
static void enable_r7780rp_irq(unsigned int irq);
static void disable_r7780rp_irq(unsigned int irq);

/* shutdown is same as "disable" */
#define shutdown_r7780rp_irq disable_r7780rp_irq

static void ack_r7780rp_irq(unsigned int irq);
static void end_r7780rp_irq(unsigned int irq);

static unsigned int startup_r7780rp_irq(unsigned int irq)
{
/* Set priority in IPR back to original value */
ctrl_outw(ctrl_inw(IRLCNTR1) | (1 << mask_pos[irq]), IRLCNTR1);
enable_r7780rp_irq(irq);
return 0; /* never anything pending */
}

static void disable_r7780rp_irq(unsigned int irq)
{
unsigned short val;
unsigned short mask = 0xffff ^ (0x0001 << mask_pos[irq]);

/* Set the priority in IPR to 0 */
ctrl_outw(ctrl_inw(IRLCNTR1) & (0xffff ^ (1 << mask_pos[irq])),
IRLCNTR1);
val = ctrl_inw(IRLCNTR1);
val &= mask;
ctrl_outw(val, IRLCNTR1);
}

static struct irq_chip r7780rp_irq_chip __read_mostly = {
.name = "r7780rp",
.mask = disable_r7780rp_irq,
.unmask = enable_r7780rp_irq,
.mask_ack = disable_r7780rp_irq,
static void enable_r7780rp_irq(unsigned int irq)
{
unsigned short val;
unsigned short value = (0x0001 << mask_pos[irq]);

/* Set priority in IPR back to original value */
val = ctrl_inw(IRLCNTR1);
val |= value;
ctrl_outw(val, IRLCNTR1);
}

static void ack_r7780rp_irq(unsigned int irq)
{
disable_r7780rp_irq(irq);
}

static void end_r7780rp_irq(unsigned int irq)
{
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
enable_r7780rp_irq(irq);
}

static struct hw_interrupt_type r7780rp_irq_type = {
.typename = "R7780RP-IRQ",
.startup = startup_r7780rp_irq,
.shutdown = shutdown_r7780rp_irq,
.enable = enable_r7780rp_irq,
.disable = disable_r7780rp_irq,
.ack = ack_r7780rp_irq,
.end = end_r7780rp_irq,
};

static void make_r7780rp_irq(unsigned int irq)
{
disable_irq_nosync(irq);
irq_desc[irq].chip = &r7780rp_irq_type;
disable_r7780rp_irq(irq);
}

/*
* Initialize IRQ setting
*/
void __init init_r7780rp_IRQ(void)
{
int i;

for (i = 0; i < 15; i++) {
disable_irq_nosync(i);
set_irq_chip_and_handler(i, &r7780rp_irq_chip,
handle_level_irq);
enable_r7780rp_irq(i);
}
/* IRL0=PCI Slot #A
* IRL1=PCI Slot #B
* IRL2=PCI Slot #C
* IRL3=PCI Slot #D
* IRL4=CF Card
* IRL5=CF Card Insert
* IRL6=M66596
* IRL7=SD Card
* IRL8=Touch Panel
* IRL9=SCI
* IRL10=Serial
* IRL11=Extention #A
* IRL11=Extention #B
* IRL12=Debug LAN
* IRL13=Push Switch
* IRL14=ZiggBee IO
*/

for (i=0; i<15; i++)
make_r7780rp_irq(i);
}
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/snapgear/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern void pcibios_init(void);
* EraseConfig handling functions
*/

static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id)
static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
volatile char dummy __attribute__((unused)) = * (volatile char *) 0xb8000000;

Expand Down
Loading

0 comments on commit c7c41b1

Please sign in to comment.