Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56809
b: refs/heads/master
c: ad9ddd6
h: refs/heads/master
i:
  56807: f582fe9
v: v3
  • Loading branch information
Linus Torvalds committed May 23, 2007
1 parent a6616a4 commit debb5ef
Show file tree
Hide file tree
Showing 61 changed files with 298 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: a1ba15832c8f6ac2d5d193a6dbb91bcf7705b732
refs/heads/master: ad9ddd66c6e8a79630a975ff0bb8d45a11abe630
5 changes: 5 additions & 0 deletions trunk/arch/ia64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,9 @@ 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 @@ -773,6 +776,8 @@ 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: 14 additions & 7 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;
unsigned long ip, pr, num_regs, rp_loc, pfs_loc;
STAT(unsigned long start, flags;)
int retval;

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

/* restore the ip */
if (!info->rp_loc) {
/* validate the return IP pointer */
rp_loc = (unsigned long) info->rp_loc;
if ((rp_loc < info->regstk.limit) || (rp_loc > info->regstk.top)) {
/* 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;
}

/* restore the cfm: */
if (!info->pfs_loc) {
/* validate the previous stack frame pointer */
pfs_loc = (unsigned long) info->pfs_loc;
if ((pfs_loc < info->regstk.limit) || (pfs_loc > info->regstk.top)) {
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 @@ -1992,13 +1996,16 @@ 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 - (unsigned long) t >= IA64_STK_OFFSET)
if (rbstop > stklimit || rbstop < rbslimit)
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: 7 additions & 4 deletions trunk/arch/ia64/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,13 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus)

acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window,
&windows);
controller->window = kmalloc_node(sizeof(*controller->window) * windows,
GFP_KERNEL, controller->node);
if (!controller->window)
goto out2;
if (windows) {
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 __initdata shub_1_1_found;
static int __cpuinitdata shub_1_1_found;

/*
* sn_check_for_wars
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/powerpc/kernel/cputable.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ 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 @@ -251,6 +252,7 @@ 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 @@ -317,6 +319,7 @@ 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 @@ -335,6 +338,7 @@ 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_PMA0
#define MMCR0_PMA0 0
#ifndef MMCR0_PMAO
#define MMCR0_PMAO 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_PMA0));
mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMAO));
#else
mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~MMCR0_PMXE);
#endif
Expand Down
34 changes: 18 additions & 16 deletions trunk/arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,6 @@ 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 @@ -222,10 +215,17 @@ 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 || cpus_empty(map)) {
ret = 0;
goto out;
}
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;

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

done:
ret = 0;

out:
Expand All @@ -282,16 +283,17 @@ 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;
cpumask_t map = CPU_MASK_NONE;
int ret = -EBUSY;

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

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

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

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

#ifdef CONFIG_HIGHMEM
map_page(PKMAP_BASE, 0, 0); /* XXX gross */
pkmap_page_table = pte_offset_kernel(pmd_offset(pgd_offset_k
(PKMAP_BASE), PKMAP_BASE), PKMAP_BASE);
pkmap_page_table = pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k
(PKMAP_BASE), PKMAP_BASE), PKMAP_BASE), PKMAP_BASE);
map_page(KMAP_FIX_BEGIN, 0, 0); /* XXX gross */
kmap_pte = pte_offset_kernel(pmd_offset(pgd_offset_k
(KMAP_FIX_BEGIN), KMAP_FIX_BEGIN), KMAP_FIX_BEGIN);
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_prot = PAGE_KERNEL;
#endif /* CONFIG_HIGHMEM */

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/landisk/gio.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static int gio_ioctl(struct inode *inode, struct file *filp,
}

switch (cmd) {
case GIODRV_IOCSGIOSETADDR: /* addres set */
case GIODRV_IOCSGIOSETADDR: /* address set */
addr = data;
break;

Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/sh/boards/landisk/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ static struct platform_device cf_ide_device = {
},
};

static struct platform_device rtc_device = {
.name = "rs5c313",
.id = -1,
};

static struct platform_device *landisk_devices[] __initdata = {
&cf_ide_device,
&rtc_device,
};

static int __init landisk_devices_setup(void)
Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/sh/boards/renesas/r7780rp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
#
irqinit-y := irq-r7780rp.o
irqinit-$(CONFIG_SH_R7785RP) := irq-r7785rp.o
obj-y := setup.o irq.o $(irqinit-y)

