Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110024
b: refs/heads/master
c: 4ebb52d
h: refs/heads/master
v: v3
  • Loading branch information
Uwe Kleine-Koenig authored and Jean Delvare committed Sep 24, 2008
1 parent 1794f8a commit fd8d79f
Show file tree
Hide file tree
Showing 18 changed files with 119 additions and 259 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: c0f4d6d4b14a75a341d972ff73fb9740e1ceb634
refs/heads/master: 4ebb52d34fac2904e541ccfa8e32126db836fa92
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-pxa/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
#include <linux/interrupt.h>
#include <linux/clockchips.h>
#include <linux/sched.h>
#include <linux/cnt32_to_63.h>

#include <asm/div64.h>
#include <asm/cnt32_to_63.h>
#include <asm/mach/irq.h>
#include <asm/mach/time.h>
#include <mach/pxa-regs.h>
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-sa1100/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <linux/ioport.h>
#include <linux/sched.h> /* just for sched_clock() - funny that */
#include <linux/platform_device.h>
#include <linux/cnt32_to_63.h>

#include <asm/div64.h>
#include <asm/cnt32_to_63.h>
#include <mach/hardware.h>
#include <asm/system.h>
#include <asm/pgtable.h>
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-versatile/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
#include <linux/amba/clcd.h>
#include <linux/clocksource.h>
#include <linux/clockchips.h>
#include <linux/cnt32_to_63.h>

#include <asm/cnt32_to_63.h>
#include <asm/system.h>
#include <mach/hardware.h>
#include <asm/io.h>
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/mips/au1000/common/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ static int au1xxx_gpio2_direction_input(unsigned gpio)
static int au1xxx_gpio2_direction_output(unsigned gpio, int value)
{
gpio -= AU1XXX_GPIO_BASE;
gpio2->dir |= 0x01 << gpio;
gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << gpio) | (value << gpio);
gpio2->dir = (0x01 << gpio) | (value << gpio);
return 0;
}

Expand Down Expand Up @@ -91,7 +90,6 @@ static int au1xxx_gpio1_direction_input(unsigned gpio)
static int au1xxx_gpio1_direction_output(unsigned gpio, int value)
{
gpio1->trioutclr = (0x01 & gpio);
au1xxx_gpio1_write(gpio, value);
return 0;
}

Expand Down
52 changes: 11 additions & 41 deletions trunk/arch/mn10300/kernel/time.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* MN10300 Low level time management
*
* Copyright (C) 2007-2008 Red Hat, Inc. All Rights Reserved.
* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
* Written by David Howells (dhowells@redhat.com)
* - Derived from arch/i386/kernel/time.c
*
Expand All @@ -16,7 +16,6 @@
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/profile.h>
#include <linux/cnt32_to_63.h>
#include <asm/irq.h>
#include <asm/div64.h>
#include <asm/processor.h>
Expand All @@ -41,54 +40,27 @@ static struct irqaction timer_irq = {
.name = "timer",
};

static unsigned long sched_clock_multiplier;

/*
* scheduler clock - returns current time in nanosec units.
*/
unsigned long long sched_clock(void)
{
union {
unsigned long long ll;
unsigned l[2];
} tsc64, result;
unsigned long tsc, tmp;
unsigned product[3]; /* 96-bit intermediate value */

/* read the TSC value
*/
tsc = 0 - get_cycles(); /* get_cycles() counts down */
unsigned long long l;
u32 w[2];
} quot;

/* expand to 64-bits.
* - sched_clock() must be called once a minute or better or the
* following will go horribly wrong - see cnt32_to_63()
*/
tsc64.ll = cnt32_to_63(tsc) & 0x7fffffffffffffffULL;
quot.w[0] = mn10300_last_tsc - get_cycles();
quot.w[1] = 1000000000;

/* scale the 64-bit TSC value to a nanosecond value via a 96-bit
* intermediate
*/
asm("mulu %2,%0,%3,%0 \n" /* LSW * mult -> 0:%3:%0 */
"mulu %2,%1,%2,%1 \n" /* MSW * mult -> %2:%1:0 */
"add %3,%1 \n"
"addc 0,%2 \n" /* result in %2:%1:%0 */
: "=r"(product[0]), "=r"(product[1]), "=r"(product[2]), "=r"(tmp)
: "0"(tsc64.l[0]), "1"(tsc64.l[1]), "2"(sched_clock_multiplier)
asm("mulu %2,%3,%0,%1"
: "=r"(quot.w[1]), "=r"(quot.w[0])
: "0"(quot.w[1]), "1"(quot.w[0])
: "cc");

result.l[0] = product[1] << 16 | product[0] >> 16;
result.l[1] = product[2] << 16 | product[1] >> 16;
do_div(quot.l, MN10300_TSCCLK);

return result.ll;
}

/*
* initialise the scheduler clock
*/
static void __init mn10300_sched_clock_init(void)
{
sched_clock_multiplier =
__muldiv64u(NSEC_PER_SEC, 1 << 16, MN10300_TSCCLK);
return quot.l;
}

/*
Expand Down Expand Up @@ -156,6 +128,4 @@ void __init time_init(void)
/* start the watchdog timer */
watchdog_go();
#endif

