Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87150
b: refs/heads/master
c: 7f5e4e8
h: refs/heads/master
v: v3
  • Loading branch information
Harvey Harrison authored and Jeff Garzik committed Mar 11, 2008
1 parent c74c946 commit 8efd3e4
Show file tree
Hide file tree
Showing 79 changed files with 857 additions and 2,768 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: 2b752acd91ecee926483b5f64a8f8bfe06e081fb
refs/heads/master: 7f5e4e8d94b6013f93716bc42a1296f95d1059dc
7 changes: 2 additions & 5 deletions trunk/Documentation/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,12 +486,9 @@ static void concat(char *dst, char *args[])
unsigned int i, len = 0;

for (i = 0; args[i]; i++) {
if (i) {
strcat(dst+len, " ");
len++;
}
strcpy(dst+len, args[i]);
len += strlen(args[i]);
strcat(dst+len, " ");
len += strlen(args[i]) + 1;
}
/* In case it's empty. */
dst[len] = '\0';
Expand Down
4 changes: 2 additions & 2 deletions trunk/Documentation/pci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ initialization with a pointer to a structure describing the driver


The ID table is an array of struct pci_device_id entries ending with an
all-zero entry; use of the macro DEFINE_PCI_DEVICE_TABLE is the preferred
all-zero entry; use of the macro DECLARE_PCI_DEVICE_TABLE is the preferred
method of declaring the table. Each entry consists of:

vendor,device Vendor and device ID to match (or PCI_ANY_ID)
Expand Down Expand Up @@ -193,7 +193,7 @@ Tips on when/where to use the above attributes:
o Do not mark the struct pci_driver.

o The ID table array should be marked __devinitconst; this is done
automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE().
automatically if the table is declared with DECLARE_PCI_DEVICE_TABLE().

o The probe() and remove() functions should be marked __devinit
and __devexit respectively. All initialization functions
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/scheduler/sched-stats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ of idleness (idle, busy, and newly idle):

/proc/<pid>/schedstat
----------------
schedstats also adds a new /proc/<pid>/schedstat file to include some of
schedstats also adds a new /proc/<pid/schedstat file to include some of
the same information on a per-process level. There are three fields in
this file correlating for that process to:
1) time spent on the cpu
Expand Down
8 changes: 5 additions & 3 deletions trunk/Documentation/usb/usb-help.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
usb-help.txt
2008-Mar-7
2000-July-12

For USB help other than the readme files that are located in
Documentation/usb/*, see the following:
Expand All @@ -10,7 +10,9 @@ Linux-USB project: http://www.linux-usb.org
Linux USB Guide: http://linux-usb.sourceforge.net
Linux-USB device overview (working devices and drivers):
http://www.qbik.ch/usb/devices/

The Linux-USB mailing list is at linux-usb@vger.kernel.org

The Linux-USB mailing lists are:
linux-usb-users@lists.sourceforge.net for general user help
linux-usb-devel@lists.sourceforge.net for developer discussions

###
55 changes: 33 additions & 22 deletions trunk/arch/x86/lguest/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ struct lguest_data lguest_data = {
.blocked_interrupts = { 1 }, /* Block timer interrupts */
.syscall_vec = SYSCALL_VECTOR,
};
static cycle_t clock_base;

/*G:037 async_hcall() is pretty simple: I'm quite proud of it really. We have a
* ring buffer of stored hypercalls which the Host will run though next time we
Expand Down Expand Up @@ -326,8 +327,8 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
case 1: /* Basic feature request. */
/* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */
*cx &= 0x00002201;
/* SSE, SSE2, FXSR, MMX, CMOV, CMPXCHG8B, TSC, FPU. */
*dx &= 0x07808111;
/* SSE, SSE2, FXSR, MMX, CMOV, CMPXCHG8B, FPU. */
*dx &= 0x07808101;
/* The Host can do a nice optimization if it knows that the
* kernel mappings (addresses above 0xC0000000 or whatever
* PAGE_OFFSET is set to) haven't changed. But Linux calls
Expand Down Expand Up @@ -480,7 +481,7 @@ static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval)
{
*pmdp = pmdval;
lazy_hcall(LHCALL_SET_PMD, __pa(pmdp)&PAGE_MASK,
(__pa(pmdp)&(PAGE_SIZE-1))/4, 0);
(__pa(pmdp)&(PAGE_SIZE-1)), 0);
}

/* There are a couple of legacy places where the kernel sets a PTE, but we
Expand Down Expand Up @@ -594,25 +595,19 @@ static unsigned long lguest_get_wallclock(void)
return lguest_data.time.tv_sec;
}

/* The TSC is a Time Stamp Counter. The Host tells us what speed it runs at,
* or 0 if it's unusable as a reliable clock source. This matches what we want
* here: if we return 0 from this function, the x86 TSC clock will not register
* itself. */
static unsigned long lguest_cpu_khz(void)
{
return lguest_data.tsc_khz;
}

