Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56851
b: refs/heads/master
c: 26b8e51
h: refs/heads/master
i:
  56849: 9a968a7
  56847: e933072
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed May 22, 2007
1 parent ace513f commit c0315b1
Show file tree
Hide file tree
Showing 106 changed files with 428 additions and 596 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: 641e22e04c48af5d813f119c55336e02a22756f5
refs/heads/master: 26b8e51e98ae09cfc770b918577c004a376de4b8
2 changes: 1 addition & 1 deletion trunk/Documentation/DocBook/gadget.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

<toc></toc>

<chapter id="intro"><title>Introduction</title>
<chapter><title>Introduction</title>

<para>This document presents a Linux-USB "Gadget"
kernel mode
Expand Down
28 changes: 14 additions & 14 deletions trunk/Documentation/DocBook/usb.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@

</chapter>

<chapter id="types"><title>USB-Standard Types</title>
<chapter><title>USB-Standard Types</title>

<para>In <filename>&lt;linux/usb/ch9.h&gt;</filename> you will find
the USB data types defined in chapter 9 of the USB specification.
Expand All @@ -197,7 +197,7 @@

</chapter>

<chapter id="hostside"><title>Host-Side Data Types and Macros</title>
<chapter><title>Host-Side Data Types and Macros</title>

<para>The host side API exposes several layers to drivers, some of
which are more necessary than others.
Expand All @@ -211,7 +211,7 @@

</chapter>

<chapter id="usbcore"><title>USB Core APIs</title>
<chapter><title>USB Core APIs</title>

<para>There are two basic I/O models in the USB API.
The most elemental one is asynchronous: drivers submit requests
Expand Down Expand Up @@ -248,7 +248,7 @@
!Edrivers/usb/core/hub.c
</chapter>

<chapter id="hcd"><title>Host Controller APIs</title>
<chapter><title>Host Controller APIs</title>

<para>These APIs are only for use by host controller drivers,
most of which implement standard register interfaces such as
Expand Down Expand Up @@ -285,7 +285,7 @@
!Idrivers/usb/core/buffer.c
</chapter>

<chapter id="usbfs">
<chapter>
<title>The USB Filesystem (usbfs)</title>

<para>This chapter presents the Linux <emphasis>usbfs</emphasis>.
Expand Down Expand Up @@ -317,7 +317,7 @@
not it has a kernel driver.
</para>

<sect1 id="usbfs-files">
<sect1>
<title>What files are in "usbfs"?</title>

<para>Conventionally mounted at
Expand Down Expand Up @@ -356,7 +356,7 @@

</sect1>

<sect1 id="usbfs-fstab">
<sect1>
<title>Mounting and Access Control</title>

<para>There are a number of mount options for usbfs, which will
Expand Down Expand Up @@ -439,7 +439,7 @@

</sect1>

<sect1 id="usbfs-devices">
<sect1>
<title>/proc/bus/usb/devices</title>

