Commit 966ea8c4 authored by Steve French's avatar Steve French

Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6

parents 41c5ae68 976dde01
...@@ -75,7 +75,7 @@ pgd_t *get_pgd_slow(struct mm_struct *mm) ...@@ -75,7 +75,7 @@ pgd_t *get_pgd_slow(struct mm_struct *mm)
void free_pgd_slow(struct mm_struct *mm, pgd_t *pgd) void free_pgd_slow(struct mm_struct *mm, pgd_t *pgd)
{ {
pmd_t *pmd; pmd_t *pmd;
struct page *pte; pgtable_t pte;
if (!pgd) if (!pgd)
return; return;
...@@ -90,10 +90,8 @@ void free_pgd_slow(struct mm_struct *mm, pgd_t *pgd) ...@@ -90,10 +90,8 @@ void free_pgd_slow(struct mm_struct *mm, pgd_t *pgd)
goto free; goto free;
} }
pte = pmd_page(*pmd); pte = pmd_pgtable(*pmd);
pmd_clear(pmd); pmd_clear(pmd);
dec_zone_page_state(virt_to_page((unsigned long *)pgd), NR_PAGETABLE);
pte_lock_deinit(pte);
pte_free(mm, pte); pte_free(mm, pte);
pmd_free(mm, pmd); pmd_free(mm, pmd);
free: free:
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "44x.h" #include "44x.h"
#include "cuboot.h" #include "cuboot.h"
#define TARGET_4xx
#define TARGET_44x #define TARGET_44x
#include "ppcboot.h" #include "ppcboot.h"
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "44x.h" #include "44x.h"
#include "cuboot.h" #include "cuboot.h"
#define TARGET_4xx
#define TARGET_44x #define TARGET_44x
#include "ppcboot.h" #include "ppcboot.h"
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "44x.h" #include "44x.h"
#include "cuboot.h" #include "cuboot.h"
#define TARGET_4xx
#define TARGET_44x #define TARGET_44x
#include "ppcboot.h" #include "ppcboot.h"
......
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
#include "dcr.h" #include "dcr.h"
#include "4xx.h" #include "4xx.h"
#define TARGET_4xx
#define TARGET_44x #define TARGET_44x
#define TARGET_440GX
#include "ppcboot.h" #include "ppcboot.h"
static bd_t bd; static bd_t bd;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "4xx.h" #include "4xx.h"
#include "cuboot.h" #include "cuboot.h"
#define TARGET_4xx
#define TARGET_44x #define TARGET_44x
#include "ppcboot.h" #include "ppcboot.h"
......
...@@ -235,7 +235,7 @@ PCIE0: pciex@0a0000000 { ...@@ -235,7 +235,7 @@ PCIE0: pciex@0a0000000 {
#interrupt-cells = <1>; #interrupt-cells = <1>;
#size-cells = <2>; #size-cells = <2>;
#address-cells = <3>; #address-cells = <3>;
compatible = "ibm,plb-pciex-405exr", "ibm,plb-pciex"; compatible = "ibm,plb-pciex-405ex", "ibm,plb-pciex";
primary; primary;
port = <0>; /* port number */ port = <0>; /* port number */
reg = <a0000000 20000000 /* Config space access */ reg = <a0000000 20000000 /* Config space access */
......
...@@ -38,8 +38,8 @@ cpu@0 { ...@@ -38,8 +38,8 @@ cpu@0 {
timebase-frequency = <0>; /* Filled in by zImage */ timebase-frequency = <0>; /* Filled in by zImage */
i-cache-line-size = <20>; i-cache-line-size = <20>;
d-cache-line-size = <20>; d-cache-line-size = <20>;
i-cache-size = <20000>; i-cache-size = <8000>;
d-cache-size = <20000>; d-cache-size = <8000>;
dcr-controller; dcr-controller;
dcr-access-method = "native"; dcr-access-method = "native";
}; };
......
...@@ -1151,7 +1151,7 @@ static void cell_handle_interrupt(struct pt_regs *regs, ...@@ -1151,7 +1151,7 @@ static void cell_handle_interrupt(struct pt_regs *regs,
for (i = 0; i < num_counters; ++i) { for (i = 0; i < num_counters; ++i) {
if ((interrupt_mask & CBE_PM_CTR_OVERFLOW_INTR(i)) if ((interrupt_mask & CBE_PM_CTR_OVERFLOW_INTR(i))
&& ctr[i].enabled) { && ctr[i].enabled) {
oprofile_add_pc(pc, is_kernel, i); oprofile_add_ext_sample(pc, regs, i, is_kernel);
cbe_write_ctr(cpu, i, reset_value[i]); cbe_write_ctr(cpu, i, reset_value[i]);
} }
} }
......
...@@ -199,6 +199,7 @@ int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv) ...@@ -199,6 +199,7 @@ int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv)
return 0; return 0;
} }
EXPORT_SYMBOL(mpc52xx_set_psc_clkdiv);
/** /**
* mpc52xx_restart: ppc_md->restart hook for mpc5200 using the watchdog timer * mpc52xx_restart: ppc_md->restart hook for mpc5200 using the watchdog timer
......
This diff is collapsed.
...@@ -149,6 +149,11 @@ static void __init cell_init_irq(void) ...@@ -149,6 +149,11 @@ static void __init cell_init_irq(void)
mpic_init_IRQ(); mpic_init_IRQ();
} }
static void __init cell_set_dabrx(void)
{
mtspr(SPRN_DABRX, DABRX_KERNEL | DABRX_USER);
}
static void __init cell_setup_arch(void) static void __init cell_setup_arch(void)
{ {
#ifdef CONFIG_SPU_BASE #ifdef CONFIG_SPU_BASE
...@@ -158,6 +163,8 @@ static void __init cell_setup_arch(void) ...@@ -158,6 +163,8 @@ static void __init cell_setup_arch(void)
cbe_regs_init(); cbe_regs_init();
cell_set_dabrx();
#ifdef CONFIG_CBE_RAS #ifdef CONFIG_CBE_RAS
cbe_ras_init(); cbe_ras_init();
#endif #endif
......
...@@ -81,9 +81,12 @@ struct spu_slb { ...@@ -81,9 +81,12 @@ struct spu_slb {
void spu_invalidate_slbs(struct spu *spu) void spu_invalidate_slbs(struct spu *spu)
{ {
struct spu_priv2 __iomem *priv2 = spu->priv2; struct spu_priv2 __iomem *priv2 = spu->priv2;
unsigned long flags;
spin_lock_irqsave(&spu->register_lock, flags);
if (spu_mfc_sr1_get(spu) & MFC_STATE1_RELOCATE_MASK) if (spu_mfc_sr1_get(spu) & MFC_STATE1_RELOCATE_MASK)
out_be64(&priv2->slb_invalidate_all_W, 0UL); out_be64(&priv2->slb_invalidate_all_W, 0UL);
spin_unlock_irqrestore(&spu->register_lock, flags);
} }
EXPORT_SYMBOL_GPL(spu_invalidate_slbs); EXPORT_SYMBOL_GPL(spu_invalidate_slbs);
...@@ -148,7 +151,11 @@ static inline void spu_load_slb(struct spu *spu, int slbe, struct spu_slb *slb) ...@@ -148,7 +151,11 @@ static inline void spu_load_slb(struct spu *spu, int slbe, struct spu_slb *slb)
__func__, slbe, slb->vsid, slb->esid); __func__, slbe, slb->vsid, slb->esid);
out_be64(&priv2->slb_index_W, slbe); out_be64(&priv2->slb_index_W, slbe);
/* set invalid before writing vsid */
out_be64(&priv2->slb_esid_RW, 0);
/* now it's safe to write the vsid */
out_be64(&priv2->slb_vsid_RW, slb->vsid); out_be64(&priv2->slb_vsid_RW, slb->vsid);
/* setting the new esid makes the entry valid again */
out_be64(&priv2->slb_esid_RW, slb->esid); out_be64(&priv2->slb_esid_RW, slb->esid);
} }
...@@ -290,9 +297,11 @@ void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa, ...@@ -290,9 +297,11 @@ void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa,
nr_slbs++; nr_slbs++;
} }
spin_lock_irq(&spu->register_lock);
/* Add the set of SLBs */ /* Add the set of SLBs */
for (i = 0; i < nr_slbs; i++) for (i = 0; i < nr_slbs; i++)
spu_load_slb(spu, i, &slbs[i]); spu_load_slb(spu, i, &slbs[i]);
spin_unlock_irq(&spu->register_lock);
} }
EXPORT_SYMBOL_GPL(spu_setup_kernel_slbs); EXPORT_SYMBOL_GPL(spu_setup_kernel_slbs);
...@@ -337,13 +346,14 @@ spu_irq_class_1(int irq, void *data) ...@@ -337,13 +346,14 @@ spu_irq_class_1(int irq, void *data)
if (stat & CLASS1_STORAGE_FAULT_INTR) if (stat & CLASS1_STORAGE_FAULT_INTR)
spu_mfc_dsisr_set(spu, 0ul); spu_mfc_dsisr_set(spu, 0ul);
spu_int_stat_clear(spu, 1, stat); spu_int_stat_clear(spu, 1, stat);
spin_unlock(&spu->register_lock);
pr_debug("%s: %lx %lx %lx %lx\n", __FUNCTION__, mask, stat,
dar, dsisr);
if (stat & CLASS1_SEGMENT_FAULT_INTR) if (stat & CLASS1_SEGMENT_FAULT_INTR)
__spu_trap_data_seg(spu, dar); __spu_trap_data_seg(spu, dar);
spin_unlock(&spu->register_lock);
pr_debug("%s: %lx %lx %lx %lx\n", __FUNCTION__, mask, stat,
dar, dsisr);
if (stat & CLASS1_STORAGE_FAULT_INTR) if (stat & CLASS1_STORAGE_FAULT_INTR)
__spu_trap_data_map(spu, dar, dsisr); __spu_trap_data_map(spu, dar, dsisr);
......
...@@ -109,13 +109,12 @@ void spu_forget(struct spu_context *ctx) ...@@ -109,13 +109,12 @@ void spu_forget(struct spu_context *ctx)
/* /*
* This is basically an open-coded spu_acquire_saved, except that * This is basically an open-coded spu_acquire_saved, except that
* we don't acquire the state mutex interruptible. * we don't acquire the state mutex interruptible, and we don't
* want this context to be rescheduled on release.
*/ */
mutex_lock(&ctx->state_mutex); mutex_lock(&ctx->state_mutex);
if (ctx->state != SPU_STATE_SAVED) { if (ctx->state != SPU_STATE_SAVED)
set_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags);
spu_deactivate(ctx); spu_deactivate(ctx);
}
mm = ctx->owner; mm = ctx->owner;
ctx->owner = NULL; ctx->owner = NULL;
......
...@@ -366,6 +366,13 @@ static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma, ...@@ -366,6 +366,13 @@ static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma,
if (offset >= ps_size) if (offset >= ps_size)
return NOPFN_SIGBUS; return NOPFN_SIGBUS;
/*
* Because we release the mmap_sem, the context may be destroyed while
* we're in spu_wait. Grab an extra reference so it isn't destroyed
* in the meantime.
*/
get_spu_context(ctx);
/* /*
* We have to wait for context to be loaded before we have * We have to wait for context to be loaded before we have
* pages to hand out to the user, but we don't want to wait * pages to hand out to the user, but we don't want to wait
...@@ -375,7 +382,7 @@ static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma, ...@@ -375,7 +382,7 @@ static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma,
* hanged. * hanged.
*/ */
if (spu_acquire(ctx)) if (spu_acquire(ctx))
return NOPFN_REFAULT; goto refault;
if (ctx->state == SPU_STATE_SAVED) { if (ctx->state == SPU_STATE_SAVED) {
up_read(&current->mm->mmap_sem); up_read(&current->mm->mmap_sem);
...@@ -391,6 +398,9 @@ static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma, ...@@ -391,6 +398,9 @@ static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma,
if (!ret) if (!ret)
spu_release(ctx); spu_release(ctx);
refault:
put_spu_context(ctx);
return NOPFN_REFAULT; return NOPFN_REFAULT;
} }
......
...@@ -246,7 +246,7 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx) ...@@ -246,7 +246,7 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
spu_switch_notify(spu, ctx); spu_switch_notify(spu, ctx);
ctx->state = SPU_STATE_RUNNABLE; ctx->state = SPU_STATE_RUNNABLE;
spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED); spuctx_switch_state(ctx, SPU_UTIL_USER);
} }
/* /*
......
...@@ -58,12 +58,12 @@ static int sputrace_sprint(char *tbuf, int n) ...@@ -58,12 +58,12 @@ static int sputrace_sprint(char *tbuf, int n)
ktime_to_timespec(ktime_sub(t->tstamp, sputrace_start)); ktime_to_timespec(ktime_sub(t->tstamp, sputrace_start));
return snprintf(tbuf, n, return snprintf(tbuf, n,
"[%lu.%09lu] %d: %s (thread = %d, spu = %d)\n", "[%lu.%09lu] %d: %s (ctxthread = %d, spu = %d)\n",
(unsigned long) tv.tv_sec, (unsigned long) tv.tv_sec,
(unsigned long) tv.tv_nsec, (unsigned long) tv.tv_nsec,
t->owner_tid,
t->name,
t->curr_tid, t->curr_tid,
t->name,
t->owner_tid,
t->number); t->number);
} }
...@@ -188,6 +188,7 @@ struct spu_probe spu_probes[] = { ...@@ -188,6 +188,7 @@ struct spu_probe spu_probes[] = {
{ "spufs_ps_nopfn__insert", "%p %p", spu_context_event }, { "spufs_ps_nopfn__insert", "%p %p", spu_context_event },
{ "spu_acquire_saved__enter", "%p", spu_context_nospu_event }, { "spu_acquire_saved__enter", "%p", spu_context_nospu_event },
{ "destroy_spu_context__enter", "%p", spu_context_nospu_event }, { "destroy_spu_context__enter", "%p", spu_context_nospu_event },
{ "spufs_stop_callback__enter", "%p %p", spu_context_event },
}; };
static int __init sputrace_init(void) static int __init sputrace_init(void)
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/hardirq.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/mm.h> #include <linux/mm.h>
...@@ -117,6 +118,8 @@ static inline void disable_interrupts(struct spu_state *csa, struct spu *spu) ...@@ -117,6 +118,8 @@ static inline void disable_interrupts(struct spu_state *csa, struct spu *spu)
* Write INT_MASK_class1 with value of 0. * Write INT_MASK_class1 with value of 0.
* Save INT_Mask_class2 in CSA. * Save INT_Mask_class2 in CSA.
* Write INT_MASK_class2 with value of 0. * Write INT_MASK_class2 with value of 0.
* Synchronize all three interrupts to be sure
* we no longer execute a handler on another CPU.
*/ */
spin_lock_irq(&spu->register_lock); spin_lock_irq(&spu->register_lock);
if (csa) { if (csa) {
...@@ -129,6 +132,9 @@ static inline void disable_interrupts(struct spu_state *csa, struct spu *spu) ...@@ -129,6 +132,9 @@ static inline void disable_interrupts(struct spu_state *csa, struct spu *spu)
spu_int_mask_set(spu, 2, 0ul); spu_int_mask_set(spu, 2, 0ul);
eieio(); eieio();
spin_unlock_irq(&spu->register_lock); spin_unlock_irq(&spu->register_lock);
synchronize_irq(spu->irqs[0]);
synchronize_irq(spu->irqs[1]);
synchronize_irq(spu->irqs[2]);
} }
static inline void set_watchdog_timer(struct spu_state *csa, struct spu *spu) static inline void set_watchdog_timer(struct spu_state *csa, struct spu *spu)
......
...@@ -21,9 +21,6 @@ ...@@ -21,9 +21,6 @@
#ifndef _CELLEB_BEAT_H #ifndef _CELLEB_BEAT_H
#define _CELLEB_BEAT_H #define _CELLEB_BEAT_H
#define DABRX_KERNEL (1UL<<1)
#define DABRX_USER (1UL<<0)
int64_t beat_get_term_char(uint64_t,uint64_t*,uint64_t*,uint64_t*); int64_t beat_get_term_char(uint64_t,uint64_t*,uint64_t*,uint64_t*);
int64_t beat_put_term_char(uint64_t,uint64_t,uint64_t,uint64_t); int64_t beat_put_term_char(uint64_t,uint64_t,uint64_t,uint64_t);
int64_t beat_repository_encode(int, const char *, uint64_t[4]); int64_t beat_repository_encode(int, const char *, uint64_t[4]);
......
...@@ -26,7 +26,6 @@ struct cpa_data { ...@@ -26,7 +26,6 @@ struct cpa_data {
pgprot_t mask_set; pgprot_t mask_set;
pgprot_t mask_clr; pgprot_t mask_clr;
int numpages; int numpages;
int processed;
int flushtlb; int flushtlb;
unsigned long pfn; unsigned long pfn;
}; };
...@@ -291,8 +290,8 @@ try_preserve_large_page(pte_t *kpte, unsigned long address, ...@@ -291,8 +290,8 @@ try_preserve_large_page(pte_t *kpte, unsigned long address,
*/ */
nextpage_addr = (address + psize) & pmask; nextpage_addr = (address + psize) & pmask;
numpages = (nextpage_addr - address) >> PAGE_SHIFT; numpages = (nextpage_addr - address) >> PAGE_SHIFT;
if (numpages < cpa->processed) if (numpages < cpa->numpages)
cpa->processed = numpages; cpa->numpages = numpages;
/* /*
* We are safe now. Check whether the new pgprot is the same: * We are safe now. Check whether the new pgprot is the same:
...@@ -319,7 +318,7 @@ try_preserve_large_page(pte_t *kpte, unsigned long address, ...@@ -319,7 +318,7 @@ try_preserve_large_page(pte_t *kpte, unsigned long address,
*/ */
addr = address + PAGE_SIZE; addr = address + PAGE_SIZE;
pfn++; pfn++;
for (i = 1; i < cpa->processed; i++, addr += PAGE_SIZE, pfn++) { for (i = 1; i < cpa->numpages; i++, addr += PAGE_SIZE, pfn++) {
pgprot_t chk_prot = static_protections(new_prot, addr, pfn); pgprot_t chk_prot = static_protections(new_prot, addr, pfn);
if (pgprot_val(chk_prot) != pgprot_val(new_prot)) if (pgprot_val(chk_prot) != pgprot_val(new_prot))
...@@ -343,7 +342,7 @@ try_preserve_large_page(pte_t *kpte, unsigned long address, ...@@ -343,7 +342,7 @@ try_preserve_large_page(pte_t *kpte, unsigned long address,
* that we limited the number of possible pages already to * that we limited the number of possible pages already to
* the number of pages in the large page. * the number of pages in the large page.
*/ */
if (address == (nextpage_addr - psize) && cpa->processed == numpages) { if (address == (nextpage_addr - psize) && cpa->numpages == numpages) {
/* /*
* The address is aligned and the number of pages * The address is aligned and the number of pages
* covers the full page. * covers the full page.
...@@ -573,7 +572,7 @@ static int __change_page_attr(struct cpa_data *cpa, int primary) ...@@ -573,7 +572,7 @@ static int __change_page_attr(struct cpa_data *cpa, int primary)
set_pte_atomic(kpte, new_pte); set_pte_atomic(kpte, new_pte);
cpa->flushtlb = 1; cpa->flushtlb = 1;
} }
cpa->processed = 1; cpa->numpages = 1;
return 0; return 0;
} }
...@@ -584,7 +583,7 @@ static int __change_page_attr(struct cpa_data *cpa, int primary) ...@@ -584,7 +583,7 @@ static int __change_page_attr(struct cpa_data *cpa, int primary)
do_split = try_preserve_large_page(kpte, address, cpa); do_split = try_preserve_large_page(kpte, address, cpa);
/* /*
* When the range fits into the existing large page, * When the range fits into the existing large page,
* return. cp->processed and cpa->tlbflush have been updated in * return. cp->numpages and cpa->tlbflush have been updated in
* try_large_page: * try_large_page:
*/ */
if (do_split <= 0) if (do_split <= 0)
...@@ -663,7 +662,7 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias) ...@@ -663,7 +662,7 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias)
* Store the remaining nr of pages for the large page * Store the remaining nr of pages for the large page
* preservation check. * preservation check.
*/ */
cpa->numpages = cpa->processed = numpages; cpa->numpages = numpages;
ret = __change_page_attr(cpa, checkalias); ret = __change_page_attr(cpa, checkalias);
if (ret) if (ret)
...@@ -680,9 +679,9 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias) ...@@ -680,9 +679,9 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias)
* CPA operation. Either a large page has been * CPA operation. Either a large page has been
* preserved or a single page update happened. * preserved or a single page update happened.
*/ */
BUG_ON(cpa->processed > numpages); BUG_ON(cpa->numpages > numpages);
numpages -= cpa->processed; numpages -= cpa->numpages;
cpa->vaddr += cpa->processed * PAGE_SIZE; cpa->vaddr += cpa->numpages * PAGE_SIZE;
} }
return 0; return 0;
} }
......
...@@ -347,40 +347,40 @@ char *func_table[MAX_NR_FUNC] = { ...@@ -347,40 +347,40 @@ char *func_table[MAX_NR_FUNC] = {
}; };
struct kbdiacruc accent_table[MAX_DIACR] = { struct kbdiacruc accent_table[MAX_DIACR] = {
{'`', 'A', '\300'}, {'`', 'a', '\340'}, {'`', 'A', 0300}, {'`', 'a', 0340},
{'\'', 'A', '\301'}, {'\'', 'a', '\341'}, {'\'', 'A', 0301}, {'\'', 'a', 0341},
{'^', 'A', '\302'}, {'^', 'a', '\342'}, {'^', 'A', 0302}, {'^', 'a', 0342},
{'~', 'A', '\303'}, {'~', 'a', '\343'}, {'~', 'A', 0303}, {'~', 'a', 0343},
{'"', 'A', '\304'}, {'"', 'a', '\344'}, {'"', 'A', 0304}, {'"', 'a', 0344},
{'O', 'A', '\305'}, {'o', 'a', '\345'}, {'O', 'A', 0305}, {'o', 'a', 0345},
{'0', 'A', '\305'}, {'0', 'a', '\345'}, {'0', 'A', 0305}, {'0', 'a', 0345},
{'A', 'A', '\305'}, {'a', 'a', '\345'}, {'A', 'A', 0305}, {'a', 'a', 0345},
{'A', 'E', '\306'}, {'a', 'e', '\346'}, {'A', 'E', 0306}, {'a', 'e', 0346},
{',', 'C', '\307'}, {',', 'c', '\347'}, {',', 'C', 0307}, {',', 'c', 0347},
{'`', 'E', '\310'}, {'`', 'e', '\350'}, {'`', 'E', 0310}, {'`', 'e', 0350},
{'\'', 'E', '\311'}, {'\'', 'e', '\351'}, {'\'', 'E', 0311}, {'\'', 'e', 0351},
{'^', 'E', '\312'}, {'^', 'e', '\352'}, {'^', 'E', 0312}, {'^', 'e', 0352},
{'"', 'E', '\313'}, {'"', 'e', '\353'}, {'"', 'E', 0313}, {'"', 'e', 0353},
{'`', 'I', '\314'}, {'`', 'i', '\354'}, {'`', 'I', 0314}, {'`', 'i', 0354},
{'\'', 'I', '\315'}, {'\'', 'i', '\355'}, {'\'', 'I', 0315}, {'\'', 'i', 0355},
{'^', 'I', '\316'}, {'^', 'i', '\356'}, {'^', 'I', 0316}, {'^', 'i', 0356},
{'"', 'I', '\317'}, {'"', 'i', '\357'}, {'"', 'I', 0317}, {'"', 'i', 0357},
{'-', 'D', '\320'}, {'-', 'd', '\360'}, {'-', 'D', 0320}, {'-', 'd', 0360},
{'~', 'N', '\321'}, {'~', 'n', '\361'}, {'~', 'N', 0321}, {'~', 'n', 0361},
{'`', 'O', '\322'}, {'`', 'o', '\362'}, {'`', 'O', 0322}, {'`', 'o', 0362},
{'\'', 'O', '\323'}, {'\'', 'o', '\363'}, {'\'', 'O', 0323}, {'\'', 'o', 0363},
{'^', 'O', '\324'}, {'^', 'o', '\364'}, {'^', 'O', 0324}, {'^', 'o', 0364},
{'~', 'O', '\325'}, {'~', 'o', '\365'}, {'~', 'O', 0325}, {'~', 'o', 0365},
{'"', 'O', '\326'}, {'"', 'o', '\366'}, {'"', 'O', 0326}, {'"', 'o', 0366},
{'/', 'O', '\330'}, {'/', 'o', '\370'}, {'/', 'O', 0330}, {'/', 'o', 0370},
{'`', 'U', '\331'}, {'`', 'u', '\371'}, {'`', 'U', 0331}, {'`', 'u', 0371},
{'\'', 'U', '\332'}, {'\'', 'u', '\372'}, {'\'', 'U', 0332}, {'\'', 'u', 0372},
{'^', 'U', '\333'}, {'^', 'u', '\373'}, {'^', 'U', 0333}, {'^', 'u', 0373},
{'"', 'U', '\334'}, {'"', 'u', '\374'}, {'"', 'U', 0334}, {'"', 'u', 0374},
{'\'', 'Y', '\335'}, {'\'', 'y', '\375'}, {'\'', 'Y', 0335}, {'\'', 'y', 0375},
{'T', 'H', '\336'}, {'t', 'h', '\376'}, {'T', 'H', 0336}, {'t', 'h', 0376},
{'s', 's', '\337'}, {'"', 'y', '\377'}, {'s', 's', 0337}, {'"', 'y', 0377},
{'s', 'z', '\337'}, {'i', 'j', '\377'}, {'s', 'z', 0337}, {'i', 'j', 0377},
}; };
unsigned int accent_table_size = 68; unsigned int accent_table_size = 68;
...@@ -126,9 +126,7 @@ static int transport_setup_classdev(struct attribute_container *cont, ...@@ -126,9 +126,7 @@ static int transport_setup_classdev(struct attribute_container *cont,
} }
/** /**
* transport_setup_device - declare a new dev for transport class association * transport_setup_device - declare a new dev for transport class association but don't make it visible yet.
* but don't make it visible yet.
*
* @dev: the generic device representing the entity being added * @dev: the generic device representing the entity being added
* *
* Usually, dev represents some component in the HBA system (either * Usually, dev represents some component in the HBA system (either
......
...@@ -223,40 +223,40 @@ char *func_table[MAX_NR_FUNC] = { ...@@ -223,40 +223,40 @@ char *func_table[MAX_NR_FUNC] = {
}; };
struct kbdiacruc accent_table[MAX_DIACR] = { struct kbdiacruc accent_table[MAX_DIACR] = {
{'`', 'A', '\300'}, {'`', 'a', '\340'}, {'`', 'A', 0300}, {'`', 'a', 0340},
{'\'', 'A', '\301'}, {'\'', 'a', '\341'}, {'\'', 'A', 0301}, {'\'', 'a', 0341},
{'^', 'A', '\302'}, {'^', 'a', '\342'}, {'^', 'A', 0302}, {'^', 'a', 0342},
{'~', 'A', '\303'}, {'~', 'a', '\343'}, {'~', 'A', 0303}, {'~', 'a', 0343},
{'"', 'A', '\304'}, {'"', 'a', '\344'}, {'"', 'A', 0304}, {'"', 'a', 0344},
{'O', 'A', '\305'}, {'o', 'a', '\345'}, {'O', 'A', 0305}, {'o', 'a', 0345},
{'0', 'A', '\305'}, {'0', 'a', '\345'}, {'0', 'A', 0305}, {'0', 'a', 0345},
{'A', 'A', '\305'}, {'a', 'a', '\345'}, {'A', 'A', 0305}, {'a', 'a', 0345},
{'A', 'E', '\306'}, {'a', 'e', '\346'}, {'A', 'E', 0306}, {'a', 'e', 0346},
{',', 'C', '\307'}, {',', 'c', '\347'}, {',', 'C', 0307}, {',', 'c', 0347},
{'`', 'E', '\310'}, {'`', 'e', '\350'}, {'`', 'E', 0310}, {'`', 'e', 0350},
{'\'', 'E', '\311'}, {'\'', 'e', '\351'}, {'\'', 'E', 0311}, {'\'', 'e', 0351},
{'^', 'E', '\312'}, {'^', 'e', '\352'}, {'^', 'E', 0312}, {'^', 'e', 0352},
{'"', 'E', '\313'}, {'"', 'e', '\353'}, {'"', 'E', 0313}, {'"', 'e', 0353},
{'`', 'I', '\314'}, {'`', 'i', '\354'}, {'`', 'I', 0314}, {'`', 'i', 0354},
{'\'', 'I', '\315'}, {'\'', 'i', '\355'}, {'\'', 'I', 0315}, {'\'', 'i', 0355},
{'^', 'I', '\316'}, {'^', 'i', '\356'}, {'^', 'I', 0316}, {'^', 'i', 0356},
{'"', 'I', '\317'}, {'"', 'i', '\357'}, {'"', 'I', 0317}, {'"', 'i', 0357},
{'-', 'D', '\320'}, {'-', 'd', '\360'}, {'-', 'D', 0320}, {'-', 'd', 0360},
{'~', 'N', '\321'}, {'~', 'n', '\361'}, {'~', 'N', 0321}, {'~', 'n', 0361},
{'`', 'O', '\322'}, {'`', 'o', '\362'}, {'`', 'O', 0322}, {'`', 'o', 0362},
{'\'', 'O', '\323'}, {'\'', 'o', '\363'}, {'\'', 'O', 0323}, {'\'', 'o', 0363},
{'^', 'O', '\324'}, {'^', 'o', '\364'}, {'^', 'O', 0324}, {'^', 'o', 0364},
{'~', 'O', '\325'}, {'~', 'o', '\365'}, {'~', 'O', 0325}, {'~', 'o', 0365},
{'"', 'O', '\326'}, {'"', 'o', '\366'}, {'"', 'O', 0326}, {'"', 'o', 0366},
{'/', 'O', '\330'}, {'/', 'o', '\370'}, {'/', 'O', 0330}, {'/', 'o', 0370},
{'`', 'U', '\331'}, {'`', 'u', '\371'}, {'`', 'U', 0331}, {'`', 'u', 0371},
{'\'', 'U', '\332'}, {'\'', 'u', '\372'}, {'\'', 'U', 0332}, {'\'', 'u', 0372},
{'^', 'U', '\333'}, {'^', 'u', '\373'}, {'^', 'U', 0333}, {'^', 'u', 0373},
{'"', 'U', '\334'}, {'"', 'u', '\374'}, {'"', 'U', 0334}, {'"', 'u', 0374},
{'\'', 'Y', '\335'}, {'\'', 'y', '\375'}, {'\'', 'Y', 0335}, {'\'', 'y', 0375},
{'T', 'H', '\336'}, {'t', 'h', '\376'}, {'T', 'H', 0336}, {'t', 'h', 0376},
{'s', 's', '\337'}, {'"', 'y', '\377'}, {'s', 's', 0337}, {'"', 'y', 0377},
{'s', 'z', '\337'}, {'i', 'j', '\377'}, {'s', 'z', 0337}, {'i', 'j', 0377},
}; };
unsigned int accent_table_size = 68; unsigned int accent_table_size = 68;
...@@ -73,8 +73,8 @@ ...@@ -73,8 +73,8 @@
#define XHI_BUFFER_START 0 #define XHI_BUFFER_START 0
/** /**
* buffer_icap_get_status: Get the contents of the status register. * buffer_icap_get_status - Get the contents of the status register.
* @parameter base_address: is the base address of the device * @base_address: is the base address of the device
* *
* The status register contains the ICAP status and the done bit. * The status register contains the ICAP status and the done bit.
* *
...@@ -94,9 +94,9 @@ static inline u32 buffer_icap_get_status(void __iomem *base_address) ...@@ -94,9 +94,9 @@ static inline u32 buffer_icap_get_status(void __iomem *base_address)
} }
/** /**
* buffer_icap_get_bram: Reads data from the storage buffer bram. * buffer_icap_get_bram - Reads data from the storage buffer bram.
* @parameter base_address: contains the base address of the component. * @base_address: contains the base address of the component.
* @parameter offset: The word offset from which the data should be read. * @offset: The word offset from which the data should be read.
* *
* A bram is used as a configuration memory cache. One frame of data can * A bram is used as a configuration memory cache. One frame of data can
* be stored in this "storage buffer". * be stored in this "storage buffer".
...@@ -108,8 +108,8 @@ static inline u32 buffer_icap_get_bram(void __iomem *base_address, ...@@ -108,8 +108,8 @@ static inline u32 buffer_icap_get_bram(void __iomem *base_address,
} }
/** /**
* buffer_icap_busy: Return true if the icap device is busy * buffer_icap_busy - Return true if the icap device is busy
* @parameter base_address: is the base address of the device * @base_address: is the base address of the device
* *
* The queries the low order bit of the status register, which * The queries the low order bit of the status register, which
* indicates whether the current configuration or readback operation * indicates whether the current configuration or readback operation
...@@ -121,8 +121,8 @@ static inline bool buffer_icap_busy(void __iomem *base_address) ...@@ -121,8 +121,8 @@ static inline bool buffer_icap_busy(void __iomem *base_address)
} }
/** /**
* buffer_icap_busy: Return true if the icap device is not busy * buffer_icap_busy - Return true if the icap device is not busy
* @parameter base_address: is the base address of the device * @base_address: is the base address of the device
* *
* The queries the low order bit of the status register, which * The queries the low order bit of the status register, which
* indicates whether the current configuration or readback operation * indicates whether the current configuration or readback operation
...@@ -134,9 +134,9 @@ static inline bool buffer_icap_done(void __iomem *base_address) ...@@ -134,9 +134,9 @@ static inline bool buffer_icap_done(void __iomem *base_address)
} }
/** /**
* buffer_icap_set_size: Set the size register. * buffer_icap_set_size - Set the size register.
* @parameter base_address: is the base address of the device * @base_address: is the base address of the device
* @parameter data: The size in bytes. * @data: The size in bytes.
* *
* The size register holds the number of 8 bit bytes to transfer between * The size register holds the number of 8 bit bytes to transfer between
* bram and the icap (or icap to bram). * bram and the icap (or icap to bram).
...@@ -148,9 +148,9 @@ static inline void buffer_icap_set_size(void __iomem *base_address, ...@@ -148,9 +148,9 @@ static inline void buffer_icap_set_size(void __iomem *base_address,
} }
/** /**
* buffer_icap_mSetoffsetReg: Set the bram offset register. * buffer_icap_set_offset - Set the bram offset register.
* @parameter base_address: contains the base address of the device. * @base_address: contains the base address of the device.
* @parameter data: is the value to be written to the data register. * @data: is the value to be written to the data register.
* *
* The bram offset register holds the starting bram address to transfer * The bram offset register holds the starting bram address to transfer
* data from during configuration or write data to during readback. * data from during configuration or write data to during readback.
...@@ -162,9 +162,9 @@ static inline void buffer_icap_set_offset(void __iomem *base_address, ...@@ -162,9 +162,9 @@ static inline void buffer_icap_set_offset(void __iomem *base_address,
} }
/** /**
* buffer_icap_set_rnc: Set the RNC (Readback not Configure) register. * buffer_icap_set_rnc - Set the RNC (Readback not Configure) register.
* @parameter base_address: contains the base address of the device. * @base_address: contains the base address of the device.
* @parameter data: is the value to be written to the data register. * @data: is the value to be written to the data register.
* *
* The RNC register determines the direction of the data transfer. It * The RNC register determines the direction of the data transfer. It
* controls whether a configuration or readback take place. Writing to * controls whether a configuration or readback take place. Writing to
...@@ -178,10 +178,10 @@ static inline void buffer_icap_set_rnc(void __iomem *base_address, ...@@ -178,10 +178,10 @@ static inline void buffer_icap_set_rnc(void __iomem *base_address,
} }
/** /**
* buffer_icap_set_bram: Write data to the storage buffer bram. * buffer_icap_set_bram - Write data to the storage buffer bram.
* @parameter base_address: contains the base address of the component. * @base_address: contains the base address of the component.
* @parameter offset: The word offset at which the data should be written. * @offset: The word offset at which the data should be written.
* @parameter data: The value to be written to the bram offset. * @data: The value to be written to the bram offset.
* *
* A bram is used as a configuration memory cache. One frame of data can * A bram is used as a configuration memory cache. One frame of data can
* be stored in this "storage buffer". * be stored in this "storage buffer".
...@@ -193,10 +193,10 @@ static inline void buffer_icap_set_bram(void __iomem *base_address, ...@@ -193,10 +193,10 @@ static inline void buffer_icap_set_bram(void __iomem *base_address,
} }
/** /**
* buffer_icap_device_read: Transfer bytes from ICAP to the storage buffer. * buffer_icap_device_read - Transfer bytes from ICAP to the storage buffer.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
* @parameter offset: The storage buffer start address. * @offset: The storage buffer start address.
* @parameter count: The number of words (32 bit) to read from the * @count: The number of words (32 bit) to read from the
* device (ICAP). * device (ICAP).
**/ **/
static int buffer_icap_device_read(struct hwicap_drvdata *drvdata, static int buffer_icap_device_read(struct hwicap_drvdata *drvdata,
...@@ -227,10 +227,10 @@ static int buffer_icap_device_read(struct hwicap_drvdata *drvdata, ...@@ -227,10 +227,10 @@ static int buffer_icap_device_read(struct hwicap_drvdata *drvdata,
}; };
/** /**
* buffer_icap_device_write: Transfer bytes from ICAP to the storage buffer. * buffer_icap_device_write - Transfer bytes from ICAP to the storage buffer.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
* @parameter offset: The storage buffer start address. * @offset: The storage buffer start address.
* @parameter count: The number of words (32 bit) to read from the * @count: The number of words (32 bit) to read from the
* device (ICAP). * device (ICAP).
**/ **/
static int buffer_icap_device_write(struct hwicap_drvdata *drvdata, static int buffer_icap_device_write(struct hwicap_drvdata *drvdata,
...@@ -261,8 +261,8 @@ static int buffer_icap_device_write(struct hwicap_drvdata *drvdata, ...@@ -261,8 +261,8 @@ static int buffer_icap_device_write(struct hwicap_drvdata *drvdata,
}; };
/** /**
* buffer_icap_reset: Reset the logic of the icap device. * buffer_icap_reset - Reset the logic of the icap device.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
* *
* Writing to the status register resets the ICAP logic in an internal * Writing to the status register resets the ICAP logic in an internal
* version of the core. For the version of the core published in EDK, * version of the core. For the version of the core published in EDK,
...@@ -274,10 +274,10 @@ void buffer_icap_reset(struct hwicap_drvdata *drvdata) ...@@ -274,10 +274,10 @@ void buffer_icap_reset(struct hwicap_drvdata *drvdata)
} }
/** /**
* buffer_icap_set_configuration: Load a partial bitstream from system memory. * buffer_icap_set_configuration - Load a partial bitstream from system memory.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
* @parameter data: Kernel address of the partial bitstream. * @data: Kernel address of the partial bitstream.
* @parameter size: the size of the partial bitstream in 32 bit words. * @size: the size of the partial bitstream in 32 bit words.
**/ **/
int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data, int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data,
u32 size) u32 size)
...@@ -333,10 +333,10 @@ int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data, ...@@ -333,10 +333,10 @@ int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data,
}; };
/** /**
* buffer_icap_get_configuration: Read configuration data from the device. * buffer_icap_get_configuration - Read configuration data from the device.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
* @parameter data: Address of the data representing the partial bitstream * @data: Address of the data representing the partial bitstream
* @parameter size: the size of the partial bitstream in 32 bit words. * @size: the size of the partial bitstream in 32 bit words.
**/ **/
int buffer_icap_get_configuration(struct hwicap_drvdata *drvdata, u32 *data, int buffer_icap_get_configuration(struct hwicap_drvdata *drvdata, u32 *data,
u32 size) u32 size)
......
...@@ -94,9 +94,9 @@ ...@@ -94,9 +94,9 @@
/** /**
* fifo_icap_fifo_write: Write data to the write FIFO. * fifo_icap_fifo_write - Write data to the write FIFO.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
* @parameter data: the 32-bit value to be written to the FIFO. * @data: the 32-bit value to be written to the FIFO.
* *
* This function will silently fail if the fifo is full. * This function will silently fail if the fifo is full.
**/ **/
...@@ -108,8 +108,8 @@ static inline void fifo_icap_fifo_write(struct hwicap_drvdata *drvdata, ...@@ -108,8 +108,8 @@ static inline void fifo_icap_fifo_write(struct hwicap_drvdata *drvdata,
} }
/** /**
* fifo_icap_fifo_read: Read data from the Read FIFO. * fifo_icap_fifo_read - Read data from the Read FIFO.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
* *
* This function will silently fail if the fifo is empty. * This function will silently fail if the fifo is empty.
**/ **/
...@@ -121,9 +121,9 @@ static inline u32 fifo_icap_fifo_read(struct hwicap_drvdata *drvdata) ...@@ -121,9 +121,9 @@ static inline u32 fifo_icap_fifo_read(struct hwicap_drvdata *drvdata)
} }
/** /**
* fifo_icap_set_read_size: Set the the size register. * fifo_icap_set_read_size - Set the the size register.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
* @parameter data: the size of the following read transaction, in words. * @data: the size of the following read transaction, in words.
**/ **/
static inline void fifo_icap_set_read_size(struct hwicap_drvdata *drvdata, static inline void fifo_icap_set_read_size(struct hwicap_drvdata *drvdata,
u32 data) u32 data)
...@@ -132,8 +132,8 @@ static inline void fifo_icap_set_read_size(struct hwicap_drvdata *drvdata, ...@@ -132,8 +132,8 @@ static inline void fifo_icap_set_read_size(struct hwicap_drvdata *drvdata,
} }
/** /**
* fifo_icap_start_config: Initiate a configuration (write) to the device. * fifo_icap_start_config - Initiate a configuration (write) to the device.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
**/ **/
static inline void fifo_icap_start_config(struct hwicap_drvdata *drvdata) static inline void fifo_icap_start_config(struct hwicap_drvdata *drvdata)
{ {
...@@ -142,8 +142,8 @@ static inline void fifo_icap_start_config(struct hwicap_drvdata *drvdata) ...@@ -142,8 +142,8 @@ static inline void fifo_icap_start_config(struct hwicap_drvdata *drvdata)
} }
/** /**
* fifo_icap_start_readback: Initiate a readback from the device. * fifo_icap_start_readback - Initiate a readback from the device.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
**/ **/
static inline void fifo_icap_start_readback(struct hwicap_drvdata *drvdata) static inline void fifo_icap_start_readback(struct hwicap_drvdata *drvdata)
{ {
...@@ -152,8 +152,8 @@ static inline void fifo_icap_start_readback(struct hwicap_drvdata *drvdata) ...@@ -152,8 +152,8 @@ static inline void fifo_icap_start_readback(struct hwicap_drvdata *drvdata)
} }
/** /**
* fifo_icap_busy: Return true if the ICAP is still processing a transaction. * fifo_icap_busy - Return true if the ICAP is still processing a transaction.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
**/ **/
static inline u32 fifo_icap_busy(struct hwicap_drvdata *drvdata) static inline u32 fifo_icap_busy(struct hwicap_drvdata *drvdata)
{ {
...@@ -163,8 +163,8 @@ static inline u32 fifo_icap_busy(struct hwicap_drvdata *drvdata) ...@@ -163,8 +163,8 @@ static inline u32 fifo_icap_busy(struct hwicap_drvdata *drvdata)
} }
/** /**
* fifo_icap_write_fifo_vacancy: Query the write fifo available space. * fifo_icap_write_fifo_vacancy - Query the write fifo available space.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
* *
* Return the number of words that can be safely pushed into the write fifo. * Return the number of words that can be safely pushed into the write fifo.
**/ **/
...@@ -175,8 +175,8 @@ static inline u32 fifo_icap_write_fifo_vacancy( ...@@ -175,8 +175,8 @@ static inline u32 fifo_icap_write_fifo_vacancy(
} }
/** /**
* fifo_icap_read_fifo_occupancy: Query the read fifo available data. * fifo_icap_read_fifo_occupancy - Query the read fifo available data.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
* *
* Return the number of words that can be safely read from the read fifo. * Return the number of words that can be safely read from the read fifo.
**/ **/
...@@ -187,11 +187,11 @@ static inline u32 fifo_icap_read_fifo_occupancy( ...@@ -187,11 +187,11 @@ static inline u32 fifo_icap_read_fifo_occupancy(
} }
/** /**
* fifo_icap_set_configuration: Send configuration data to the ICAP. * fifo_icap_set_configuration - Send configuration data to the ICAP.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
* @parameter frame_buffer: a pointer to the data to be written to the * @frame_buffer: a pointer to the data to be written to the
* ICAP device. * ICAP device.
* @parameter num_words: the number of words (32 bit) to write to the ICAP * @num_words: the number of words (32 bit) to write to the ICAP
* device. * device.
* This function writes the given user data to the Write FIFO in * This function writes the given user data to the Write FIFO in
...@@ -266,10 +266,10 @@ int fifo_icap_set_configuration(struct hwicap_drvdata *drvdata, ...@@ -266,10 +266,10 @@ int fifo_icap_set_configuration(struct hwicap_drvdata *drvdata,
} }
/** /**
* fifo_icap_get_configuration: Read configuration data from the device. * fifo_icap_get_configuration - Read configuration data from the device.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
* @parameter data: Address of the data representing the partial bitstream * @data: Address of the data representing the partial bitstream
* @parameter size: the size of the partial bitstream in 32 bit words. * @size: the size of the partial bitstream in 32 bit words.
* *
* This function reads the specified number of words from the ICAP device in * This function reads the specified number of words from the ICAP device in
* the polled mode. * the polled mode.
...@@ -335,8 +335,8 @@ int fifo_icap_get_configuration(struct hwicap_drvdata *drvdata, ...@@ -335,8 +335,8 @@ int fifo_icap_get_configuration(struct hwicap_drvdata *drvdata,
} }
/** /**
* buffer_icap_reset: Reset the logic of the icap device. * buffer_icap_reset - Reset the logic of the icap device.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
* *
* This function forces the software reset of the complete HWICAP device. * This function forces the software reset of the complete HWICAP device.
* All the registers will return to the default value and the FIFO is also * All the registers will return to the default value and the FIFO is also
...@@ -360,8 +360,8 @@ void fifo_icap_reset(struct hwicap_drvdata *drvdata) ...@@ -360,8 +360,8 @@ void fifo_icap_reset(struct hwicap_drvdata *drvdata)
} }
/** /**
* fifo_icap_flush_fifo: This function flushes the FIFOs in the device. * fifo_icap_flush_fifo - This function flushes the FIFOs in the device.
* @parameter drvdata: a pointer to the drvdata. * @drvdata: a pointer to the drvdata.
*/ */
void fifo_icap_flush_fifo(struct hwicap_drvdata *drvdata) void fifo_icap_flush_fifo(struct hwicap_drvdata *drvdata)
{ {
......
This diff is collapsed.
...@@ -48,9 +48,9 @@ struct hwicap_drvdata { ...@@ -48,9 +48,9 @@ struct hwicap_drvdata {
u8 write_buffer[4]; u8 write_buffer[4];
u32 read_buffer_in_use; /* Always in [0,3] */ u32 read_buffer_in_use; /* Always in [0,3] */
u8 read_buffer[4]; u8 read_buffer[4];
u32 mem_start; /* phys. address of the control registers */ resource_size_t mem_start;/* phys. address of the control registers */
u32 mem_end; /* phys. address of the control registers */ resource_size_t mem_end; /* phys. address of the control registers */
u32 mem_size; resource_size_t mem_size;
void __iomem *base_address;/* virt. address of the control registers */ void __iomem *base_address;/* virt. address of the control registers */
struct device *dev; struct device *dev;
...@@ -61,7 +61,7 @@ struct hwicap_drvdata { ...@@ -61,7 +61,7 @@ struct hwicap_drvdata {
const struct config_registers *config_regs; const struct config_registers *config_regs;
void *private_data; void *private_data;
bool is_open; bool is_open;
struct semaphore sem; struct mutex sem;
}; };
struct hwicap_driver_config { struct hwicap_driver_config {
...@@ -164,29 +164,29 @@ struct config_registers { ...@@ -164,29 +164,29 @@ struct config_registers {
#define XHI_DISABLED_AUTO_CRC 0x0000DEFCUL #define XHI_DISABLED_AUTO_CRC 0x0000DEFCUL
/** /**
* hwicap_type_1_read: Generates a Type 1 read packet header. * hwicap_type_1_read - Generates a Type 1 read packet header.
* @parameter: Register is the address of the register to be read back. * @reg: is the address of the register to be read back.
* *
* Generates a Type 1 read packet header, which is used to indirectly * Generates a Type 1 read packet header, which is used to indirectly
* read registers in the configuration logic. This packet must then * read registers in the configuration logic. This packet must then
* be sent through the icap device, and a return packet received with * be sent through the icap device, and a return packet received with
* the information. * the information.
**/ **/
static inline u32 hwicap_type_1_read(u32 Register) static inline u32 hwicap_type_1_read(u32 reg)
{ {
return (XHI_TYPE_1 << XHI_TYPE_SHIFT) | return (XHI_TYPE_1 << XHI_TYPE_SHIFT) |
(Register << XHI_REGISTER_SHIFT) | (reg << XHI_REGISTER_SHIFT) |
(XHI_OP_READ << XHI_OP_SHIFT); (XHI_OP_READ << XHI_OP_SHIFT);
} }
/** /**
* hwicap_type_1_write: Generates a Type 1 write packet header * hwicap_type_1_write - Generates a Type 1 write packet header
* @parameter: Register is the address of the register to be read back. * @reg: is the address of the register to be read back.
**/ **/
static inline u32 hwicap_type_1_write(u32 Register) static inline u32 hwicap_type_1_write(u32 reg)
{ {
return (XHI_TYPE_1 << XHI_TYPE_SHIFT) | return (XHI_TYPE_1 << XHI_TYPE_SHIFT) |
(Register << XHI_REGISTER_SHIFT) | (reg << XHI_REGISTER_SHIFT) |
(XHI_OP_WRITE << XHI_OP_SHIFT); (XHI_OP_WRITE << XHI_OP_SHIFT);
} }
......
...@@ -632,8 +632,7 @@ mpt_deregister(u8 cb_idx) ...@@ -632,8 +632,7 @@ mpt_deregister(u8 cb_idx)
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/** /**
* mpt_event_register - Register protocol-specific event callback * mpt_event_register - Register protocol-specific event callback handler.
* handler.
* @cb_idx: previously registered (via mpt_register) callback handle * @cb_idx: previously registered (via mpt_register) callback handle
* @ev_cbfunc: callback function * @ev_cbfunc: callback function
* *
...@@ -654,8 +653,7 @@ mpt_event_register(u8 cb_idx, MPT_EVHANDLER ev_cbfunc) ...@@ -654,8 +653,7 @@ mpt_event_register(u8 cb_idx, MPT_EVHANDLER ev_cbfunc)
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/** /**
* mpt_event_deregister - Deregister protocol-specific event callback * mpt_event_deregister - Deregister protocol-specific event callback handler
* handler.
* @cb_idx: previously registered callback handle * @cb_idx: previously registered callback handle
* *
* Each protocol-specific driver should call this routine * Each protocol-specific driver should call this routine
...@@ -765,11 +763,13 @@ mpt_device_driver_deregister(u8 cb_idx) ...@@ -765,11 +763,13 @@ mpt_device_driver_deregister(u8 cb_idx)
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/** /**
* mpt_get_msg_frame - Obtain a MPT request frame from the pool (of 1024) * mpt_get_msg_frame - Obtain an MPT request frame from the pool
* allocated per MPT adapter.
* @cb_idx: Handle of registered MPT protocol driver * @cb_idx: Handle of registered MPT protocol driver
* @ioc: Pointer to MPT adapter structure * @ioc: Pointer to MPT adapter structure
* *
* Obtain an MPT request frame from the pool (of 1024) that are
* allocated per MPT adapter.
*
* Returns pointer to a MPT request frame or %NULL if none are available * Returns pointer to a MPT request frame or %NULL if none are available
* or IOC is not active. * or IOC is not active.
*/ */
...@@ -834,13 +834,12 @@ mpt_get_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc) ...@@ -834,13 +834,12 @@ mpt_get_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc)
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/** /**
* mpt_put_msg_frame - Send a protocol specific MPT request frame * mpt_put_msg_frame - Send a protocol-specific MPT request frame to an IOC
* to a IOC.
* @cb_idx: Handle of registered MPT protocol driver * @cb_idx: Handle of registered MPT protocol driver
* @ioc: Pointer to MPT adapter structure * @ioc: Pointer to MPT adapter structure
* @mf: Pointer to MPT request frame * @mf: Pointer to MPT request frame
* *
* This routine posts a MPT request frame to the request post FIFO of a * This routine posts an MPT request frame to the request post FIFO of a
* specific MPT adapter. * specific MPT adapter.
*/ */
void void
...@@ -868,13 +867,15 @@ mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf) ...@@ -868,13 +867,15 @@ mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf)
} }
/** /**
* mpt_put_msg_frame_hi_pri - Send a protocol specific MPT request frame * mpt_put_msg_frame_hi_pri - Send a hi-pri protocol-specific MPT request frame
* to a IOC using hi priority request queue.
* @cb_idx: Handle of registered MPT protocol driver * @cb_idx: Handle of registered MPT protocol driver
* @ioc: Pointer to MPT adapter structure * @ioc: Pointer to MPT adapter structure
* @mf: Pointer to MPT request frame * @mf: Pointer to MPT request frame
* *
* This routine posts a MPT request frame to the request post FIFO of a * Send a protocol-specific MPT request frame to an IOC using
* hi-priority request queue.
*
* This routine posts an MPT request frame to the request post FIFO of a
* specific MPT adapter. * specific MPT adapter.
**/ **/
void void
......
...@@ -1533,7 +1533,7 @@ mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx) ...@@ -1533,7 +1533,7 @@ mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx)
* *
* Remark: Currently invoked from a non-interrupt thread (_bh). * Remark: Currently invoked from a non-interrupt thread (_bh).
* *
* Remark: With old EH code, at most 1 SCSI TaskMgmt function per IOC * Note: With old EH code, at most 1 SCSI TaskMgmt function per IOC
* will be active. * will be active.
* *
* Returns 0 for SUCCESS, or %FAILED. * Returns 0 for SUCCESS, or %FAILED.
...@@ -2537,14 +2537,12 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR ...@@ -2537,14 +2537,12 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR
/** /**
* mptscsih_get_scsi_lookup * mptscsih_get_scsi_lookup
*
* retrieves scmd entry from ScsiLookup[] array list
*
* @ioc: Pointer to MPT_ADAPTER structure * @ioc: Pointer to MPT_ADAPTER structure
* @i: index into the array * @i: index into the array
* *
* Returns the scsi_cmd pointer * retrieves scmd entry from ScsiLookup[] array list
* *
* Returns the scsi_cmd pointer
**/ **/
static struct scsi_cmnd * static struct scsi_cmnd *
mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i) mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i)
...@@ -2561,14 +2559,12 @@ mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i) ...@@ -2561,14 +2559,12 @@ mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i)
/** /**
* mptscsih_getclear_scsi_lookup * mptscsih_getclear_scsi_lookup
*
* retrieves and clears scmd entry from ScsiLookup[] array list
*
* @ioc: Pointer to MPT_ADAPTER structure * @ioc: Pointer to MPT_ADAPTER structure
* @i: index into the array * @i: index into the array
* *
* Returns the scsi_cmd pointer * retrieves and clears scmd entry from ScsiLookup[] array list
* *
* Returns the scsi_cmd pointer
**/ **/
static struct scsi_cmnd * static struct scsi_cmnd *
mptscsih_getclear_scsi_lookup(MPT_ADAPTER *ioc, int i) mptscsih_getclear_scsi_lookup(MPT_ADAPTER *ioc, int i)
......
...@@ -242,8 +242,7 @@ void pci_remove_rom(struct pci_dev *pdev) ...@@ -242,8 +242,7 @@ void pci_remove_rom(struct pci_dev *pdev)
#endif /* 0 */ #endif /* 0 */
/** /**
* pci_cleanup_rom - internal routine for freeing the ROM copy created * pci_cleanup_rom - free the ROM copy created by pci_map_rom_copy
* by pci_map_rom_copy called from remove.c
* @pdev: pointer to pci device struct * @pdev: pointer to pci device struct
* *
* Free the copied ROM if we allocated one. * Free the copied ROM if we allocated one.
......
...@@ -78,8 +78,7 @@ void rio_dev_put(struct rio_dev *rdev) ...@@ -78,8 +78,7 @@ void rio_dev_put(struct rio_dev *rdev)
} }
/** /**
* rio_device_probe - Tell if a RIO device structure has a matching RIO * rio_device_probe - Tell if a RIO device structure has a matching RIO device id structure
* device id structure
* @id: the RIO device id structure to match against * @id: the RIO device id structure to match against
* @dev: the RIO device structure to match against * @dev: the RIO device structure to match against
* *
...@@ -137,7 +136,7 @@ static int rio_device_remove(struct device *dev) ...@@ -137,7 +136,7 @@ static int rio_device_remove(struct device *dev)
* rio_register_driver - register a new RIO driver * rio_register_driver - register a new RIO driver
* @rdrv: the RIO driver structure to register * @rdrv: the RIO driver structure to register
* *
* Adds a &struct rio_driver to the list of registered drivers * Adds a &struct rio_driver to the list of registered drivers.
* Returns a negative value on error, otherwise 0. If no error * Returns a negative value on error, otherwise 0. If no error
* occurred, the driver remains registered even if no device * occurred, the driver remains registered even if no device
* was claimed during registration. * was claimed during registration.
...@@ -167,8 +166,7 @@ void rio_unregister_driver(struct rio_driver *rdrv) ...@@ -167,8 +166,7 @@ void rio_unregister_driver(struct rio_driver *rdrv)
} }
/** /**
* rio_match_bus - Tell if a RIO device structure has a matching RIO * rio_match_bus - Tell if a RIO device structure has a matching RIO driver device id structure
* driver device id structure
* @dev: the standard device structure to match against * @dev: the standard device structure to match against
* @drv: the standard driver structure containing the ids to match against * @drv: the standard driver structure containing the ids to match against
* *
......
...@@ -151,8 +151,8 @@ char *func_table[MAX_NR_FUNC] = { ...@@ -151,8 +151,8 @@ char *func_table[MAX_NR_FUNC] = {
}; };
struct kbdiacruc accent_table[MAX_DIACR] = { struct kbdiacruc accent_table[MAX_DIACR] = {
{'^', 'c', '\003'}, {'^', 'd', '\004'}, {'^', 'c', 0003}, {'^', 'd', 0004},
{'^', 'z', '\032'}, {'^', '\012', '\000'}, {'^', 'z', 0032}, {'^', 0012', 0000},
}; };
unsigned int accent_table_size = 4; unsigned int accent_table_size = 4;
...@@ -1577,8 +1577,7 @@ static void __scsi_scan_target(struct device *parent, unsigned int channel, ...@@ -1577,8 +1577,7 @@ static void __scsi_scan_target(struct device *parent, unsigned int channel,
} }
/** /**
* scsi_scan_target - scan a target id, possibly including all LUNs on the * scsi_scan_target - scan a target id, possibly including all LUNs on the target.
* target.
* @parent: host to scan * @parent: host to scan
* @channel: channel to scan * @channel: channel to scan
* @id: target id to scan * @id: target id to scan
......
...@@ -99,8 +99,7 @@ struct usb_interface *usb_ifnum_to_if(const struct usb_device *dev, ...@@ -99,8 +99,7 @@ struct usb_interface *usb_ifnum_to_if(const struct usb_device *dev,
EXPORT_SYMBOL_GPL(usb_ifnum_to_if); EXPORT_SYMBOL_GPL(usb_ifnum_to_if);
/** /**
* usb_altnum_to_altsetting - get the altsetting structure with a given * usb_altnum_to_altsetting - get the altsetting structure with a given alternate setting number.
* alternate setting number.
* @intf: the interface containing the altsetting in question * @intf: the interface containing the altsetting in question
* @altnum: the desired alternate setting number * @altnum: the desired alternate setting number
* *
...@@ -442,8 +441,7 @@ EXPORT_SYMBOL_GPL(usb_put_intf); ...@@ -442,8 +441,7 @@ EXPORT_SYMBOL_GPL(usb_put_intf);
*/ */
/** /**
* usb_lock_device_for_reset - cautiously acquire the lock for a * usb_lock_device_for_reset - cautiously acquire the lock for a usb device structure
* usb device structure
* @udev: device that's being locked * @udev: device that's being locked
* @iface: interface bound to the driver making the request (optional) * @iface: interface bound to the driver making the request (optional)
* *
......
...@@ -627,8 +627,7 @@ static int osync_buffers_list(spinlock_t *lock, struct list_head *list) ...@@ -627,8 +627,7 @@ static int osync_buffers_list(spinlock_t *lock, struct list_head *list)
} }
/** /**
* sync_mapping_buffers - write out and wait upon a mapping's "associated" * sync_mapping_buffers - write out & wait upon a mapping's "associated" buffers
* buffers
* @mapping: the mapping which wants those buffers written * @mapping: the mapping which wants those buffers written
* *
* Starts I/O against the buffers at mapping->private_list, and waits upon * Starts I/O against the buffers at mapping->private_list, and waits upon
......
...@@ -173,8 +173,15 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, ...@@ -173,8 +173,15 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
return NULL; return NULL;
if (write) { if (write) {
struct rlimit *rlim = current->signal->rlim;
unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start; unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start;
struct rlimit *rlim;
/*
* We've historically supported up to 32 pages (ARG_MAX)
* of argument strings even with small stacks
*/
if (size <= ARG_MAX)
return page;
/* /*
* Limit to 1/4-th the stack size for the argv+env strings. * Limit to 1/4-th the stack size for the argv+env strings.
...@@ -183,6 +190,7 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, ...@@ -183,6 +190,7 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
* - the program will have a reasonable amount of stack left * - the program will have a reasonable amount of stack left
* to work from. * to work from.
*/ */
rlim = current->signal->rlim;
if (size > rlim[RLIMIT_STACK].rlim_cur / 4) { if (size > rlim[RLIMIT_STACK].rlim_cur / 4) {
put_page(page); put_page(page);
return NULL; return NULL;
......
...@@ -369,7 +369,7 @@ int journal_extend(handle_t *handle, int nblocks) ...@@ -369,7 +369,7 @@ int journal_extend(handle_t *handle, int nblocks)
/** /**
* int journal_restart() - restart a handle . * int journal_restart() - restart a handle.
* @handle: handle to restart * @handle: handle to restart
* @nblocks: nr credits requested * @nblocks: nr credits requested
* *
...@@ -844,8 +844,7 @@ int journal_get_create_access(handle_t *handle, struct buffer_head *bh) ...@@ -844,8 +844,7 @@ int journal_get_create_access(handle_t *handle, struct buffer_head *bh)
} }
/** /**
* int journal_get_undo_access() - Notify intent to modify metadata with * int journal_get_undo_access() - Notify intent to modify metadata with non-rewindable consequences
* non-rewindable consequences
* @handle: transaction * @handle: transaction
* @bh: buffer to undo * @bh: buffer to undo
* @credits: store the number of taken credits here (if not NULL) * @credits: store the number of taken credits here (if not NULL)
...@@ -921,12 +920,14 @@ int journal_get_undo_access(handle_t *handle, struct buffer_head *bh) ...@@ -921,12 +920,14 @@ int journal_get_undo_access(handle_t *handle, struct buffer_head *bh)
} }
/** /**
* int journal_dirty_data() - mark a buffer as containing dirty data which * int journal_dirty_data() - mark a buffer as containing dirty data to be flushed
* needs to be flushed before we can commit the
* current transaction.
* @handle: transaction * @handle: transaction
* @bh: bufferhead to mark * @bh: bufferhead to mark
* *
* Description:
* Mark a buffer as containing dirty data which needs to be flushed before
* we can commit the current transaction.
*
* The buffer is placed on the transaction's data list and is marked as * The buffer is placed on the transaction's data list and is marked as
* belonging to the transaction. * belonging to the transaction.
* *
...@@ -1102,7 +1103,7 @@ int journal_dirty_data(handle_t *handle, struct buffer_head *bh) ...@@ -1102,7 +1103,7 @@ int journal_dirty_data(handle_t *handle, struct buffer_head *bh)
* @handle: transaction to add buffer to. * @handle: transaction to add buffer to.
* @bh: buffer to mark * @bh: buffer to mark
* *
* mark dirty metadata which needs to be journaled as part of the current * Mark dirty metadata which needs to be journaled as part of the current
* transaction. * transaction.
* *
* The buffer is placed on the transaction's metadata list and is marked * The buffer is placed on the transaction's metadata list and is marked
......
...@@ -325,16 +325,12 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages, ...@@ -325,16 +325,12 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages,
} }
/** /**
* mpage_readpages - populate an address space with some pages, and * mpage_readpages - populate an address space with some pages & start reads against them
* start reads against them.
*
* @mapping: the address_space * @mapping: the address_space
* @pages: The address of a list_head which contains the target pages. These * @pages: The address of a list_head which contains the target pages. These
* pages have their ->index populated and are otherwise uninitialised. * pages have their ->index populated and are otherwise uninitialised.
*
* The page at @pages->prev has the lowest file offset, and reads should be * The page at @pages->prev has the lowest file offset, and reads should be
* issued in @pages->prev to @pages->next order. * issued in @pages->prev to @pages->next order.
*
* @nr_pages: The number of pages at *@pages * @nr_pages: The number of pages at *@pages
* @get_block: The filesystem's block mapper function. * @get_block: The filesystem's block mapper function.
* *
...@@ -360,6 +356,7 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages, ...@@ -360,6 +356,7 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages,
* So an mpage read of the first 16 blocks of an ext2 file will cause I/O to be * So an mpage read of the first 16 blocks of an ext2 file will cause I/O to be
* submitted in the following order: * submitted in the following order:
* 12 0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 * 12 0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16
*
* because the indirect block has to be read to get the mappings of blocks * because the indirect block has to be read to get the mappings of blocks
* 13,14,15,16. Obviously, this impacts performance. * 13,14,15,16. Obviously, this impacts performance.
* *
...@@ -656,9 +653,7 @@ static int __mpage_writepage(struct page *page, struct writeback_control *wbc, ...@@ -656,9 +653,7 @@ static int __mpage_writepage(struct page *page, struct writeback_control *wbc,
} }
/** /**
* mpage_writepages - walk the list of dirty pages of the given * mpage_writepages - walk the list of dirty pages of the given address space & writepage() all of them
* address space and writepage() all of them.
*
* @mapping: address space structure to write * @mapping: address space structure to write
* @wbc: subtract the number of written pages from *@wbc->nr_to_write * @wbc: subtract the number of written pages from *@wbc->nr_to_write
* @get_block: the filesystem's block mapper function. * @get_block: the filesystem's block mapper function.
......
...@@ -153,6 +153,9 @@ ...@@ -153,6 +153,9 @@
#define CTRL_RUNLATCH 0x1 #define CTRL_RUNLATCH 0x1
#define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */ #define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */
#define DABR_TRANSLATION (1UL << 2) #define DABR_TRANSLATION (1UL << 2)
#define SPRN_DABRX 0x3F7 /* Data Address Breakpoint Register Extension */
#define DABRX_USER (1UL << 0)
#define DABRX_KERNEL (1UL << 1)
#define SPRN_DAR 0x013 /* Data Address Register */ #define SPRN_DAR 0x013 /* Data Address Register */
#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ #define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */
#define DSISR_NOHPTE 0x40000000 /* no translation found */ #define DSISR_NOHPTE 0x40000000 /* no translation found */
......
...@@ -91,9 +91,7 @@ extern unsigned long pg0[]; ...@@ -91,9 +91,7 @@ extern unsigned long pg0[];
/* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */
#define pmd_none(x) (!(unsigned long)pmd_val(x)) #define pmd_none(x) (!(unsigned long)pmd_val(x))
#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
#define pmd_bad(x) ((pmd_val(x) \ #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
& ~(PAGE_MASK | _PAGE_USER | _PAGE_PSE | _PAGE_NX)) \
!= _KERNPG_TABLE)
#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
......
...@@ -153,14 +153,12 @@ static inline unsigned long pgd_bad(pgd_t pgd) ...@@ -153,14 +153,12 @@ static inline unsigned long pgd_bad(pgd_t pgd)
static inline unsigned long pud_bad(pud_t pud) static inline unsigned long pud_bad(pud_t pud)
{ {
return pud_val(pud) & return pud_val(pud) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER);
~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER | _PAGE_PSE | _PAGE_NX);
} }
static inline unsigned long pmd_bad(pmd_t pmd) static inline unsigned long pmd_bad(pmd_t pmd)
{ {
return pmd_val(pmd) & return pmd_val(pmd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER);
~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER | _PAGE_PSE | _PAGE_NX);
} }
#define pte_none(x) (!pte_val(x)) #define pte_none(x) (!pte_val(x))
......
...@@ -64,10 +64,7 @@ struct page { ...@@ -64,10 +64,7 @@ struct page {
#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
spinlock_t ptl; spinlock_t ptl;
#endif #endif
struct {
struct kmem_cache *slab; /* SLUB: Pointer to slab */ struct kmem_cache *slab; /* SLUB: Pointer to slab */
void *end; /* SLUB: end marker */
};
struct page *first_page; /* Compound tail pages */ struct page *first_page; /* Compound tail pages */
}; };
union { union {
......
...@@ -61,7 +61,7 @@ struct kmem_cache { ...@@ -61,7 +61,7 @@ struct kmem_cache {
int size; /* The size of an object including meta data */ int size; /* The size of an object including meta data */
int objsize; /* The size of an object without meta data */ int objsize; /* The size of an object without meta data */
int offset; /* Free pointer offset. */ int offset; /* Free pointer offset. */
int order; int order; /* Current preferred allocation order */
/* /*
* Avoid an extra cache line for UP, SMP and for the node local to * Avoid an extra cache line for UP, SMP and for the node local to
...@@ -138,11 +138,11 @@ static __always_inline int kmalloc_index(size_t size) ...@@ -138,11 +138,11 @@ static __always_inline int kmalloc_index(size_t size)
if (size <= 512) return 9; if (size <= 512) return 9;
if (size <= 1024) return 10; if (size <= 1024) return 10;
if (size <= 2 * 1024) return 11; if (size <= 2 * 1024) return 11;
if (size <= 4 * 1024) return 12;
/* /*
* The following is only needed to support architectures with a larger page * The following is only needed to support architectures with a larger page
* size than 4k. * size than 4k.
*/ */
if (size <= 4 * 1024) return 12;
if (size <= 8 * 1024) return 13; if (size <= 8 * 1024) return 13;
if (size <= 16 * 1024) return 14; if (size <= 16 * 1024) return 14;
if (size <= 32 * 1024) return 15; if (size <= 32 * 1024) return 15;
......
...@@ -781,8 +781,7 @@ static inline int usb_endpoint_is_isoc_out( ...@@ -781,8 +781,7 @@ static inline int usb_endpoint_is_isoc_out(
.idVendor = (vend), \ .idVendor = (vend), \
.idProduct = (prod) .idProduct = (prod)
/** /**
* USB_DEVICE_VER - macro used to describe a specific usb device with a * USB_DEVICE_VER - describe a specific usb device with a version range
* version range
* @vend: the 16 bit USB Vendor ID * @vend: the 16 bit USB Vendor ID
* @prod: the 16 bit USB Product ID * @prod: the 16 bit USB Product ID
* @lo: the bcdDevice_lo value * @lo: the bcdDevice_lo value
...@@ -799,8 +798,7 @@ static inline int usb_endpoint_is_isoc_out( ...@@ -799,8 +798,7 @@ static inline int usb_endpoint_is_isoc_out(
.bcdDevice_hi = (hi) .bcdDevice_hi = (hi)
/** /**
* USB_DEVICE_INTERFACE_PROTOCOL - macro used to describe a usb * USB_DEVICE_INTERFACE_PROTOCOL - describe a usb device with a specific interface protocol
* device with a specific interface protocol
* @vend: the 16 bit USB Vendor ID * @vend: the 16 bit USB Vendor ID
* @prod: the 16 bit USB Product ID * @prod: the 16 bit USB Product ID
* @pr: bInterfaceProtocol value * @pr: bInterfaceProtocol value
...@@ -846,8 +844,7 @@ static inline int usb_endpoint_is_isoc_out( ...@@ -846,8 +844,7 @@ static inline int usb_endpoint_is_isoc_out(
.bInterfaceProtocol = (pr) .bInterfaceProtocol = (pr)
/** /**
* USB_DEVICE_AND_INTERFACE_INFO - macro used to describe a specific usb device * USB_DEVICE_AND_INTERFACE_INFO - describe a specific usb device with a class of usb interfaces
* with a class of usb interfaces
* @vend: the 16 bit USB Vendor ID * @vend: the 16 bit USB Vendor ID
* @prod: the 16 bit USB Product ID * @prod: the 16 bit USB Product ID
* @cl: bInterfaceClass value * @cl: bInterfaceClass value
......
...@@ -214,20 +214,19 @@ struct pid *session_of_pgrp(struct pid *pgrp) ...@@ -214,20 +214,19 @@ struct pid *session_of_pgrp(struct pid *pgrp)
static int will_become_orphaned_pgrp(struct pid *pgrp, struct task_struct *ignored_task) static int will_become_orphaned_pgrp(struct pid *pgrp, struct task_struct *ignored_task)
{ {
struct task_struct *p; struct task_struct *p;
int ret = 1;
do_each_pid_task(pgrp, PIDTYPE_PGID, p) { do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
if (p == ignored_task if ((p == ignored_task) ||
|| p->exit_state (p->exit_state && thread_group_empty(p)) ||
|| is_global_init(p->real_parent)) is_global_init(p->real_parent))
continue; continue;
if (task_pgrp(p->real_parent) != pgrp && if (task_pgrp(p->real_parent) != pgrp &&
task_session(p->real_parent) == task_session(p)) { task_session(p->real_parent) == task_session(p))
ret = 0; return 0;
break;
}
} while_each_pid_task(pgrp, PIDTYPE_PGID, p); } while_each_pid_task(pgrp, PIDTYPE_PGID, p);
return ret; /* (sighing) "Often!" */
return 1;
} }
int is_current_pgrp_orphaned(void) int is_current_pgrp_orphaned(void)
...@@ -255,6 +254,37 @@ static int has_stopped_jobs(struct pid *pgrp) ...@@ -255,6 +254,37 @@ static int has_stopped_jobs(struct pid *pgrp)
return retval; return retval;
} }
/*
* Check to see if any process groups have become orphaned as
* a result of our exiting, and if they have any stopped jobs,
* send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*/
static void
kill_orphaned_pgrp(struct task_struct *tsk, struct task_struct *parent)
{
struct pid *pgrp = task_pgrp(tsk);
struct task_struct *ignored_task = tsk;
if (!parent)
/* exit: our father is in a different pgrp than
* we are and we were the only connection outside.
*/
parent = tsk->real_parent;
else
/* reparent: our child is in a different pgrp than
* we are, and it was the only connection outside.
*/
ignored_task = NULL;
if (task_pgrp(parent) != pgrp &&
task_session(parent) == task_session(tsk) &&
will_become_orphaned_pgrp(pgrp, ignored_task) &&
has_stopped_jobs(pgrp)) {
__kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp);
__kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp);
}
}
/** /**
* reparent_to_kthreadd - Reparent the calling kernel thread to kthreadd * reparent_to_kthreadd - Reparent the calling kernel thread to kthreadd
* *
...@@ -635,22 +665,7 @@ reparent_thread(struct task_struct *p, struct task_struct *father, int traced) ...@@ -635,22 +665,7 @@ reparent_thread(struct task_struct *p, struct task_struct *father, int traced)
p->exit_signal != -1 && thread_group_empty(p)) p->exit_signal != -1 && thread_group_empty(p))
do_notify_parent(p, p->exit_signal); do_notify_parent(p, p->exit_signal);
/* kill_orphaned_pgrp(p, father);
* process group orphan check
* Case ii: Our child is in a different pgrp
* than we are, and it was the only connection
* outside, so the child pgrp is now orphaned.
*/
if ((task_pgrp(p) != task_pgrp(father)) &&
(task_session(p) == task_session(father))) {
struct pid *pgrp = task_pgrp(p);
if (will_become_orphaned_pgrp(pgrp, NULL) &&
has_stopped_jobs(pgrp)) {
__kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp);
__kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp);
}
}
} }
/* /*
...@@ -735,11 +750,9 @@ static void forget_original_parent(struct task_struct *father) ...@@ -735,11 +750,9 @@ static void forget_original_parent(struct task_struct *father)
* Send signals to all our closest relatives so that they know * Send signals to all our closest relatives so that they know
* to properly mourn us.. * to properly mourn us..
*/ */
static void exit_notify(struct task_struct *tsk) static void exit_notify(struct task_struct *tsk, int group_dead)
{ {
int state; int state;
struct task_struct *t;
struct pid *pgrp;
/* /*
* This does two things: * This does two things:
...@@ -753,25 +766,8 @@ static void exit_notify(struct task_struct *tsk) ...@@ -753,25 +766,8 @@ static void exit_notify(struct task_struct *tsk)
exit_task_namespaces(tsk); exit_task_namespaces(tsk);
write_lock_irq(&tasklist_lock); write_lock_irq(&tasklist_lock);
/* if (group_dead)
* Check to see if any process groups have become orphaned kill_orphaned_pgrp(tsk->group_leader, NULL);
* as a result of our exiting, and if they have any stopped
* jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*
* Case i: Our father is in a different pgrp than we are
* and we were the only connection outside, so our pgrp
* is about to become orphaned.
*/
t = tsk->real_parent;
pgrp = task_pgrp(tsk);
if ((task_pgrp(t) != pgrp) &&
(task_session(t) == task_session(tsk)) &&
will_become_orphaned_pgrp(pgrp, tsk) &&
has_stopped_jobs(pgrp)) {
__kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp);
__kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp);
}
/* Let father know we died /* Let father know we died
* *
...@@ -788,7 +784,7 @@ static void exit_notify(struct task_struct *tsk) ...@@ -788,7 +784,7 @@ static void exit_notify(struct task_struct *tsk)
* the same after a fork. * the same after a fork.
*/ */
if (tsk->exit_signal != SIGCHLD && tsk->exit_signal != -1 && if (tsk->exit_signal != SIGCHLD && tsk->exit_signal != -1 &&
( tsk->parent_exec_id != t->self_exec_id || (tsk->parent_exec_id != tsk->real_parent->self_exec_id ||
tsk->self_exec_id != tsk->parent_exec_id) tsk->self_exec_id != tsk->parent_exec_id)
&& !capable(CAP_KILL)) && !capable(CAP_KILL))
tsk->exit_signal = SIGCHLD; tsk->exit_signal = SIGCHLD;
...@@ -986,7 +982,7 @@ NORET_TYPE void do_exit(long code) ...@@ -986,7 +982,7 @@ NORET_TYPE void do_exit(long code)
module_put(tsk->binfmt->module); module_put(tsk->binfmt->module);
proc_exit_connector(tsk); proc_exit_connector(tsk);
exit_notify(tsk); exit_notify(tsk, group_dead);
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
mpol_free(tsk->mempolicy); mpol_free(tsk->mempolicy);
tsk->mempolicy = NULL; tsk->mempolicy = NULL;
......
This diff is collapsed.
...@@ -134,8 +134,7 @@ invalidate_complete_page(struct address_space *mapping, struct page *page) ...@@ -134,8 +134,7 @@ invalidate_complete_page(struct address_space *mapping, struct page *page)
} }
/** /**
* truncate_inode_pages - truncate range of pages specified by start and * truncate_inode_pages - truncate range of pages specified by start & end byte offsets
* end byte offsets
* @mapping: mapping to truncate * @mapping: mapping to truncate
* @lstart: offset from which to truncate * @lstart: offset from which to truncate
* @lend: offset to which to truncate * @lend: offset to which to truncate
......
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