Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98792
b: refs/heads/master
c: dbb018c
h: refs/heads/master
v: v3
  • Loading branch information
Darren Jenkins authored and Herbert Xu committed Jul 8, 2008
1 parent ed06708 commit b476033
Show file tree
Hide file tree
Showing 18 changed files with 92 additions and 115 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7683c57c489bd17795945f4ae1c1d73e7c7b38e3
refs/heads/master: dbb018cd8a0fd073eaabf9de5a93f62d98bd7723
6 changes: 3 additions & 3 deletions trunk/arch/mips/mm/c-r3k.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
static unsigned long icache_size, dcache_size; /* Size in bytes */
static unsigned long icache_lsize, dcache_lsize; /* Size in bytes */

unsigned long __cpuinit r3k_cache_size(unsigned long ca_flags)
unsigned long __init r3k_cache_size(unsigned long ca_flags)
{
unsigned long flags, status, dummy, size;
volatile unsigned long *p;
Expand Down Expand Up @@ -61,7 +61,7 @@ unsigned long __cpuinit r3k_cache_size(unsigned long ca_flags)
return size * sizeof(*p);
}

unsigned long __cpuinit r3k_cache_lsize(unsigned long ca_flags)
unsigned long __init r3k_cache_lsize(unsigned long ca_flags)
{
unsigned long flags, status, lsize, i;
volatile unsigned long *p;
Expand Down Expand Up @@ -90,7 +90,7 @@ unsigned long __cpuinit r3k_cache_lsize(unsigned long ca_flags)
return lsize * sizeof(*p);
}

static void __cpuinit r3k_probe_cache(void)
static void __init r3k_probe_cache(void)
{
dcache_size = r3k_cache_size(ST0_ISC);
if (dcache_size)
Expand Down
61 changes: 29 additions & 32 deletions trunk/arch/mips/mm/page.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,13 @@ static void __cpuinit set_prefetch_parameters(void)
}
/*
* Too much unrolling will overflow the available space in
* clear_space_array / copy_page_array.
* clear_space_array / copy_page_array. 8 words sounds generous,
* but a R4000 with 128 byte L2 line length can exceed even that.
*/
half_clear_loop_size = min(16 * clear_word_size,
half_clear_loop_size = min(8 * clear_word_size,
max(cache_line_size >> 1,
4 * clear_word_size));
half_copy_loop_size = min(16 * copy_word_size,
half_copy_loop_size = min(8 * copy_word_size,
max(cache_line_size >> 1,
4 * copy_word_size));
}
Expand All @@ -262,23 +263,21 @@ static inline void __cpuinit build_clear_pref(u32 **buf, int off)
if (pref_bias_clear_store) {
uasm_i_pref(buf, pref_dst_mode, pref_bias_clear_store + off,
A0);
} else if (cache_line_size == (half_clear_loop_size << 1)) {
if (cpu_has_cache_cdex_s) {
uasm_i_cache(buf, Create_Dirty_Excl_SD, off, A0);
} else if (cpu_has_cache_cdex_p) {
if (R4600_V1_HIT_CACHEOP_WAR && cpu_is_r4600_v1_x()) {
uasm_i_nop(buf);
uasm_i_nop(buf);
uasm_i_nop(buf);
uasm_i_nop(buf);
}
} else if (cpu_has_cache_cdex_s) {
uasm_i_cache(buf, Create_Dirty_Excl_SD, off, A0);
} else if (cpu_has_cache_cdex_p) {
if (R4600_V1_HIT_CACHEOP_WAR && cpu_is_r4600_v1_x()) {
uasm_i_nop(buf);
uasm_i_nop(buf);
uasm_i_nop(buf);
uasm_i_nop(buf);
}

if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
uasm_i_lw(buf, ZERO, ZERO, AT);
if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
uasm_i_lw(buf, ZERO, ZERO, AT);

uasm_i_cache(buf, Create_Dirty_Excl_D, off, A0);
}
}
uasm_i_cache(buf, Create_Dirty_Excl_D, off, A0);
}
}