<para>This file is handy for status viewing tools in user
Expand Down Expand Up @@ -473,7 +473,7 @@ for (;;) {
</para>
</sect1>

<sect1 id="usbfs-bbbddd">
<sect1>
<title>/proc/bus/usb/BBB/DDD</title>

<para>Use these files in one of these basic ways:
Expand Down Expand Up @@ -510,7 +510,7 @@ for (;;) {
</sect1>


<sect1 id="usbfs-lifecycle">
<sect1>
<title>Life Cycle of User Mode Drivers</title>

<para>Such a driver first needs to find a device file
Expand Down Expand Up @@ -565,7 +565,7 @@ for (;;) {

</sect1>

<sect1 id="usbfs-ioctl"><title>The ioctl() Requests</title>
<sect1><title>The ioctl() Requests</title>

<para>To use these ioctls, you need to include the following
headers in your userspace program:
Expand Down Expand Up @@ -604,7 +604,7 @@ for (;;) {
</para>


<sect2 id="usbfs-mgmt">
<sect2>
<title>Management/Status Requests</title>

<para>A number of usbfs requests don't deal very directly
Expand Down Expand Up @@ -736,7 +736,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)

</sect2>

<sect2 id="usbfs-sync">
<sect2>
<title>Synchronous I/O Support</title>

<para>Synchronous requests involve the kernel blocking
Expand Down Expand Up @@ -865,7 +865,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)
</variablelist>
</sect2>

<sect2 id="usbfs-async">
<sect2>
<title>Asynchronous I/O Support</title>

<para>As mentioned above, there are situations where it may be
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/ia64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,6 @@ get_wchan (struct task_struct *p)
unsigned long ip;
int count = 0;

if (!p || p == current || p->state == TASK_RUNNING)
return 0;

/*
* Note: p may not be a blocked task (it could be current or
* another process running on some other CPU. Rather than
Expand All @@ -776,8 +773,6 @@ get_wchan (struct task_struct *p)
*/
unw_init_from_blocked_task(&info, p);
do {
if (p->state == TASK_RUNNING)
return 0;
if (unw_unwind(&info) < 0)
return 0;
unw_get_ip(&info, &ip);
Expand Down
21 changes: 7 additions & 14 deletions trunk/arch/ia64/kernel/unwind.c
Original file line number Diff line number Diff line change
Expand Up @@ -1860,7 +1860,7 @@ int
unw_unwind (struct unw_frame_info *info)
{
unsigned long prev_ip, prev_sp, prev_bsp;
unsigned long ip, pr, num_regs, rp_loc, pfs_loc;
unsigned long ip, pr, num_regs;
STAT(unsigned long start, flags;)
int retval;

Expand All @@ -1870,31 +1870,27 @@ unw_unwind (struct unw_frame_info *info)
prev_sp = info->sp;
prev_bsp = info->bsp;

/* validate the return IP pointer */
rp_loc = (unsigned long) info->rp_loc;
if ((rp_loc < info->regstk.limit) || (rp_loc > info->regstk.top)) {
/* restore the ip */
if (!info->rp_loc) {
/* FIXME: should really be level 0 but it occurs too often. KAO */
UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n",
__FUNCTION__, info->ip);
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
return -1;
}
/* restore the ip */
ip = info->ip = *info->rp_loc;
if (ip < GATE_ADDR) {
UNW_DPRINT(2, "unwind.%s: reached user-space (ip=0x%lx)\n", __FUNCTION__, ip);
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
return -1;
}

/* validate the previous stack frame pointer */
pfs_loc = (unsigned long) info->pfs_loc;
if ((pfs_loc < info->regstk.limit) || (pfs_loc > info->regstk.top)) {
/* restore the cfm: */
if (!info->pfs_loc) {
UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__);
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
return -1;
}
/* restore the cfm: */
info->cfm_loc = info->pfs_loc;

/* restore the bsp: */
Expand Down Expand Up @@ -1996,16 +1992,13 @@ init_frame_info (struct unw_frame_info *info, struct task_struct *t,
memset(info, 0, sizeof(*info));

rbslimit = (unsigned long) t + IA64_RBS_OFFSET;
stklimit = (unsigned long) t + IA64_STK_OFFSET;

rbstop = sw->ar_bspstore;
if (rbstop > stklimit || rbstop < rbslimit)
if (rbstop - (unsigned long) t >= IA64_STK_OFFSET)
rbstop = rbslimit;

stklimit = (unsigned long) t + IA64_STK_OFFSET;
if (stktop <= rbstop)
stktop = rbstop;
if (stktop > stklimit)
stktop = stklimit;

info->regstk.limit = rbslimit;
info->regstk.top = rbstop;
Expand Down
11 changes: 4 additions & 7 deletions trunk/arch/ia64/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,10 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus)

acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window,
&windows);
if (windows) {
controller->window =
kmalloc_node(sizeof(*controller->window) * windows,
GFP_KERNEL, controller->node);
if (!controller->window)
goto out2;
}
controller->window = kmalloc_node(sizeof(*controller->window) * windows,
GFP_KERNEL, controller->node);
if (!controller->window)
goto out2;

name = kmalloc(16, GFP_KERNEL);
if (!name)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/sn/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void __init early_sn_setup(void)
}

extern int platform_intr_list[];
static int __cpuinitdata shub_1_1_found;
static int __initdata shub_1_1_found;

/*
* sn_check_for_wars
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/powerpc/kernel/cputable.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ static struct cpu_spec cpu_specs[] = {
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
.pmc_type = PPC_PMC_IBM,
.cpu_setup = __setup_cpu_ppc970,
.cpu_restore = __restore_cpu_ppc970,
.oprofile_cpu_type = "ppc64/970MP",
Expand All @@ -252,7 +251,6 @@ static struct cpu_spec cpu_specs[] = {
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
.pmc_type = PPC_PMC_IBM,
.cpu_setup = __setup_cpu_ppc970MP,
.cpu_restore = __restore_cpu_ppc970,
.oprofile_cpu_type = "ppc64/970MP",
Expand Down Expand Up @@ -319,7 +317,6 @@ static struct cpu_spec cpu_specs[] = {
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
.pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power6",
.oprofile_type = PPC_OPROFILE_POWER4,
.oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
Expand All @@ -338,7 +335,6 @@ static struct cpu_spec cpu_specs[] = {
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
.pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power6",
.oprofile_type = PPC_OPROFILE_POWER4,
.oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/kernel/pmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include <asm/cputable.h>
#include <asm/pmc.h>

#ifndef MMCR0_PMAO
#define MMCR0_PMAO 0
#ifndef MMCR0_PMA0
#define MMCR0_PMA0 0
#endif

static void dummy_perf(struct pt_regs *regs)
Expand All @@ -30,7 +30,7 @@ static void dummy_perf(struct pt_regs *regs)
mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE);
#elif defined(CONFIG_PPC64) || defined(CONFIG_6xx)
if (cur_cpu_spec->pmc_type == PPC_PMC_IBM)
mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMAO));
mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMA0));
#else
mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~MMCR0_PMXE);
#endif
Expand Down
34 changes: 16 additions & 18 deletions trunk/arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
/* Can deadlock when called with interrupts disabled */
WARN_ON(irqs_disabled());

/* remove 'self' from the map */
if (cpu_isset(smp_processor_id(), map))
cpu_clear(smp_processor_id(), map);

/* sanity check the map, remove any non-online processors. */
cpus_and(map, map, cpu_online_map);

if (unlikely(smp_ops == NULL))
return ret;

Expand All @@ -215,17 +222,10 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
/* Must grab online cpu count with preempt disabled, otherwise
* it can change. */
num_cpus = num_online_cpus() - 1;
if (!num_cpus)
goto done;

/* remove 'self' from the map */
if (cpu_isset(smp_processor_id(), map))
cpu_clear(smp_processor_id(), map);

/* sanity check the map, remove any non-online processors. */
cpus_and(map, map, cpu_online_map);
if (cpus_empty(map))
goto done;
if (!num_cpus || cpus_empty(map)) {
ret = 0;
goto out;
}

call_data = &data;
smp_wmb();
Expand Down Expand Up @@ -263,7 +263,6 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
}
}

