Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20085
b: refs/heads/master
c: 746f956
h: refs/heads/master
i:
  20083: ba23552
v: v3
  • Loading branch information
Linus Torvalds committed Feb 8, 2006
1 parent e851267 commit e0df1db
Show file tree
Hide file tree
Showing 91 changed files with 200 additions and 234 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: 0fc9b55606662c4763a4f37add889cfd6a66247a
refs/heads/master: 746f956beb534ddf73da4346de81f2941c8573f8
8 changes: 8 additions & 0 deletions trunk/Documentation/powerpc/booting-without-of.txt
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,10 @@ address which can extend beyond that limit.
- device_type : Should be "soc"
- ranges : Should be defined as specified in 1) to describe the
translation of SOC addresses for memory mapped SOC registers.
- bus-frequency: Contains the bus frequency for the SOC node.
Typically, the value of this field is filled in by the boot
loader.


Recommended properties:

Expand Down Expand Up @@ -919,6 +923,7 @@ SOC.
device_type = "soc";
ranges = <00000000 e0000000 00100000>
reg = <e0000000 00003000>;
bus-frequency = <0>;
}


Expand Down Expand Up @@ -1170,6 +1175,8 @@ platforms are moved over to use the flattened-device-tree model.

mdio@24520 {
reg = <24520 20>;
device_type = "mdio";
compatible = "gianfar";

ethernet-phy@0 {
......
Expand Down Expand Up @@ -1317,6 +1324,7 @@ not necessary as they are usually the same as the root node.
device_type = "soc";
ranges = <00000000 e0000000 00100000>
reg = <e0000000 00003000>;
bus-frequency = <0>;

mdio@24520 {
reg = <24520 20>;
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/cris/arch-v10/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,18 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
int i;
unsigned long tmp;

ret = 0;
for (i = 0; i <= PT_MAX; i++) {
tmp = get_reg(child, i);

if (put_user(tmp, datap)) {
ret = -EFAULT;
goto out_tsk;
break;
}

data += sizeof(long);
}

ret = 0;
break;
}

Expand All @@ -222,10 +222,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
int i;
unsigned long tmp;

ret = 0;
for (i = 0; i <= PT_MAX; i++) {
if (get_user(tmp, datap)) {
ret = -EFAULT;
goto out_tsk;
break;
}

if (i == PT_DCCR) {
Expand All @@ -237,7 +238,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
data += sizeof(long);
}

ret = 0;
break;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/arch/cris/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
/*
* Setup options
*/
struct drive_info_struct { char dummy[32]; } drive_info;
struct screen_info screen_info;

extern int root_mountflags;
Expand Down
10 changes: 0 additions & 10 deletions trunk/arch/ia64/dig/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@
#include <asm/machvec.h>
#include <asm/system.h>

/*
* This is here so we can use the CMOS detection in ide-probe.c to
* determine what drives are present. In theory, we don't need this
* as the auto-detection could be done via ide-probe.c:do_probe() but
* in practice that would be much slower, which is painful when
* running in the simulator. Note that passing zeroes in DRIVE_INFO
* is sufficient (the IDE driver will autodetect the drive geometry).
*/
char drive_info[4*16];

void __init
dig_setup (char **cmdline_p)
{
Expand Down
14 changes: 0 additions & 14 deletions trunk/arch/ia64/sn/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,6 @@ struct screen_info sn_screen_info = {
.orig_video_points = 16
};

/*
* This is here so we can use the CMOS detection in ide-probe.c to
* determine what drives are present. In theory, we don't need this
* as the auto-detection could be done via ide-probe.c:do_probe() but
* in practice that would be much slower, which is painful when
* running in the simulator. Note that passing zeroes in DRIVE_INFO
* is sufficient (the IDE driver will autodetect the drive geometry).
*/
#ifdef CONFIG_IA64_GENERIC
extern char drive_info[4 * 16];
#else
char drive_info[4 * 16];
#endif

/*
* This routine can only be used during init, since
* smp_boot_data is an init data structure.
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/m32r/kernel/m32r_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
#include <asm/irq.h>
#include <asm/tlbflush.h>

#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
extern struct drive_info_struct drive_info;
EXPORT_SYMBOL(drive_info);
#endif

/* platform dependent support */
EXPORT_SYMBOL(boot_cpu_data);
EXPORT_SYMBOL(dump_fpu);
Expand Down
6 changes: 0 additions & 6 deletions trunk/arch/m32r/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@
extern void init_mmu(void);
#endif

#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) \
|| defined(CONFIG_BLK_DEV_IDE_MODULE) \
|| defined(CONFIG_BLK_DEV_HD_MODULE)
struct drive_info_struct { char dummy[32]; } drive_info;
#endif

extern char _end[];

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/fpu.S
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ _GLOBAL(load_up_fpu)
#else
ld r4,PACACURRENT(r13)
addi r5,r4,THREAD /* Get THREAD */
ld r4,THREAD_FPEXC_MODE(r5)
lwz r4,THREAD_FPEXC_MODE(r5)
ori r12,r12,MSR_FP
or r12,r12,r4
std r12,_MSR(r1)
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/powerpc/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -749,11 +749,12 @@ iSeries_secondary_smp_loop:

.globl decrementer_iSeries_masked
decrementer_iSeries_masked:
/* We may not have a valid TOC pointer in here. */
li r11,1
ld r12,PACALPPACAPTR(r13)
stb r11,LPPACADECRINT(r12)
LOAD_REG_ADDRBASE(r12,tb_ticks_per_jiffy)
lwz r12,ADDROFF(tb_ticks_per_jiffy)(r12)
LOAD_REG_IMMEDIATE(r12, tb_ticks_per_jiffy)
lwz r12,0(r12)
mtspr SPRN_DEC,r12
/* fall through */

Expand Down
9 changes: 6 additions & 3 deletions trunk/arch/powerpc/kernel/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,6 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,

spin_unlock_irqrestore(&(tbl->it_lock), flags);

/* Make sure updates are seen by hardware */
mb();

DBG("mapped %d elements:\n", outcount);

/* For the sake of iommu_unmap_sg, we clear out the length in the
Expand All @@ -347,6 +344,10 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
outs->dma_address = DMA_ERROR_CODE;
outs->dma_length = 0;
}

/* Make sure updates are seen by hardware */
mb();

return outcount;

failure:
Expand All @@ -358,6 +359,8 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
npages = (PAGE_ALIGN(s->dma_address + s->dma_length) - vaddr)
>> PAGE_SHIFT;
__iommu_free(tbl, vaddr, npages);
s->dma_address = DMA_ERROR_CODE;
s->dma_length = 0;
}
}
spin_unlock_irqrestore(&(tbl->it_lock), flags);
Expand Down
38 changes: 35 additions & 3 deletions trunk/arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,12 @@ void __init finish_device_tree(void)
size = 16;
finish_node(allnodes, &size, 1);
size -= 16;
end = start = (unsigned long) __va(lmb_alloc(size, 128));

if (0 == size)
end = start = 0;
else
end = start = (unsigned long)__va(lmb_alloc(size, 128));

finish_node(allnodes, &end, 0);
BUG_ON(end != start + size);

Expand Down Expand Up @@ -1398,8 +1403,8 @@ struct device_node *of_find_node_by_name(struct device_node *from,

read_lock(&devtree_lock);
np = from ? from->allnext : allnodes;
for (; np != 0; np = np->allnext)
if (np->name != 0 && strcasecmp(np->name, name) == 0
for (; np != NULL; np = np->allnext)
if (np->name != NULL && strcasecmp(np->name, name) == 0
&& of_node_get(np))
break;
if (from)
Expand Down Expand Up @@ -1917,3 +1922,30 @@ int prom_update_property(struct device_node *np,

return 0;
}

#ifdef CONFIG_KEXEC
/* We may have allocated the flat device tree inside the crash kernel region
* in prom_init. If so we need to move it out into regular memory. */
void kdump_move_device_tree(void)
{
unsigned long start, end;
struct boot_param_header *new;

start = __pa((unsigned long)initial_boot_params);
end = start + initial_boot_params->totalsize;

if (end < crashk_res.start || start > crashk_res.end)
return;

new = (struct boot_param_header*)
__va(lmb_alloc(initial_boot_params->totalsize, PAGE_SIZE));

memcpy(new, initial_boot_params, initial_boot_params->totalsize);

initial_boot_params = new;

DBG("Flat device tree blob moved to %p\n", initial_boot_params);

/* XXX should we unreserve the old DT? */
}
#endif /* CONFIG_KEXEC */
4 changes: 4 additions & 0 deletions trunk/arch/powerpc/kernel/prom_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -2098,6 +2098,10 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
*/
prom_init_stdout();

/* Bail if this is a kdump kernel. */
if (PHYSICAL_START > 0)
prom_panic("Error: You can't boot a kdump kernel from OF!\n");

/*
* Check for an initrd
*/
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/powerpc/kernel/prom_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,10 @@ u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size,
if (parent == NULL)
return NULL;
bus = of_match_bus(parent);
if (strcmp(bus->name, "pci"))
if (strcmp(bus->name, "pci")) {
of_node_put(parent);
return NULL;
}
bus->count_cells(dev, &na, &ns);
of_node_put(parent);
if (!OF_CHECK_COUNTS(na, ns))
Expand Down
12 changes: 6 additions & 6 deletions trunk/arch/powerpc/kernel/rtas.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <asm/prom.h>
#include <asm/rtas.h>
#include <asm/hvcall.h>
#include <asm/semaphore.h>
#include <asm/machdep.h>
#include <asm/page.h>
Expand Down Expand Up @@ -565,6 +566,7 @@ static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE;
#ifdef CONFIG_PPC_PSERIES
static void rtas_percpu_suspend_me(void *info)
{
int i;
long rc;
long flags;
struct rtas_suspend_me_data *data =
Expand All @@ -587,18 +589,16 @@ static void rtas_percpu_suspend_me(void *info)

if (rc == H_Continue) {
data->waiting = 0;
rtas_call(ibm_suspend_me_token, 0, 1,
data->args->args);
data->args->args[data->args->nargs] =
rtas_call(ibm_suspend_me_token, 0, 1, NULL);
for_each_cpu(i)
plpar_hcall_norets(H_PROD,i);
} else {
data->waiting = -EBUSY;
printk(KERN_ERR "Error on H_Join hypervisor call\n");
}

out:
/* before we restore interrupts, make sure we don't
* generate a spurious soft lockup errors
*/
touch_softlockup_watchdog();
local_irq_restore(flags);
return;
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/powerpc/kernel/rtas_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,7 @@ static void rtas_flash_firmware(int reboot_type)
static void remove_flash_pde(struct proc_dir_entry *dp)
{
if (dp) {
if (dp->data != NULL)
kfree(dp->data);
kfree(dp->data);
dp->owner = NULL;
remove_proc_entry(dp->name, dp->parent);
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/powerpc/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,9 @@ void __init setup_system(void)
{
DBG(" -> setup_system()\n");

#ifdef CONFIG_KEXEC
kdump_move_device_tree();
#endif
/*
* Unflatten the device-tree passed by prom_init or kexec
*/
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,9 @@ int __devinit start_secondary(void *unused)
if (smp_ops->take_timebase)
smp_ops->take_timebase();

if (system_state > SYSTEM_BOOTING)
per_cpu(last_jiffy, cpu) = get_tb();

spin_lock(&call_lock);
cpu_set(cpu, cpu_online_map);
spin_unlock(&call_lock);
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/powerpc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,10 +612,10 @@ void __init generic_calibrate_decr(void)

ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */
node_found = 0;
if (cpu != 0) {
if (cpu) {
fp = (unsigned int *)get_property(cpu, "timebase-frequency",
NULL);
if (fp != 0) {
if (fp) {
node_found = 1;
ppc_tb_freq = *fp;
}
Expand All @@ -626,10 +626,10 @@ void __init generic_calibrate_decr(void)

ppc_proc_freq = DEFAULT_PROC_FREQ;
node_found = 0;
if (cpu != 0) {
if (cpu) {
fp = (unsigned int *)get_property(cpu, "clock-frequency",
NULL);
if (fp != 0) {
if (fp) {
node_found = 1;
ppc_proc_freq = *fp;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/udbg_16550.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
}

#ifdef CONFIG_PPC_MAPLE
void udbg_maple_real_putc(unsigned char c)
void udbg_maple_real_putc(char c)
{
if (udbg_comport) {
while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
Expand Down
Loading

0 comments on commit e0df1db

Please sign in to comment.