Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Check for offline nodes in pci NUMA code
  [POWERPC] Better check in show_instructions
  [POWERPC] POWER6 has 6 PMCs
  [POWERPC] Never panic when taking altivec exceptions from userspace
  [POWERPC] Fix IO Window Updates on P2P bridges.
  [POWERPC] Add Makefile entry for MPC832x_mds support
  [POWERPC] Fix MPC8360EMDS PB board support
  [POWERPC] ppc: Add missing calls to set_irq_regs
  [POWERPC] Off-by-one in /arch/ppc/platforms/mpc8*
  [POWERPC] Add DOS partition table support to mpc834x_itx_defconfig
  [POWERPC] spufs: fix support for read/write on cntl
  [POWERPC] Don't crash on cell with 2 BEs when !CONFIG_NUMA
This commit is contained in:
Linus Torvalds 2006-10-17 08:20:57 -07:00
commit 20f8595766
15 changed files with 75 additions and 30 deletions

View file

@ -1248,7 +1248,7 @@ CONFIG_PARTITION_ADVANCED=y
# CONFIG_AMIGA_PARTITION is not set
# CONFIG_ATARI_PARTITION is not set
# CONFIG_MAC_PARTITION is not set
# CONFIG_MSDOS_PARTITION is not set
CONFIG_MSDOS_PARTITION=y
# CONFIG_LDM_PARTITION is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set

View file

@ -268,7 +268,7 @@ struct cpu_spec cpu_specs[] = {
.cpu_user_features = COMMON_USER_POWER6,
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
.num_pmcs = 6,
.oprofile_cpu_type = "ppc64/power6",
.oprofile_type = PPC_OPROFILE_POWER4,
.oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,

View file

@ -441,14 +441,14 @@ update_bridge_base(struct pci_bus *bus, int i)
end = res->end - off;
io_base_lo = (start >> 8) & PCI_IO_RANGE_MASK;
io_limit_lo = (end >> 8) & PCI_IO_RANGE_MASK;
if (end > 0xffff) {
pci_write_config_word(dev, PCI_IO_BASE_UPPER16,
start >> 16);
pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16,
end >> 16);
if (end > 0xffff)
io_base_lo |= PCI_IO_RANGE_TYPE_32;
} else
else
io_base_lo |= PCI_IO_RANGE_TYPE_16;
pci_write_config_word(dev, PCI_IO_BASE_UPPER16,
start >> 16);
pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16,
end >> 16);
pci_write_config_byte(dev, PCI_IO_BASE, io_base_lo);
pci_write_config_byte(dev, PCI_IO_LIMIT, io_limit_lo);

View file

@ -199,8 +199,14 @@ struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
pci_setup_pci_controller(phb);
phb->arch_data = dev;
phb->is_dynamic = mem_init_done;
if (dev)
PHB_SET_NODE(phb, of_node_to_nid(dev));
if (dev) {
int nid = of_node_to_nid(dev);
if (nid < 0 || !node_online(nid))
nid = -1;
PHB_SET_NODE(phb, nid);
}
return phb;
}

View file