done:
ret = 0;

out:
Expand All @@ -283,17 +282,16 @@ EXPORT_SYMBOL(smp_call_function);
int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int nonatomic,
int wait)
{
cpumask_t map = CPU_MASK_NONE;
int ret = -EBUSY;
cpumask_t map=CPU_MASK_NONE;

if (!cpu_online(cpu))
return -EINVAL;

if (cpu == smp_processor_id())
return -EBUSY;

cpu_set(cpu, map);
if (cpu != get_cpu())
ret = smp_call_function_map(func,info,nonatomic,wait,map);
put_cpu();
return ret;
return smp_call_function_map(func,info,nonatomic,wait,map);
}
EXPORT_SYMBOL(smp_call_function_single);

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ SECTIONS
/* Text and gots */
.text : {
_text = .;
*(.text.*)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
Expand Down
9 changes: 4 additions & 5 deletions trunk/arch/powerpc/mm/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,11 @@ void __init paging_init(void)

#ifdef CONFIG_HIGHMEM
map_page(PKMAP_BASE, 0, 0); /* XXX gross */
pkmap_page_table = pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k
(PKMAP_BASE), PKMAP_BASE), PKMAP_BASE), PKMAP_BASE);
pkmap_page_table = pte_offset_kernel(pmd_offset(pgd_offset_k
(PKMAP_BASE), PKMAP_BASE), PKMAP_BASE);
map_page(KMAP_FIX_BEGIN, 0, 0); /* XXX gross */
kmap_pte = pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k
(KMAP_FIX_BEGIN), KMAP_FIX_BEGIN), KMAP_FIX_BEGIN),
KMAP_FIX_BEGIN);
kmap_pte = pte_offset_kernel(pmd_offset(pgd_offset_k
(KMAP_FIX_BEGIN), KMAP_FIX_BEGIN), KMAP_FIX_BEGIN);
kmap_prot = PAGE_KERNEL;
#endif /* CONFIG_HIGHMEM */

Expand Down
Loading

0 comments on commit c0315b1

Please sign in to comment.