!C99Shell v. 1.0 pre-release build #13!

Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a 

uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 

uid=99(nobody) gid=98(nobody) groups=98(nobody) 

Safe-mode: OFF (not secure)

/usr/src/linux-2.4.18-xfs-1.1/arch/sh/kernel/   drwxr-xr-x
Free 318.35 GB of 458.09 GB (69.49%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     irq_intc2.c (2.67 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
 * linux/arch/sh/kernel/irq_intc2.c
 *
 * Copyright (C) 2001 David J. Mckay (david.mckay@st.com)
 *
 * May be copied or modified under the terms of the GNU General Public
 * License.  See linux/COPYING for more information.                            
 *
 * Interrupt handling for INTC2-based IRQ.
 *
 * These are the "new Hitachi style" interrupts, as present on the 
 * Hitachi 7751 and the STM ST40 STB1.
 */

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/irq.h>

#include <asm/system.h>
#include <asm/io.h>
#include <asm/machvec.h>


struct intc2_data {
    unsigned int addr;    /* Address of Interrupt Priority Register */
    int mask; /*Mask to apply */
};


static struct intc2_data intc2_data[NR_INTC2_IRQS];

static void enable_intc2_irq(unsigned int irq);
static void disable_intc2_irq(unsigned int irq);

/* shutdown is same as "disable" */
#define shutdown_intc2_irq disable_intc2_irq

static void mask_and_ack_intc2(unsigned int);
static void end_intc2_irq(unsigned int irq);

static unsigned int startup_intc2_irq(unsigned int irq)

    enable_intc2_irq(irq);
    return 0; /* never anything pending */
}

static struct hw_interrupt_type intc2_irq_type = {
    "INTC2-IRQ",
    startup_intc2_irq,
    shutdown_intc2_irq,
    enable_intc2_irq,
    disable_intc2_irq,
    mask_and_ack_intc2,
    end_intc2_irq
};

static void disable_intc2_irq(unsigned int irq)
{
    unsigned addr;
    int offset=irq-INTC2_FIRST_IRQ;
    unsigned val,flags;

    // Sanity check
    if(offset<0 || offset>=NR_INTC2_IRQS) return;

    addr=intc2_data[offset].addr+INTC2_INTMSK_OFFSET;

    save_and_cli(flags);
    val=ctrl_inl(addr);
    val|=intc2_data[offset].mask;
    ctrl_outl(val,addr);

    restore_flags(flags);
}

static void enable_intc2_irq(unsigned int irq)
{
    int offset=irq-INTC2_FIRST_IRQ;

    // Sanity check
    if(offset<0 || offset>=NR_INTC2_IRQS) return;

    ctrl_outl(intc2_data[offset].mask,
          intc2_data[offset].addr+INTC2_INTMSKCLR_OFFSET);

}

static void mask_and_ack_intc2(unsigned int irq)
{
    disable_intc2_irq(irq);
}

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

void make_intc2_irq(unsigned int irq, unsigned int addr, 
            unsigned int group,int pos, int priority)
{
    int offset=irq-INTC2_FIRST_IRQ;
    unsigned flags,val;

    if(offset<0 || offset>=NR_INTC2_IRQS) {
        return;
    }

    disable_irq_nosync(irq);
    /* Fill the the data we need */
    intc2_data[offset].addr=addr;
    intc2_data[offset].mask=1<<pos;
        
    /* Set the priority level */
    save_and_cli(flags);
    val=ctrl_inl(addr+INTC2_INTPRI_OFFSET);
    val|=(priority)<< (group<<4);
    ctrl_outl(val,addr+INTC2_INTPRI_OFFSET);
    restore_flags(flags);

    irq_desc[irq].handler=&intc2_irq_type;

    disable_intc2_irq(irq);
}




:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0323 ]--