@ -341,13 +341,6 @@ struct task_struct *__switch_to(struct task_struct *prev,
static int instructions_to_print = 16;
#ifdef CONFIG_PPC64
#define BAD_PC(pc) ((REGION_ID(pc) != KERNEL_REGION_ID) && \
(REGION_ID(pc) != VMALLOC_REGION_ID))
#else
#define BAD_PC(pc) ((pc) < KERNELBASE)
#endif
static void show_instructions(struct pt_regs *regs)
{
int i;
@ -366,7 +359,8 @@ static void show_instructions(struct pt_regs *regs)
* bad address because the pc *should* only be a
* kernel address.
*/
if (BAD_PC(pc) || __get_user(instr, (unsigned int __user *)pc)) {
if (!__kernel_text_address(pc) ||
__get_user(instr, (unsigned int __user *)pc)) {
printk("XXXXXXXX ");
} else {
if (regs->nip == pc)

View file

@ -900,14 +900,13 @@ void kernel_fp_unavailable_exception(struct pt_regs *regs)
void altivec_unavailable_exception(struct pt_regs *regs)
{
#if !defined(CONFIG_ALTIVEC)
if (user_mode(regs)) {
/* A user program has executed an altivec instruction,
but this kernel doesn't support altivec. */
_exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
return;
}
#endif
printk(KERN_EMERG "Unrecoverable VMX/Altivec Unavailable Exception "
"%lx at %lx\n", regs->trap, regs->nip);
die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT);

View file

@ -32,6 +32,13 @@ config MPC834x_ITX
Be aware that PCI initialization is the bootloader's
responsiblilty.
config MPC8360E_PB
bool "Freescale MPC8360E PB"
select DEFAULT_UIMAGE
select QUICC_ENGINE
help
This option enables support for the MPC836x EMDS Processor Board.
endchoice
config PPC_MPC832x
@ -46,4 +53,10 @@ config MPC834x
select PPC_INDIRECT_PCI
default y if MPC834x_SYS || MPC834x_ITX
config PPC_MPC836x
bool
select PPC_UDBG_16550
select PPC_INDIRECT_PCI
default y if MPC8360E_PB
endmenu

View file

@ -5,3 +5,5 @@ obj-y := misc.o
obj-$(CONFIG_PCI) += pci.o
obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o
obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o
obj-$(CONFIG_MPC8360E_PB) += mpc8360e_pb.o
obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o

View file

@ -30,6 +30,7 @@
#include <linux/root_dev.h>
#include <linux/initrd.h>
#include <asm/of_device.h>
#include <asm/system.h>
#include <asm/atomic.h>
#include <asm/time.h>
@ -141,6 +142,24 @@ static void __init mpc8360_sys_setup_arch(void)
#endif
}
static int __init mpc8360_declare_of_platform_devices(void)
{
struct device_node *np;
for (np = NULL; (np = of_find_compatible_node(np, "network",
"ucc_geth")) != NULL;) {
int ucc_num;
char bus_id[BUS_ID_SIZE];
ucc_num = *((uint *) get_property(np, "device-id", NULL)) - 1;
snprintf(bus_id, BUS_ID_SIZE, "ucc_geth.%u", ucc_num);
of_platform_device_create(np, bus_id, NULL);
}
return 0;
}
device_initcall(mpc8360_declare_of_platform_devices);
void __init mpc8360_sys_init_IRQ(void)
{

View file

@ -781,6 +781,17 @@ static int __init create_spu(struct device_node *spe)
if (!spu)
goto out;
spu->node = find_spu_node_id(spe);
if (spu->node >= MAX_NUMNODES) {
printk(KERN_WARNING "SPE %s on node %d ignored,"
" node number too big\n", spe->full_name, spu->node);
printk(KERN_WARNING "Check if CONFIG_NUMA is enabled.\n");
return -ENODEV;
}
spu->nid = of_node_to_nid(spe);
if (spu->nid == -1)
spu->nid = 0;
ret = spu_map_device(spu, spe);
/* try old method */
if (ret)
@ -788,10 +799,6 @@ static int __init create_spu(struct device_node *spe)
if (ret)
goto out_free;
spu->node = find_spu_node_id(spe);
spu->nid = of_node_to_nid(spe);
if (spu->nid == -1)
spu->nid = 0;
ret = spu_map_interrupts(spu, spe);
if (ret)
ret = spu_map_interrupts_old(spu, spe);

View file

@ -246,6 +246,7 @@ static int spufs_cntl_open(struct inode *inode, struct file *file)
static struct file_operations spufs_cntl_fops = {
.open = spufs_cntl_open,
.release = simple_attr_close,
.read = simple_attr_read,
.write = simple_attr_write,
.mmap = spufs_cntl_mmap,

View file

@ -62,6 +62,7 @@
#include <asm/cache.h>
#include <asm/8xx_immap.h>
#include <asm/machdep.h>
#include <asm/irq_regs.h>
#include <asm/time.h>
@ -129,6 +130,7 @@ void wakeup_decrementer(void)
*/
void timer_interrupt(struct pt_regs * regs)
{
struct pt_regs *old_regs;
int next_dec;
unsigned long cpu = smp_processor_id();
unsigned jiffy_stamp = last_jiffy_stamp(cpu);
@ -137,6 +139,7 @@ void timer_interrupt(struct pt_regs * regs)
if (atomic_read(&ppc_n_lost_interrupts) != 0)
do_IRQ(regs);
old_regs = set_irq_regs(regs);
irq_enter();
while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) {
@ -188,6 +191,7 @@ void timer_interrupt(struct pt_regs * regs)
ppc_md.heartbeat();
irq_exit();
set_irq_regs(old_regs);
}
/*

View file

@ -196,7 +196,7 @@ static void __init mpc8272ads_fixup_enet_pdata(struct platform_device *pdev,
bd_t* bi = (void*)__res;
int fs_no = fsid_fcc1+pdev->id-1;
if(fs_no > ARRAY_SIZE(mpc82xx_enet_pdata)) {
if(fs_no >= ARRAY_SIZE(mpc82xx_enet_pdata)) {
return;
}
@ -222,7 +222,7 @@ static void mpc8272ads_fixup_uart_pdata(struct platform_device *pdev,
int id = fs_uart_id_scc2fsid(idx);
/* no need to alter anything if console */
if ((id <= num) && (!pdev->dev.platform_data)) {
if ((id < num) && (!pdev->dev.platform_data)) {
pinfo = &mpc8272_uart_pdata[id];
pinfo->uart_clk = bd->bi_intfreq;
pdev->dev.platform_data = pinfo;

View file

@ -259,7 +259,7 @@ static void mpc866ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no)
/* Get pointer to Communication Processor */
cp = cpmp;
if(fs_no > ARRAY_SIZE(mpc8xx_enet_pdata)) {
if(fs_no >= ARRAY_SIZE(mpc8xx_enet_pdata)) {
printk(KERN_ERR"No network-suitable #%d device on bus", fs_no);
return;
}
@ -305,7 +305,7 @@ static void __init mpc866ads_fixup_uart_pdata(struct platform_device *pdev,
int id = fs_uart_id_smc2fsid(idx);
/* no need to alter anything if console */
if ((id <= num) && (!pdev->dev.platform_data)) {
if ((id < num) && (!pdev->dev.platform_data)) {
pinfo = &mpc866_uart_pdata[id];
pinfo->uart_clk = bd->bi_intfreq;
pdev->dev.platform_data = pinfo;

View file

@ -263,7 +263,7 @@ static void mpc885ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no)
char *e;
int i;
if(fs_no > ARRAY_SIZE(mpc8xx_enet_pdata)) {
if(fs_no >= ARRAY_SIZE(mpc8xx_enet_pdata)) {
printk(KERN_ERR"No network-suitable #%d device on bus", fs_no);
return;
}
@ -371,7 +371,7 @@ static void __init mpc885ads_fixup_uart_pdata(struct platform_device *pdev,
int id = fs_uart_id_smc2fsid(idx);
/* no need to alter anything if console */
if ((id <= num) && (!pdev->dev.platform_data)) {
if ((id < num) && (!pdev->dev.platform_data)) {
pinfo = &mpc885_uart_pdata[id];
pinfo->uart_clk = bd->bi_intfreq;
pdev->dev.platform_data = pinfo;