Commit b01a10a3 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://linux-pnp.bkbits.net/pnp-2.5

into home.osdl.org:/home/torvalds/v2.5/linux
parents 427125c8 cd522168
......@@ -168,14 +168,14 @@ sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
{
unsigned int stat0, stat1, i;
stat0 = INTSTATCLR0;
stat1 = INTSTATCLR1;
stat0 = sa1111_readl(desc->data + SA1111_INTSTATCLR0);
stat1 = sa1111_readl(desc->data + SA1111_INTSTATCLR1);
INTSTATCLR0 = stat0;
sa1111_writel(stat0, desc->data + SA1111_INTSTATCLR0);
desc->chip->ack(irq);
INTSTATCLR1 = stat1;
sa1111_writel(stat1, desc->data + SA1111_INTSTATCLR1);
if (stat0 == 0 && stat1 == 0) {
do_bad_IRQ(irq, desc, regs);
......@@ -203,12 +203,22 @@ static void sa1111_ack_irq(unsigned int irq)
static void sa1111_mask_lowirq(unsigned int irq)
{
INTEN0 &= ~SA1111_IRQMASK_LO(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long ie0;
ie0 = sa1111_readl(mapbase + SA1111_INTEN0);
ie0 &= ~SA1111_IRQMASK_LO(irq);
writel(ie0, mapbase + SA1111_INTEN0);
}
static void sa1111_unmask_lowirq(unsigned int irq)
{
INTEN0 |= SA1111_IRQMASK_LO(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long ie0;
ie0 = sa1111_readl(mapbase + SA1111_INTEN0);
ie0 |= SA1111_IRQMASK_LO(irq);
sa1111_writel(ie0, mapbase + SA1111_INTEN0);
}
/*
......@@ -221,12 +231,15 @@ static void sa1111_unmask_lowirq(unsigned int irq)
static int sa1111_retrigger_lowirq(unsigned int irq)
{
unsigned int mask = SA1111_IRQMASK_LO(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long ip0;
int i;
ip0 = sa1111_readl(mapbase + SA1111_INTPOL0);
for (i = 0; i < 8; i++) {
INTPOL0 ^= mask;
INTPOL0 ^= mask;
if (INTSTATCLR1 & mask)
sa1111_writel(ip0 ^ mask, mapbase + SA1111_INTPOL0);
sa1111_writel(ip0, mapbase + SA1111_INTPOL0);
if (sa1111_readl(mapbase + SA1111_INTSTATCLR1) & mask)
break;
}
......@@ -239,6 +252,8 @@ static int sa1111_retrigger_lowirq(unsigned int irq)
static int sa1111_type_lowirq(unsigned int irq, unsigned int flags)
{
unsigned int mask = SA1111_IRQMASK_LO(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long ip0;
if (flags == IRQT_PROBE)
return 0;
......@@ -246,11 +261,13 @@ static int sa1111_type_lowirq(unsigned int irq, unsigned int flags)
if ((!(flags & __IRQT_RISEDGE) ^ !(flags & __IRQT_FALEDGE)) == 0)
return -EINVAL;
ip0 = sa1111_readl(mapbase + SA1111_INTPOL0);
if (flags & __IRQT_RISEDGE)
INTPOL0 &= ~mask;
ip0 &= ~mask;
else
INTPOL0 |= mask;
WAKE_POL0 = INTPOL0;
ip0 |= mask;
sa1111_writel(ip0, mapbase + SA1111_INTPOL0);
sa1111_writel(ip0, mapbase + SA1111_WAKEPOL0);
return 0;
}
......@@ -258,11 +275,15 @@ static int sa1111_type_lowirq(unsigned int irq, unsigned int flags)
static int sa1111_wake_lowirq(unsigned int irq, unsigned int on)
{
unsigned int mask = SA1111_IRQMASK_LO(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long we0;
we0 = sa1111_readl(mapbase + SA1111_WAKEEN0);
if (on)
WAKE_EN0 |= mask;
we0 |= mask;
else
WAKE_EN0 &= ~mask;
we0 &= ~mask;
sa1111_writel(we0, mapbase + SA1111_WAKEEN0);
return 0;
}
......@@ -278,12 +299,22 @@ static struct irqchip sa1111_low_chip = {
static void sa1111_mask_highirq(unsigned int irq)
{
INTEN1 &= ~SA1111_IRQMASK_HI(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long ie1;
ie1 = sa1111_readl(mapbase + SA1111_INTEN1);
ie1 &= ~SA1111_IRQMASK_HI(irq);
sa1111_writel(ie1, mapbase + SA1111_INTEN1);
}
static void sa1111_unmask_highirq(unsigned int irq)
{
INTEN1 |= SA1111_IRQMASK_HI(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long ie1;
ie1 = sa1111_readl(mapbase + SA1111_INTEN1);
ie1 |= SA1111_IRQMASK_HI(irq);
sa1111_writel(ie1, mapbase + SA1111_INTEN1);
}
/*
......@@ -296,12 +327,15 @@ static void sa1111_unmask_highirq(unsigned int irq)
static int sa1111_retrigger_highirq(unsigned int irq)
{
unsigned int mask = SA1111_IRQMASK_HI(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long ip1;
int i;
ip1 = sa1111_readl(mapbase + SA1111_INTPOL1);
for (i = 0; i < 8; i++) {
INTPOL1 ^= mask;
INTPOL1 ^= mask;
if (INTSTATCLR1 & mask)
sa1111_writel(ip1 ^ mask, mapbase + SA1111_INTPOL1);
sa1111_writel(ip1, mapbase + SA1111_INTPOL1);
if (sa1111_readl(mapbase + SA1111_INTSTATCLR1) & mask)
break;
}
......@@ -314,6 +348,8 @@ static int sa1111_retrigger_highirq(unsigned int irq)
static int sa1111_type_highirq(unsigned int irq, unsigned int flags)
{
unsigned int mask = SA1111_IRQMASK_HI(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long ip1;
if (flags == IRQT_PROBE)
return 0;
......@@ -321,11 +357,13 @@ static int sa1111_type_highirq(unsigned int irq, unsigned int flags)
if ((!(flags & __IRQT_RISEDGE) ^ !(flags & __IRQT_FALEDGE)) == 0)
return -EINVAL;
ip1 = sa1111_readl(mapbase + SA1111_INTPOL1);
if (flags & __IRQT_RISEDGE)
INTPOL1 &= ~mask;
ip1 &= ~mask;
else
INTPOL1 |= mask;
WAKE_POL1 = INTPOL1;
ip1 |= mask;
sa1111_writel(ip1, mapbase + SA1111_INTPOL1);
sa1111_writel(ip1, mapbase + SA1111_WAKEPOL1);
return 0;
}
......@@ -333,11 +371,15 @@ static int sa1111_type_highirq(unsigned int irq, unsigned int flags)
static int sa1111_wake_highirq(unsigned int irq, unsigned int on)
{
unsigned int mask = SA1111_IRQMASK_HI(irq);
void *mapbase = get_irq_chipdata(irq);
unsigned long we1;
we1 = sa1111_readl(mapbase + SA1111_WAKEEN1);
if (on)
WAKE_EN1 |= mask;
we1 |= mask;
else
WAKE_EN1 &= ~mask;
we1 &= ~mask;
sa1111_writel(we1, mapbase + SA1111_WAKEEN1);
return 0;
}
......@@ -381,12 +423,14 @@ static void __init sa1111_init_irq(struct sa1111_dev *sadev)
for (irq = IRQ_GPAIN0; irq <= SSPROR; irq++) {
set_irq_chip(irq, &sa1111_low_chip);
set_irq_chipdata(irq, sadev->mapbase);
set_irq_handler(irq, do_edge_IRQ);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
}
for (irq = AUDXMTDMADONEA; irq <= IRQ_S1_BVD1_STSCHG; irq++) {
set_irq_chip(irq, &sa1111_high_chip);
set_irq_chipdata(irq, sadev->mapbase);
set_irq_handler(irq, do_edge_IRQ);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
}
......@@ -395,6 +439,7 @@ static void __init sa1111_init_irq(struct sa1111_dev *sadev)
* Register SA1111 interrupt
*/
set_irq_type(sadev->irq[0], IRQT_RISING);
set_irq_data(sadev->irq[0], sadev->mapbase);
set_irq_chained_handler(sadev->irq[0], sa1111_irq_handler);
}
......
......@@ -41,7 +41,6 @@
*/
/* init funcs */
static void __init get_hackkit_scr(void);
static int __init hackkit_init(void);
static void __init hackkit_init_irq(void);
static void __init hackkit_map_io(void);
......
......@@ -23,7 +23,7 @@
#include <asm/hardware.h>
#include <asm/hardware/ssp.h>
static void ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
unsigned int status = Ser4SSSR;
......@@ -32,6 +32,8 @@ static void ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
Ser4SSSR = SSSR_ROR;
return status ? IRQ_HANDLED : IRQ_NONE;
}
/**
......
......@@ -6,7 +6,7 @@
# To add an entry into this database, please see Documentation/arm/README,
# or contact rmk@arm.linux.org.uk
#
# Last update: Thu Jun 19 18:42:39 2003
# Last update: Sun Aug 3 16:26:10 2003
#
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
#
......@@ -228,7 +228,7 @@ csb226 ARCH_CSB226 CSB226 216
arnold SA1100_ARNOLD ARNOLD 217
psiboard SA1100_PSIBOARD PSIBOARD 218
jz8028 ARCH_JZ8028 JZ8028 219
h5400 ARCH_IPAQ3 IPAQ3 220
h5400 ARCH_H5400 H5400 220
forte SA1100_FORTE FORTE 221
acam SA1100_ACAM ACAM 222
abox SA1100_ABOX ABOX 223
......@@ -300,7 +300,7 @@ wep_ep250 ARCH_WEP_EP250 WEP_EP250 288
inhandelf3 ARCH_INHANDELF3 INHANDELF3 289
adi_coyote ARCH_ADI_COYOTE ADI_COYOTE 290
iyonix ARCH_IYONIX IYONIX 291
damicam_sa1110 ARCH_DAMICAM_SA1110 DAMICAM_SA1110 292
damicam1 ARCH_DAMICAM_SA1110 DAMICAM_SA1110 292
meg03 ARCH_MEG03 MEG03 293
pxa_whitechapel ARCH_PXA_WHITECHAPEL PXA_WHITECHAPEL 294
nwsc ARCH_NWSC NWSC 295
......@@ -355,3 +355,15 @@ niop ARCH_NIOP NIOP 343
dm310 ARCH_DM310 DM310 344
seedpxa_c2 ARCH_SEEDPXA_C2 SEEDPXA_C2 345
ixp4xx_mguardpci ARCH_IXP4XX_MGUARD_PCI IXP4XX_MGUARD_PCI 346
h1940 ARCH_H1940 H1940 347
scorpio ARCH_SCORPIO SCORPIO 348
viva ARCH_VIVA VIVA 349
pxa_xcard ARCH_PXA_XCARD PXA_XCARD 350
csb335 ARCH_CSB335 CSB335 351
ixrd425 ARCH_IXRD425 IXRD425 352
iq80315 ARCH_IQ80315 IQ80315 353
nmp7312 ARCH_NMP7312 NMP7312 354
cx861xx ARCH_CX861XX CX861XX 355
ixp2000 ARCH_IXP2000 IXP2000 356
xda SA1100_XDA XDA 357
csir_ims ARCH_CSIR_IMS CSIR_IMS 358
......@@ -15,6 +15,8 @@ unsigned long acpi_wakeup_address = 0;
unsigned long acpi_video_flags;
extern char wakeup_start, wakeup_end;
extern void zap_low_mappings(void);
extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
static void init_low_mapping(pgd_t *pgd, int pgd_limit)
......
......@@ -444,13 +444,6 @@ static __init int reset_videomode_after_s3(struct dmi_blacklist *d)
acpi_video_flags |= 2;
return 0;
}
static __init int reset_videobios_after_s3(struct dmi_blacklist *d)
{
extern long acpi_video_flags;
acpi_video_flags |= 1;
return 0;
}
#endif
/*
......
......@@ -21,6 +21,8 @@ ACPI_MODULE_NAME ("sleep")
u8 sleep_states[ACPI_S_STATE_COUNT];
extern void do_suspend_lowlevel_s4bios(int);
/**
* acpi_system_restore_state - OS-specific restoration of state
* @state: sleep state we're exiting
......
......@@ -237,7 +237,7 @@ static const char *arxescsi_info(struct Scsi_Host *host)
*/
static int
arxescsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length,
int host_no, int inout)
int inout)
{
struct arxescsi_info *info;
char *p = buffer;
......@@ -264,7 +264,7 @@ static Scsi_Host_Template arxescsi_template = {
.proc_info = arxescsi_proc_info,
.name = "ARXE SCSI card",
.info = arxescsi_info,
.queuecommand = fas216_queue_command,
.queuecommand = fas216_noqueue_command,
.eh_host_reset_handler = fas216_eh_host_reset,
.eh_bus_reset_handler = fas216_eh_bus_reset,
.eh_device_reset_handler = fas216_eh_device_reset,
......
......@@ -444,10 +444,11 @@ int eesoxscsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_
p += sprintf(p, "Term : o%s\n",
info->control & EESOX_TERM_ENABLE ? "n" : "ff");
pos += fas216_print_stats(&info->info, buffer + pos);
p += fas216_print_stats(&info->info, p);
p += fas216_print_devices(&info->info, p);
*start = buffer + offset;
pos = p - buffer - offset;
if (pos > length)
pos = length;
......
......@@ -225,7 +225,8 @@ static void fas216_dumpinfo(FAS216_Info *info)
printk(" dma={ transfer_type=%X setup=%p pseudo=%p stop=%p }\n",
info->dma.transfer_type, info->dma.setup,
info->dma.pseudo, info->dma.stop);
printk(" magic_end=%lX }\n", info->magic_end);
printk(" internal_done=%X magic_end=%lX }\n",
info->internal_done, info->magic_end);
}
#ifdef CHECK_STRUCTURE
......@@ -2252,6 +2253,75 @@ int fas216_queue_command(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
return result;
}
/**
* fas216_internal_done - trigger restart of a waiting thread in fas216_noqueue_command
* @SCpnt: Command to wake
*
* Trigger restart of a waiting thread in fas216_command
*/
static void fas216_internal_done(Scsi_Cmnd *SCpnt)
{
FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata;
fas216_checkmagic(info);
info->internal_done = 1;
}
/**
* fas216_noqueue_command - process a command for the adapter.
* @SCpnt: Command to queue
*
* Queue a command for adapter to process.
* Returns: scsi result code.
* Notes: io_request_lock is held, interrupts are disabled.
*/
int fas216_noqueue_command(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
{
FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata;
fas216_checkmagic(info);
/*
* We should only be using this if we don't have an interrupt.
* Provide some "incentive" to use the queueing code.
*/
BUG_ON(info->scsi.irq != NO_IRQ);
info->internal_done = 0;
fas216_queue_command(SCpnt, fas216_internal_done);
/*
* This wastes time, since we can't return until the command is
* complete. We can't sleep either since we may get re-entered!
* However, we must re-enable interrupts, or else we'll be
* waiting forever.
*/
spin_unlock_irq(info->host->host_lock);
while (!info->internal_done) {
/*
* If we don't have an IRQ, then we must poll the card for
* it's interrupt, and use that to call this driver's
* interrupt routine. That way, we keep the command
* progressing. Maybe we can add some inteligence here
* and go to sleep if we know that the device is going
* to be some time (eg, disconnected).
*/
if (fas216_readb(info, REG_STAT) & STAT_INT) {
spin_lock_irq(info->host->host_lock);
fas216_intr(info);
spin_unlock_irq(info->host->host_lock);
}
}
spin_lock_irq(info->host->host_lock);
done(SCpnt);
return 0;
}
/*
* Error handler timeout function. Indicate that we timed out,
* and wake up any error handler process so it can continue.
......@@ -2962,7 +3032,7 @@ int fas216_print_devices(FAS216_Info *info, char *buffer)
EXPORT_SYMBOL(fas216_init);
EXPORT_SYMBOL(fas216_add);
EXPORT_SYMBOL(fas216_queue_command);
EXPORT_SYMBOL(fas216_command);
EXPORT_SYMBOL(fas216_noqueue_command);
EXPORT_SYMBOL(fas216_intr);
EXPORT_SYMBOL(fas216_remove);
EXPORT_SYMBOL(fas216_release);
......
......@@ -310,6 +310,7 @@ typedef struct {
} dma;
/* miscellaneous */
int internal_done; /* flag to indicate request done */
unsigned long magic_end;
} FAS216_Info;
......@@ -335,6 +336,14 @@ extern int fas216_add (struct Scsi_Host *instance, struct device *dev);
*/
extern int fas216_queue_command (Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
/* Function: int fas216_noqueue_command (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
* Purpose : queue a command for adapter to process, and process it to completion.
* Params : SCpnt - Command to queue
* done - done function to call once command is complete
* Returns : 0 - success, else error
*/
extern int fas216_noqueue_command (Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
/* Function: irqreturn_t fas216_intr (FAS216_Info *info)
* Purpose : handle interrupts from the interface to progress a command
* Params : info - interface to service
......
......@@ -70,8 +70,11 @@ static int check_vfsmnt(struct vfsmount *mnt, struct dentry *dentry)
int ret = dentry->d_mounted;
struct vfsmount *vfs = lookup_mnt(mnt, dentry);
if (vfs && is_vfsmnt_tree_busy(vfs))
if (vfs) {
mntput(vfs);
if (is_vfsmnt_tree_busy(vfs))
ret--;
}
DPRINTK(("check_vfsmnt: ret=%d\n", ret));
return ret;
}
......
......@@ -995,11 +995,8 @@ struct flags {
{ NFSEXP_ALLSQUASH, {"all_squash", ""}},
{ NFSEXP_ASYNC, {"async", "sync"}},
{ NFSEXP_GATHERED_WRITES, {"wdelay", "no_wdelay"}},
{ NFSEXP_UIDMAP, {"uidmap", ""}},
{ NFSEXP_KERBEROS, { "kerberos", ""}},
{ NFSEXP_SUNSECURE, { "sunsecure", ""}},
{ NFSEXP_NOHIDE, {"nohide", ""}},
{ NFSEXP_CROSSMNT, {"crossmnt", ""}},
{ NFSEXP_CROSSMOUNT, {"crossmnt", ""}},
{ NFSEXP_NOSUBTREECHECK, {"no_subtree_check", ""}},
{ NFSEXP_NOAUTHNLM, {"insecure_locks", ""}},
#ifdef MSNFS
......
......@@ -446,7 +446,7 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, u32 *p,
*/
svc_take_page(rqstp);
len = ntohl(*p++);
if (len <= 0 || len > NFS3_MAXPATHLEN)
if (len <= 0 || len > NFS3_MAXPATHLEN || len >= PAGE_SIZE)
return 0;
args->tname = new = page_address(rqstp->rq_respages[rqstp->rq_resused-1]);
args->tlen = len;
......@@ -454,7 +454,7 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, u32 *p,
old = (char*)p;
vec = &rqstp->rq_arg.head[0];
avail = vec->iov_len - (old - (char*)vec->iov_base);
while (len > 0 && *old && avail) {
while (len && avail && *old) {
*new++ = *old++;
len--;
avail--;
......@@ -465,7 +465,7 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, u32 *p,
if (avail > PAGE_SIZE) avail = PAGE_SIZE;
old = page_address(rqstp->rq_arg.pages[0]);
}
while (len > 0 && *old && avail) {
while (len && avail && *old) {
*new++ = *old++;
len--;
avail--;
......
......@@ -880,7 +880,7 @@ nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write)
v++;
write->wr_vec[v].iov_base = page_address(argp->pagelist[0]);
argp->pagelist++;
if (len >= PAGE_SIZE) {
if (argp->pagelen >= PAGE_SIZE) {
write->wr_vec[v].iov_len = PAGE_SIZE;
argp->pagelen -= PAGE_SIZE;
} else {
......@@ -934,17 +934,36 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
op = &argp->ops[i];
/*
* Before reading the opcode, we test for the 4-byte buffer
* overrun explicitly, instead of using READ_BUF(). This is
* because we want a missing opcode to be treated as opcode
* OP_WRITE+1, instead of a failed XDR.
* We can't use READ_BUF() here because we need to handle
* a missing opcode as an OP_WRITE + 1. So we need to check
* to see if we're truly at the end of our buffer or if there
* is another page we need to flip to.
*/
if (argp->p == argp->end) {
if (argp->pagelen < 4) {
/* There isn't an opcode still on the wire */
op->opnum = OP_WRITE + 1;
op->status = nfserr_bad_xdr;
argp->opcnt = i+1;
break;
}
/*
* False alarm. We just hit a page boundary, but there
* is still data available. Move pointer across page
* boundary. *snip from READ_BUF*
*/
argp->p = page_address(argp->pagelist[0]);
argp->pagelist++;
if (argp->pagelen < PAGE_SIZE) {
argp->end = p + (argp->pagelen>>2);
argp->pagelen = 0;
} else {
argp->end = p + (PAGE_SIZE>>2);
argp->pagelen -= PAGE_SIZE;
}
}
op->opnum = ntohl(*argp->p++);
switch (op->opnum) {
......
......@@ -99,7 +99,7 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,
mntput(mnt);
goto out;
}
if (exp2 && ((exp->ex_flags & NFSEXP_CROSSMNT) || EX_NOHIDE(exp2))) {
if (exp2 && ((exp->ex_flags & NFSEXP_CROSSMOUNT) || EX_NOHIDE(exp2))) {
/* successfully crossed mount point */
exp_put(exp);
*expp = exp2;
......
......@@ -65,6 +65,7 @@ void __init proc_root_init(void)
#endif
proc_root_fs = proc_mkdir("fs", 0);
proc_root_driver = proc_mkdir("driver", 0);
proc_mkdir("fs/nfsd", 0); /* somewhere for the nfsd filesystem to be mounted */
#if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE)
/* just give it a mountpoint */
proc_mkdir("openprom", 0);
......
......@@ -19,7 +19,7 @@
struct platform_device;
extern int platform_add_devices(struct platform_device *, int);
extern int platform_add_devices(struct platform_device **, int);
extern int platform_add_device(struct platform_device *);
#endif
......
......@@ -429,22 +429,6 @@
#define SA1111_WAKEPOL0 0x0034
#define SA1111_WAKEPOL1 0x0038
#define INTTEST0 __CCREG(SA1111_INTC + SA1111_INTTEST0)
#define INTTEST1 __CCREG(SA1111_INTC + SA1111_INTTEST1)
#define INTEN0 __CCREG(SA1111_INTC + SA1111_INTEN0)
#define INTEN1 __CCREG(SA1111_INTC + SA1111_INTEN1)
#define INTPOL0 __CCREG(SA1111_INTC + SA1111_INTPOL0)
#define INTPOL1 __CCREG(SA1111_INTC + SA1111_INTPOL1)
#define INTTSTSEL __CCREG(SA1111_INTC + SA1111_INTTSTSEL)
#define INTSTATCLR0 __CCREG(SA1111_INTC + SA1111_INTSTATCLR0)
#define INTSTATCLR1 __CCREG(SA1111_INTC + SA1111_INTSTATCLR1)
#define INTSET0 __CCREG(SA1111_INTC + SA1111_INTSET0)
#define INTSET1 __CCREG(SA1111_INTC + SA1111_INTSET1)
#define WAKE_EN0 __CCREG(SA1111_INTC + SA1111_WAKEEN0)
#define WAKE_EN1 __CCREG(SA1111_INTC + SA1111_WAKEEN1)
#define WAKE_POL0 __CCREG(SA1111_INTC + SA1111_WAKEPOL0)
#define WAKE_POL1 __CCREG(SA1111_INTC + SA1111_WAKEPOL1)
/*
* PS/2 Trackpad and Mouse Interfaces
*
......
#include <asm-generic/local.h>
......@@ -54,6 +54,8 @@ struct irqdesc {
struct irqchip *chip;
struct irqaction *action;
struct list_head pend;
void *chipdata;
void *data;
unsigned int disable_depth;
unsigned int triggered: 1; /* IRQ has occurred */
......@@ -88,6 +90,9 @@ void __set_irq_handler(unsigned int irq, irq_handler_t, int);
*/
#define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0)
#define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1)
#define set_irq_data(irq,d) do { irq_desc[irq].data = d; } while (0)
#define set_irq_chipdata(irq,d) do { irq_desc[irq].chipdata = d; } while (0)
#define get_irq_chipdata(irq) (irq_desc[irq].chipdata)
void set_irq_chip(unsigned int irq, struct irqchip *);
void set_irq_flags(unsigned int irq, unsigned int flags);
......
......@@ -32,16 +32,15 @@
#define NFSEXP_ALLSQUASH 0x0008
#define NFSEXP_ASYNC 0x0010
#define NFSEXP_GATHERED_WRITES 0x0020
#define NFSEXP_UIDMAP 0x0040
#define NFSEXP_KERBEROS 0x0080 /* not available */
#define NFSEXP_SUNSECURE 0x0100
/* 40 80 100 currently unused */
#define NFSEXP_NOHIDE 0x0200
#define NFSEXP_NOSUBTREECHECK 0x0400
#define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */
#define NFSEXP_MSNFS 0x1000 /* do silly things that MS clients expect */
#define NFSEXP_FSID 0x2000
#define NFSEXP_CROSSMNT 0x4000
#define NFSEXP_ALLFLAGS 0x7FFF
#define NFSEXP_CROSSMOUNT 0x4000
#define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */
#define NFSEXP_ALLFLAGS 0xFE3F
#ifdef __KERNEL__
......@@ -75,7 +74,6 @@ struct svc_expkey {
#define EX_ISSYNC(exp) (!((exp)->ex_flags & NFSEXP_ASYNC))
#define EX_RDONLY(exp) ((exp)->ex_flags & NFSEXP_READONLY)
#define EX_NOHIDE(exp) ((exp)->ex_flags & NFSEXP_NOHIDE)
#define EX_SUNSECURE(exp) ((exp)->ex_flags & NFSEXP_SUNSECURE)
#define EX_WGATHER(exp) ((exp)->ex_flags & NFSEXP_GATHERED_WRITES)
......
......@@ -173,7 +173,7 @@ RTN *FNAME ARGS \
if (set && !INPLACE && test_bit(CACHE_VALID, &tmp->MEMBER.flags) && !new) \
break; \
\
atomic_inc(&tmp->MEMBER.refcnt); \
cache_get(&tmp->MEMBER); \
if (set) { \
if (!INPLACE && test_bit(CACHE_VALID, &tmp->MEMBER.flags))\
{ /* need to swap in new */ \
......@@ -221,7 +221,7 @@ RTN *FNAME ARGS \
new = kmalloc(sizeof(*new), GFP_KERNEL); \
if (new) { \
cache_init(&new->MEMBER); \
atomic_inc(&new->MEMBER.refcnt); \
cache_get(&new->MEMBER); \
INIT; \
tmp = new; \
goto retry; \
......
......@@ -738,7 +738,9 @@ cache_ioctl(struct inode *ino, struct file *filp,
static int
cache_open(struct inode *inode, struct file *filp)
{
struct cache_reader *rp;
struct cache_reader *rp = NULL;
if (filp->f_mode & FMODE_READ) {
struct cache_detail *cd = PDE(inode)->data;
rp = kmalloc(sizeof(*rp), GFP_KERNEL);
......@@ -751,6 +753,7 @@ cache_open(struct inode *inode, struct file *filp)
spin_lock(&queue_lock);
list_add(&rp->q.list, &cd->queue);
spin_unlock(&queue_lock);
}
filp->private_data = rp;
return 0;
}
......@@ -761,6 +764,7 @@ cache_release(struct inode *inode, struct file *filp)
struct cache_reader *rp = filp->private_data;
struct cache_detail *cd = PDE(inode)->data;
if (rp) {
spin_lock(&queue_lock);
if (rp->offset) {
struct cache_queue *cq;
......@@ -784,6 +788,7 @@ cache_release(struct inode *inode, struct file *filp)
cd->last_close = get_seconds();
atomic_dec(&cd->readers);
}
return 0;
}
......
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