void __cpuinit build_clear_page(void)
Expand Down Expand Up @@ -404,22 +403,20 @@ static inline void build_copy_store_pref(u32 **buf, int off)
if (pref_bias_copy_store) {
uasm_i_pref(buf, pref_dst_mode, pref_bias_copy_store + off,
A0);
} else if (cache_line_size == (half_copy_loop_size << 1)) {
if (cpu_has_cache_cdex_s) {
uasm_i_cache(buf, Create_Dirty_Excl_SD, off, A0);
} else if (cpu_has_cache_cdex_p) {
if (R4600_V1_HIT_CACHEOP_WAR && cpu_is_r4600_v1_x()) {
uasm_i_nop(buf);
uasm_i_nop(buf);
uasm_i_nop(buf);
uasm_i_nop(buf);
}
} else if (cpu_has_cache_cdex_s) {
uasm_i_cache(buf, Create_Dirty_Excl_SD, off, A0);
} else if (cpu_has_cache_cdex_p) {
if (R4600_V1_HIT_CACHEOP_WAR && cpu_is_r4600_v1_x()) {
uasm_i_nop(buf);
uasm_i_nop(buf);
uasm_i_nop(buf);
uasm_i_nop(buf);
}

if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
uasm_i_lw(buf, ZERO, ZERO, AT);
if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
uasm_i_lw(buf, ZERO, ZERO, AT);

uasm_i_cache(buf, Create_Dirty_Excl_D, off, A0);
}
uasm_i_cache(buf, Create_Dirty_Excl_D, off, A0);
}
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/mips/mm/sc-rm7k.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static void rm7k_sc_inv(unsigned long addr, unsigned long size)
/*
* This function is executed in uncached address space.
*/
static __cpuinit void __rm7k_sc_enable(void)
static __init void __rm7k_sc_enable(void)
{
int i;

Expand All @@ -107,7 +107,7 @@ static __cpuinit void __rm7k_sc_enable(void)
}
}