ifneq ($(CONFIG_SH_R7785RP),y)
obj-$(CONFIG_PUSH_SWITCH) += psw.o
obj-y := setup.o irq.o $(irqinit-y)
endif
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/snapgear/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static void ds1302_writebyte(unsigned int addr, unsigned int val)
static void ds1302_reset(void)
{
unsigned long flags;
/* Hardware dependant reset/init */
/* Hardware dependent reset/init */
local_irq_save(flags);
set_dirp(get_dirp() | RTC_RESET | RTC_IODATA | RTC_SCLK);
set_dp(get_dp() & ~(RTC_RESET | RTC_IODATA | RTC_SCLK));
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/sh/boards/superh/microdev/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ void microdev_outb(unsigned char b, unsigned long port)
/*
* There is a board feature with the current SH4-202 MicroDev in
* that the 2 byte enables (nBE0 and nBE1) are tied together (and
* to the Chip Select Line (Ethernet_CS)). Due to this conectivity,
* to the Chip Select Line (Ethernet_CS)). Due to this connectivity,
* it is not possible to safely perform 8-bit writes to the
* Ethernet registers, as 16-bits will be consumed from the Data
* lines (corrupting the other byte). Hence, this function is
* written to impliment 16-bit read/modify/write for all byte-wide
* acceses.
* written to implement 16-bit read/modify/write for all byte-wide
* accesses.
*
* Note: there is no problem with byte READS (even or odd).
*
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/sh/boards/superh/microdev/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static void disable_microdev_irq(unsigned int irq)

fpgaIrq = fpgaIrqTable[irq].fpgaIrq;

/* disable interupts on the FPGA INTC register */
/* disable interrupts on the FPGA INTC register */
ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTDSB_REG);
}

Expand All @@ -125,7 +125,7 @@ static void enable_microdev_irq(unsigned int irq)
priorities |= MICRODEV_FPGA_INTPRI_LEVEL(fpgaIrq, pri);
ctrl_outl(priorities, priorityReg);

/* enable interupts on the FPGA INTC register */
/* enable interrupts on the FPGA INTC register */
ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTENB_REG);
}

Expand All @@ -152,7 +152,7 @@ extern void __init init_microdev_irq(void)
{
int i;

/* disable interupts on the FPGA INTC register */
/* disable interrupts on the FPGA INTC register */
ctrl_outl(~0ul, MICRODEV_FPGA_INTDSB_REG);

for (i = 0; i < NUM_EXTERNAL_IRQS; i++)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/superh/microdev/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ static int __init smsc_superio_setup(void)
SMSC_WRITE_INDEXED(0x00, 0xc7); /* GP47 = nIOWOP */
SMSC_WRITE_INDEXED(0x08, 0xe8); /* GP20 = nIDE2_OE */

/* Exit the configuraton state */
/* Exit the configuration state */
outb(SMSC_EXIT_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR);

return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/unknown/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* May be copied or modified under the terms of the GNU General Public
* License. See linux/COPYING for more information.
*
* Setup code for an unknown machine (internal peripherials only)
* Setup code for an unknown machine (internal peripherals only)
*
* This is the simplest of all boards, and serves only as a quick and dirty
* method to start debugging a new board during bring-up until proper board
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/drivers/dma/dma-api.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static int search_cap(const char **haystack, const char *needle)
/**
* request_dma_bycap - Allocate a DMA channel based on its capabilities
* @dmac: List of DMA controllers to search
* @caps: List of capabilites
* @caps: List of capabilities
*
* Search all channels of all DMA controllers to find a channel which
* matches the requested capabilities. The result is the channel
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/drivers/dma/dma-isa.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* NOTE: ops->xfer() is the preferred way of doing things. However, there
* are some users of the ISA DMA API that exist in common code that we
* don't necessarily want to go out of our way to break, so we still
* allow for some compatability at that level. Any new code is strongly
* allow for some compatibility at that level. Any new code is strongly
* advised to run far away from the ISA DMA API and use the SH DMA API
* directly.
*/
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/drivers/dma/dmabrg.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* 9 | HAC1/SSI1 | rec | half done | DMABRGI2
*
* all can be enabled/disabled in the DMABRGCR register,
* as well as checked if they occured.
* as well as checked if they occurred.
*
* DMABRGI0 services USB DMA Address errors, but it still must be
* enabled/acked in the DMABRGCR register. USB-DMA complete indicator
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/drivers/pci/ops-dreamcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct pci_channel board_pci_channels[] = {
*
* Also, we could very easily support both Type 0 and Type 1 configurations
* here, but since it doesn't seem that there is any such implementation in
* existance, we don't bother.
* existence, we don't bother.
*
* I suppose if someone actually gets around to ripping the chip out of
* the BBA and hanging some more devices off of it, then this might be
Expand Down
Loading

0 comments on commit debb5ef

Please sign in to comment.