mn10300_sched_clock_init();
}
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
#include <asm/tlbflush.h>
#include <asm/cpu.h>
#include <asm/kdebug.h>
#include <asm/idle.h>

asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/i2c/busses/i2c-powermac.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static const struct i2c_algorithm i2c_powermac_algorithm = {
};


static int i2c_powermac_remove(struct platform_device *dev)
static int __devexit i2c_powermac_remove(struct platform_device *dev)
{
struct i2c_adapter *adapter = platform_get_drvdata(dev);
struct pmac_i2c_bus *bus = i2c_get_adapdata(adapter);
Expand All @@ -200,7 +200,7 @@ static int i2c_powermac_remove(struct platform_device *dev)
}


static int __devexit i2c_powermac_probe(struct platform_device *dev)
static int __devinit i2c_powermac_probe(struct platform_device *dev)
{
struct pmac_i2c_bus *bus = dev->dev.platform_data;
struct device_node *parent = NULL;
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,8 @@ static struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
return NULL;

error:
p9_client_clunk(fid);
if (fid)
p9_client_clunk(fid);

return ERR_PTR(result);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-mips/pgtable-32.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
#define PMD_ORDER 1
#define PTE_ORDER 0

#define PTRS_PER_PGD (USER_PTRS_PER_PGD * 2)
#define PTRS_PER_PGD ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t))
#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t))

#define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE)
Expand Down
80 changes: 0 additions & 80 deletions trunk/include/linux/cnt32_to_63.h

This file was deleted.

1 change: 0 additions & 1 deletion trunk/include/net/9p/9p.h
Original file line number Diff line number Diff line change
Expand Up @@ -596,5 +596,4 @@ int p9_idpool_check(int id, struct p9_idpool *p);
int p9_error_init(void);
int p9_errstr2errno(char *, int);
int p9_trans_fd_init(void);
void p9_trans_fd_exit(void);
#endif /* NET_9P_H */
9 changes: 2 additions & 7 deletions trunk/include/net/9p/transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef NET_9P_TRANSPORT_H
#define NET_9P_TRANSPORT_H

#include <linux/module.h>

/**
* enum p9_trans_status - different states of underlying transports
* @Connected: transport is connected and healthy
Expand Down Expand Up @@ -93,12 +91,9 @@ struct p9_trans_module {
int maxsize; /* max message size of transport */
int def; /* this transport should be default */
struct p9_trans * (*create)(const char *, char *, int, unsigned char);
struct module *owner;
};

void v9fs_register_trans(struct p9_trans_module *m);
void v9fs_unregister_trans(struct p9_trans_module *m);
struct p9_trans_module *v9fs_get_trans_by_name(const substring_t *name);
struct p9_trans_module *v9fs_get_default_trans(void);
void v9fs_put_trans(struct p9_trans_module *m);
struct p9_trans_module *v9fs_match_trans(const substring_t *name);
struct p9_trans_module *v9fs_default_trans(void);
#endif /* NET_9P_TRANSPORT_H */
10 changes: 2 additions & 8 deletions trunk/net/9p/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ static int parse_opts(char *opts, struct p9_client *clnt)
int option;
int ret = 0;

clnt->trans_mod = v9fs_default_trans();
clnt->dotu = 1;
clnt->msize = 8192;

Expand Down Expand Up @@ -107,7 +108,7 @@ static int parse_opts(char *opts, struct p9_client *clnt)
clnt->msize = option;
break;
case Opt_trans:
clnt->trans_mod = v9fs_get_trans_by_name(&args[0]);
clnt->trans_mod = v9fs_match_trans(&args[0]);
break;
case Opt_legacy:
clnt->dotu = 0;
Expand All @@ -116,10 +117,6 @@ static int parse_opts(char *opts, struct p9_client *clnt)
continue;
}
}

if (!clnt->trans_mod)
clnt->trans_mod = v9fs_get_default_trans();

kfree(options);
return ret;
}
Expand Down Expand Up @@ -153,7 +150,6 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)
if (!clnt)
return ERR_PTR(-ENOMEM);

clnt->trans_mod = NULL;
clnt->trans = NULL;
spin_lock_init(&clnt->lock);
INIT_LIST_HEAD(&clnt->fidlist);
Expand Down Expand Up @@ -239,8 +235,6 @@ void p9_client_destroy(struct p9_client *clnt)
clnt->trans = NULL;
}

v9fs_put_trans(clnt->trans_mod);

list_for_each_entry_safe(fid, fidptr, &clnt->fidlist, flist)
p9_fid_destroy(fid);

Expand Down
6 changes: 1 addition & 5 deletions trunk/net/9p/conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,19 +451,15 @@ p9_put_data(struct cbuf *bufp, const char *data, int count,
unsigned char **pdata)
{
*pdata = buf_alloc(bufp, count);
if (*pdata == NULL)
return -ENOMEM;
memmove(*pdata, data, count);
return 0;
return count;
}

static int
p9_put_user_data(struct cbuf *bufp, const char __user *data, int count,
unsigned char **pdata)
{
*pdata = buf_alloc(bufp, count);
if (*pdata == NULL)
return -ENOMEM;
return copy_from_user(*pdata, data, count);
}

Expand Down
Loading

0 comments on commit fd8d79f

Please sign in to comment.