/* If we can't use the TSC, the kernel falls back to our "lguest_clock", where
* we read the time value given to us by the Host. */
static cycle_t lguest_clock_read(void)
{
unsigned long sec, nsec;

/* Since the time is in two parts (seconds and nanoseconds), we risk
* reading it just as it's changing from 99 & 0.999999999 to 100 and 0,
* and getting 99 and 0. As Linux tends to come apart under the stress
* of time travel, we must be careful: */
/* If the Host tells the TSC speed, we can trust that. */
if (lguest_data.tsc_khz)
return native_read_tsc();

/* If we can't use the TSC, we read the time value written by the Host.
* Since it's in two parts (seconds and nanoseconds), we risk reading
* it just as it's changing from 99 & 0.999999999 to 100 and 0, and
* getting 99 and 0. As Linux tends to come apart under the stress of
* time travel, we must be careful: */
do {
/* First we read the seconds part. */
sec = lguest_data.time.tv_sec;
Expand All @@ -627,21 +622,27 @@ static cycle_t lguest_clock_read(void)
/* Now if the seconds part has changed, try again. */
} while (unlikely(lguest_data.time.tv_sec != sec));

/* Our lguest clock is in real nanoseconds. */
/* Our non-TSC clock is in real nanoseconds. */
return sec*1000000000ULL + nsec;
}

/* This is the fallback clocksource: lower priority than the TSC clocksource. */
/* This is what we tell the kernel is our clocksource. */
static struct clocksource lguest_clock = {
.name = "lguest",
.rating = 200,
.rating = 400,
.read = lguest_clock_read,
.mask = CLOCKSOURCE_MASK(64),
.mult = 1 << 22,
.shift = 22,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};

/* The "scheduler clock" is just our real clock, adjusted to start at zero */
static unsigned long long lguest_sched_clock(void)
{
return cyc2ns(&lguest_clock, lguest_clock_read() - clock_base);
}

/* We also need a "struct clock_event_device": Linux asks us to set it to go
* off some time in the future. Actually, James Morris figured all this out, I
* just applied the patch. */
Expand Down Expand Up @@ -711,8 +712,19 @@ static void lguest_time_init(void)
/* Set up the timer interrupt (0) to go to our simple timer routine */
set_irq_handler(0, lguest_time_irq);

/* Our clock structure looks like arch/x86/kernel/tsc_32.c if we can
* use the TSC, otherwise it's a dumb nanosecond-resolution clock.
* Either way, the "rating" is set so high that it's always chosen over
* any other clocksource. */
if (lguest_data.tsc_khz)
lguest_clock.mult = clocksource_khz2mult(lguest_data.tsc_khz,
lguest_clock.shift);
clock_base = lguest_clock_read();
clocksource_register(&lguest_clock);

/* Now we've set up our clock, we can use it as the scheduler clock */
pv_time_ops.sched_clock = lguest_sched_clock;

/* We can't set cpumask in the initializer: damn C limitations! Set it
* here and register our timer device. */
lguest_clockevent.cpumask = cpumask_of_cpu(0);
Expand Down Expand Up @@ -983,7 +995,6 @@ __init void lguest_init(void)
/* time operations */
pv_time_ops.get_wallclock = lguest_get_wallclock;
pv_time_ops.time_init = lguest_time_init;
pv_time_ops.get_cpu_khz = lguest_cpu_khz;

/* Now is a good time to look at the implementations of these functions
* before returning to the rest of lguest_init(). */
Expand Down
10 changes: 0 additions & 10 deletions trunk/arch/x86/pci/pcbios.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,6 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
"b" (bx),
"D" ((long)reg),
"S" (&pci_indirect));
/*
* Zero-extend the result beyond 8 bits, do not trust the
* BIOS having done it:
*/
*value &= 0xff;
break;
case 2:
__asm__("lcall *(%%esi); cld\n\t"
Expand All @@ -215,11 +210,6 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
"b" (bx),
"D" ((long)reg),
"S" (&pci_indirect));
/*
* Zero-extend the result beyond 16 bits, do not trust the
* BIOS having done it:
*/
*value &= 0xffff;
break;
case 4:
__asm__("lcall *(%%esi); cld\n\t"
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/ata/libata-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf)

if (ata_msg_probe(ap))
ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER: port#: %d\n",
__FUNCTION__, ap->port_no);
__func__, ap->port_no);