static __cpuinit void rm7k_sc_enable(void)
static __init void rm7k_sc_enable(void)
{
if (read_c0_config() & RM7K_CONF_SE)
return;
Expand Down
10 changes: 1 addition & 9 deletions trunk/crypto/tcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,12 +586,6 @@ static void test_cipher(char *algo, int enc,
j = 0;
for (i = 0; i < tcount; i++) {

data = kzalloc(template[i].ilen, GFP_KERNEL);
if (!data)
continue;

memcpy(data, template[i].input, template[i].ilen);

if (template[i].iv)
memcpy(iv, template[i].iv, MAX_IVLEN);
else
Expand All @@ -613,10 +607,8 @@ static void test_cipher(char *algo, int enc,
printk("setkey() failed flags=%x\n",
crypto_ablkcipher_get_flags(tfm));

if (!template[i].fail) {
kfree(data);
if (!template[i].fail)
goto out;
}
}

temp = 0;
Expand Down
38 changes: 20 additions & 18 deletions trunk/drivers/ide/arm/palm_bk3710.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct palm_bk3710_udmatiming {

#include "../ide-timing.h"

static unsigned ideclk_period; /* in nanoseconds */
static long ide_palm_clk;

static const struct palm_bk3710_udmatiming palm_bk3710_udmatimings[6] = {
{160, 240}, /* UDMA Mode 0 */
Expand All @@ -86,6 +86,8 @@ static const struct palm_bk3710_udmatiming palm_bk3710_udmatimings[6] = {
{85, 60}, /* UDMA Mode 4 */
};

static struct clk *ideclkp;

static void palm_bk3710_setudmamode(void __iomem *base, unsigned int dev,
unsigned int mode)
{
Expand All @@ -95,10 +97,10 @@ static void palm_bk3710_setudmamode(void __iomem *base, unsigned int dev,

/* DMA Data Setup */
t0 = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].cycletime,
ideclk_period) - 1;
tenv = DIV_ROUND_UP(20, ideclk_period) - 1;
ide_palm_clk) - 1;
tenv = DIV_ROUND_UP(20, ide_palm_clk) - 1;
trp = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].rptime,
ideclk_period) - 1;
ide_palm_clk) - 1;

/* udmatim Register */
val16 = readw(base + BK3710_UDMATIM) & (dev ? 0xFF0F : 0xFFF0);
Expand Down Expand Up @@ -139,8 +141,8 @@ static void palm_bk3710_setdmamode(void __iomem *base, unsigned int dev,
cycletime = max_t(int, t->cycle, min_cycle);

/* DMA Data Setup */
t0 = DIV_ROUND_UP(cycletime, ideclk_period);
td = DIV_ROUND_UP(t->active, ideclk_period);
t0 = DIV_ROUND_UP(cycletime, ide_palm_clk);
td = DIV_ROUND_UP(t->active, ide_palm_clk);
tkw = t0 - td - 1;
td -= 1;

Expand All @@ -166,9 +168,9 @@ static void palm_bk3710_setpiomode(void __iomem *base, ide_drive_t *mate,
struct ide_timing *t;

/* PIO Data Setup */
t0 = DIV_ROUND_UP(cycletime, ideclk_period);
t0 = DIV_ROUND_UP(cycletime, ide_palm_clk);
t2 = DIV_ROUND_UP(ide_timing_find_mode(XFER_PIO_0 + mode)->active,
ideclk_period);
ide_palm_clk);

t2i = t0 - t2 - 1;
t2 -= 1;
Expand All @@ -190,8 +192,8 @@ static void palm_bk3710_setpiomode(void __iomem *base, ide_drive_t *mate,

/* TASKFILE Setup */
t = ide_timing_find_mode(XFER_PIO_0 + mode);
t0 = DIV_ROUND_UP(t->cyc8b, ideclk_period);
t2 = DIV_ROUND_UP(t->act8b, ideclk_period);
t0 = DIV_ROUND_UP(t->cyc8b, ide_palm_clk);
t2 = DIV_ROUND_UP(t->act8b, ide_palm_clk);

t2i = t0 - t2 - 1;
t2 -= 1;
Expand Down Expand Up @@ -348,22 +350,22 @@ static const struct ide_port_info __devinitdata palm_bk3710_port_info = {

static int __devinit palm_bk3710_probe(struct platform_device *pdev)
{
struct clk *clk;
struct clk *clkp;
struct resource *mem, *irq;
ide_hwif_t *hwif;
unsigned long base, rate;
unsigned long base;
int i;
hw_regs_t hw;
u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };

clk = clk_get(NULL, "IDECLK");
if (IS_ERR(clk))
clkp = clk_get(NULL, "IDECLK");
if (IS_ERR(clkp))
return -ENODEV;

clk_enable(clk);
rate = clk_get_rate(clk);
ideclk_period = 1000000000UL / rate;

ideclkp = clkp;
clk_enable(ideclkp);
ide_palm_clk = clk_get_rate(ideclkp)/100000;
ide_palm_clk = (10000/ide_palm_clk) + 1;
/* Register the IDE interface with Linux ATA Interface */
memset(&hw, 0, sizeof(hw));

Expand Down
8 changes: 6 additions & 2 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1218,12 +1218,16 @@ static void drive_release_dev (struct device *dev)
complete(&drive->gendev_rel_comp);
}

#ifndef ide_default_irq
#define ide_default_irq(irq) 0
#endif

static int hwif_init(ide_hwif_t *hwif)
{
int old_irq;

if (!hwif->irq) {
hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
hwif->irq = ide_default_irq(hwif->io_ports.data_addr);
if (!hwif->irq) {
printk("%s: DISABLED, NO IRQ\n", hwif->name);
return 0;
Expand Down Expand Up @@ -1253,7 +1257,7 @@ static int hwif_init(ide_hwif_t *hwif)
* It failed to initialise. Find the default IRQ for
* this port and try that.
*/
hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
hwif->irq = ide_default_irq(hwif->io_ports.data_addr);
if (!hwif->irq) {
printk("%s: Disabled unable to get IRQ %d.\n",
hwif->name, old_irq);
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/ide/pci/it8213.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ static const struct ide_port_info it8213_chipsets[] __devinitdata = {

static int __devinit it8213_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
return ide_setup_pci_device(dev, &it8213_chipsets[id->driver_data]);
ide_setup_pci_device(dev, &it8213_chipsets[id->driver_data]);
return 0;
}

static const struct pci_device_id it8213_pci_tbl[] = {
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/ide/pci/ns87415.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ static int ns87415_dma_setup(ide_drive_t *drive)
return 1;
}

#ifndef ide_default_irq
#define ide_default_irq(irq) 0
#endif

static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)
{
struct pci_dev *dev = to_pci_dev(hwif->dev);
Expand Down Expand Up @@ -284,7 +288,7 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)
}

if (!using_inta)
hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
hwif->irq = ide_default_irq(hwif->io_ports.data_addr);
else if (!hwif->irq && hwif->mate && hwif->mate->irq)
hwif->irq = hwif->mate->irq; /* share IRQ with mate */

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/video/fsl-diu-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ static int fsl_diu_suspend(struct of_device *ofdev, pm_message_t state)
{
struct fsl_diu_data *machine_data;

machine_data = dev_get_drvdata(&ofdev->dev);
machine_data = dev_get_drvdata(&dev->dev);
disable_lcdc(machine_data->fsl_diu_info[0]);

return 0;
Expand All @@ -1334,7 +1334,7 @@ static int fsl_diu_resume(struct of_device *ofdev)
{
struct fsl_diu_data *machine_data;

machine_data = dev_get_drvdata(&ofdev->dev);
machine_data = dev_get_drvdata(&dev->dev);
enable_lcdc(machine_data->fsl_diu_info[0]);

return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page)
* Note: assumes we have exclusive access to this mapping either
* through inode->i_mutex or some other mechanism.
*/
if (invalidate_inode_pages2_range(inode->i_mapping, page->index + 1, -1) < 0) {
if (page->index == 0 && invalidate_inode_pages2_range(inode->i_mapping, PAGE_CACHE_SIZE, -1) < 0) {
/* Should never happen */
nfs_zap_mapping(inode, inode->i_mapping);
}
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/reiserfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ void reiserfs_delete_inode(struct inode *inode)
goto out;
reiserfs_update_inode_transaction(inode);

reiserfs_discard_prealloc(&th, inode);

err = reiserfs_delete_object(&th, inode);

/* Do quota update inside a transaction for journaled quotas. We must do that
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/asm-powerpc/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ static inline pte_t huge_pte_wrprotect(pte_t pte)
return pte_wrprotect(pte);
}

static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
unsigned long addr, pte_t *ptep)
{
ptep_set_wrprotect(mm, addr, ptep);
}

static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep,
pte_t pte, int dirty)
Expand Down
10 changes: 0 additions & 10 deletions trunk/include/asm-powerpc/pgtable-ppc64.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,16 +314,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
old = pte_update(mm, addr, ptep, _PAGE_RW, 0);
}

static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
unsigned long addr, pte_t *ptep)
{
unsigned long old;

if ((pte_val(*ptep) & _PAGE_RW) == 0)
return;
old = pte_update(mm, addr, ptep, _PAGE_RW, 1);
}

/*
* We currently remove entries from the hashtable regardless of whether
* the entry was young or dirty. The generic routines only flush if the
Expand Down
Loading

0 comments on commit b476033

Please sign in to comment.