/* _GTF has no input parameters */
status = acpi_evaluate_object(dev->acpi_handle, "_GTF", NULL, &output);
Expand All @@ -402,7 +402,7 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf)
if (ata_msg_probe(ap))
ata_dev_printk(dev, KERN_DEBUG, "%s: Run _GTF: "
"length or ptr is NULL (0x%llx, 0x%p)\n",
__FUNCTION__,
__func__,
(unsigned long long)output.length,
output.pointer);
rc = -EINVAL;
Expand Down Expand Up @@ -432,7 +432,7 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf)
if (ata_msg_probe(ap))
ata_dev_printk(dev, KERN_DEBUG,
"%s: returning gtf=%p, gtf_count=%d\n",
__FUNCTION__, *gtf, rc);
__func__, *gtf, rc);
}
return rc;

Expand Down Expand Up @@ -725,7 +725,7 @@ static int ata_acpi_push_id(struct ata_device *dev)

if (ata_msg_probe(ap))
ata_dev_printk(dev, KERN_DEBUG, "%s: ix = %d, port#: %d\n",
__FUNCTION__, dev->devno, ap->port_no);
__func__, dev->devno, ap->port_no);

/* Give the drive Identify data to the drive via the _SDD method */
/* _SDD: set up input parameters */
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,7 @@ void ata_port_flush_task(struct ata_port *ap)
cancel_rearming_delayed_work(&ap->port_task);

if (ata_msg_ctl(ap))
ata_port_printk(ap, KERN_DEBUG, "%s: EXIT\n", __FUNCTION__);
ata_port_printk(ap, KERN_DEBUG, "%s: EXIT\n", __func__);
}

static void ata_qc_complete_internal(struct ata_queued_cmd *qc)
Expand Down Expand Up @@ -2056,7 +2056,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
int rc;

if (ata_msg_ctl(ap))
ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __FUNCTION__);
ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __func__);

ata_dev_select(ap, dev->devno, 1, 1); /* select device 0/1 */
retry:
Expand Down Expand Up @@ -2253,12 +2253,12 @@ int ata_dev_configure(struct ata_device *dev)

if (!ata_dev_enabled(dev) && ata_msg_info(ap)) {
ata_dev_printk(dev, KERN_INFO, "%s: ENTER/EXIT -- nodev\n",
__FUNCTION__);
__func__);
return 0;
}

if (ata_msg_probe(ap))
ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __FUNCTION__);
ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __func__);

/* set horkage */
dev->horkage |= ata_dev_blacklisted(dev);
Expand All @@ -2279,7 +2279,7 @@ int ata_dev_configure(struct ata_device *dev)
ata_dev_printk(dev, KERN_DEBUG,
"%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x "
"85:%04x 86:%04x 87:%04x 88:%04x\n",
__FUNCTION__,
__func__,
id[49], id[82], id[83], id[84],
id[85], id[86], id[87], id[88]);

Expand Down Expand Up @@ -2511,13 +2511,13 @@ int ata_dev_configure(struct ata_device *dev)

if (ata_msg_probe(ap))
ata_dev_printk(dev, KERN_DEBUG, "%s: EXIT, drv_stat = 0x%x\n",
__FUNCTION__, ata_chk_status(ap));
__func__, ata_chk_status(ap));
return 0;

err_out_nosup:
if (ata_msg_probe(ap))
ata_dev_printk(dev, KERN_DEBUG,
"%s: EXIT, err\n", __FUNCTION__);
"%s: EXIT, err\n", __func__);
return rc;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/pata_pdc2027x.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#undef PDC_DEBUG

#ifdef PDC_DEBUG
#define PDPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args)
#define PDPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args)
#else
#define PDPRINTK(fmt, args...)
#endif
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ u64 dma_get_required_mask(struct device *dev)
high_totalram += high_totalram - 1;
mask = (((u64)high_totalram) << 32) + 0xffffffff;
}
return mask;
return mask & *dev->dma_mask;
}
EXPORT_SYMBOL_GPL(dma_get_required_mask);
#endif
4 changes: 0 additions & 4 deletions trunk/drivers/base/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ int sysdev_class_register(struct sysdev_class * cls)
pr_debug("Registering sysdev class '%s'\n",
kobject_name(&cls->kset.kobj));
INIT_LIST_HEAD(&cls->drivers);
memset(&cls->kset.kobj, 0x00, sizeof(struct kobject));
cls->kset.kobj.parent = &system_kset->kobj;
cls->kset.kobj.ktype = &ktype_sysdev_class;
cls->kset.kobj.kset = system_kset;
Expand Down Expand Up @@ -228,9 +227,6 @@ int sysdev_register(struct sys_device * sysdev)

pr_debug("Registering sys device '%s'\n", kobject_name(&sysdev->kobj));

/* initialize the kobject to 0, in case it had previously been used */
memset(&sysdev->kobj, 0x00, sizeof(struct kobject));

/* Make sure the kset is set */
sysdev->kobj.kset = &cls->kset;

Expand Down
Loading

0 comments on commit 8efd3e4

Please sign in to comment.