LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* mpc5200 timer3 Interrupts stopped working
From: bennett78 @ 2006-02-24 15:59 UTC (permalink / raw)
  To: linuxppc-embedded


[-- Attachment #1.1: Type: text/plain, Size: 3303 bytes --]

Help, how do I debug timer3 Interrupts?  My driver was working and then 
interrupts
stopped coming (most likely blocked).  I have a driver that is very 
similar to
     linuxppc_2_4_devel/drivers/char/pp01_ad64.c
I have attached the complete driver (et.c)

/ # insmod et
ET Display Driver v0.1 loaded ET_TIN irq 16

et_init 00 intr->per_mask  1bfffc00
et_init 10 intr->ctrl      00c01001
et_init 14 intr->main_mask 00010e00
et_init 24 intr->enc_stat  00000001
et_init 28 intr->crit_stat 00000000
et_init 2c intr->main_stat 00002000
et_init 30 intr->per_stat  00000000
et_init 38 intr->per_error 00000000

/ # cat /proc/interrupts
           CPU0
 16:          0  MPC5xxx Edge      et Trubine
 23:       1049  MPC5xxx Edge      eth_xmit
 24:       2468  MPC5xxx Edge      eth_recv
 39:         51  MPC5xxx Edge      serial
 40:          0  MPC5xxx Edge      serial
 43:         69  MPC5xxx Edge      eth_err
BAD:          0

with a pulse train on timer3 input "et_interrupt" no longer gets
called.

code snippets
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#define ET_TIN         3   // Turbine PULSE IN

static void et_interrupt (int irq, void *dev_id, struct pt_regs * regs)
{
    int port = ET_IRQ_TO_PORT(irq);
    unsigned long stat;

    printk(KERN_INFO "et_interrupt IRQ %d port %d main_stat %x gpt.sr %x 
\n",
                        irq, port, intr->main_status, gpt[port].sr );

    if( port == ET_TIN ) {
        // Clear pending interrupt
        stat = in_be32(&gpt[port].sr) & 0xffff;
        out_be32(&gpt[port].sr,  MPC5xxx_GPT_SR_CAPT);
        printk(KERN_INFO "et_int irq=%d port=%d stat %0lx \n", irq, 
port, stat);
        // wake_up_interruptible(&et_wait);
    } else {
        printk(KERN_ERR ET_MSG "Unexpected IRQ %d received", irq);
    }
    spin_lock (&et_lock);
    turbine_per = in_be32(&gpt[port].sr) >> 16;
    spin_unlock (&et_lock);
}


static int __init et_init (void)
....
if (request_irq(ET_PORT_TO_IRQ(ET_TIN), et_interrupt, 0, "et Trubine", 
NULL)) {
            printk(KERN_ERR ET_MSG "couldn't register interrupts\n");
            goto abort_remove_proc;
    }
out_be32(&gpt[ET_TIN].cir, (   66<<16) | 1 );  /* prescale(16), 
period(16)  */
out_be32(&gpt[ET_TIN].emsr,
        MPC5xxx_GPT_EMSR_INP_CAPTURE
      | MPC5xxx_GPT_EMSR_ICT_FALLING
      | MPC5xxx_GPT_EMSR_INT_ENABLE);
...
printk(KERN_INFO "ET Display Driver v%s loaded ET_TIN irq %d\n",
        ET_VERSION, ET_PORT_TO_IRQ(ET_TIN) );

    //broke with or without the following
    intr->main_mask &= ~(0x000000ff);   /* enable timer ints */

    printk(KERN_INFO "et_init 00 intr->per_mask  %08x\n", intr->per_mask);
    printk(KERN_INFO "et_init 10 intr->ctrl      %08x\n", intr->ctrl);
    printk(KERN_INFO "et_init 14 intr->main_mask %08x\n", intr->main_mask);
    printk(KERN_INFO "et_init 24 intr->enc_stat  %08x\n", intr->enc_status);
    printk(KERN_INFO "et_init 28 intr->crit_stat %08x\n", 
intr->crit_status);
    printk(KERN_INFO "et_init 2c intr->main_stat %08x\n", 
intr->main_status);
    printk(KERN_INFO "et_init 30 intr->per_stat  %08x\n", intr->per_status);
    printk(KERN_INFO "et_init 38 intr->per_error %08x\n", intr->per_error);

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
thanks in advance for any help,

Frank Bennett

*//*




[-- Attachment #1.2: Type: text/html, Size: 5932 bytes --]

[-- Attachment #2: et.c --]
[-- Type: text/x-c, Size: 11242 bytes --]

/*
 * et.c - Driver for EMCO Timers 
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
 */

#include <linux/module.h>
#include <linux/config.h>
#include <linux/version.h>
#include <linux/types.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/config.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/proc_fs.h>

#include <asm/uaccess.h>
#include <asm/types.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/mpc5xxx.h>
#include <asm/emco_et.h>

#define CONFIG_PPC_5xxx_IPBFREQ 66000

#define	ET_VERSION	"0.1"
#define ET_NAME	"et"
#define ET_MSG	"et: "

#undef ET_EXCLUSIVE_OPEN

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Frank Bennett");
MODULE_DESCRIPTION("Emco Timers Driver");

#define ET_MAJOR	190
static int major = ET_MAJOR;
MODULE_PARM(major,"i");
MODULE_PARM_DESC(major, "Device major number (default=190)");

static struct mpc5xxx_gpt  *gpt    = (struct mpc5xxx_gpt  *)MPC5xxx_GPT;
// static struct mpc5xxx_gpio *gpio   = (struct mpc5xxx_gpio *)MPC5xxx_GPIO;
static struct mpc5xxx_intr *intr   = (struct mpc5xxx_intr *)MPC5xxx_INTR;
static unsigned long turbine_per;
static DECLARE_WAIT_QUEUE_HEAD(et_wait);

/*
 * ET timer related definitions:
 *
 */
#define ET_POUT        0   // Pulse Out
#define ET_KP_ACTIVE   1   // not KeyPad active (low) IN see gui.c
#define ET_TDIR        2   // Turbine DIR IN
#define ET_TIN         3   // Turbine PULSE IN
#define ET_52k         4   // start SAR convert
#define ET_RLY1        5   // RELAY 1 active low OUT
#define ET_RLY2        6   // RELAY 2 active low OUT
#define ET_BKL         7   // LCD Backlite OUT

#define ET_DELAY_US		10 /* in micro-seconds */

#define ET_PORT_TO_IRQ(port) (13 + port)
#define ET_IRQ_TO_PORT(irq)  (irq - 13)

#ifdef ET_EXCLUSICE_OPEN
static char et_is_open = 0;
#endif

static spinlock_t et_lock = SPIN_LOCK_UNLOCKED;

static void et_interrupt (int irq, void *dev_id, struct pt_regs * regs)
{	
    int port = ET_IRQ_TO_PORT(irq);
	unsigned long stat;

	printk(KERN_INFO "et_interrupt IRQ %d port %d main_stat %x gpt.sr %x \n", 
	 		  			irq, port, intr->main_status, gpt[port].sr ); 

    if( port == ET_TIN ) {
		// Clear pending interrupt 
		stat = in_be32(&gpt[port].sr) & 0xffff;
    	out_be32(&gpt[port].sr,  MPC5xxx_GPT_SR_CAPT);
    	printk(KERN_INFO "et_int irq=%d port=%d stat %0lx \n", irq, port, stat); 
		// wake_up_interruptible(&et_wait);
    } else {		
		printk(KERN_ERR ET_MSG "Unexpected IRQ %d received", irq); 
    }
	spin_lock (&et_lock);
	turbine_per = in_be32(&gpt[port].sr) >> 16;
	spin_unlock (&et_lock);
}

#ifdef CONFIG_PROC_FS
static int et_read_proc(char *page, char **start, off_t off,
                          int count, int *eof, void *data)
{
    *eof = 1;
    return count;
}

static int et_write_proc(struct file *file, const char *buffer,
			   unsigned long count, void *data)
{    
    if (count > 128)
		return -EINVAL;

    return count;
}
#endif

/*
 * Device file operations
 */

static int et_open(struct inode *inode, struct file *file)
{
#ifdef ET_EXCLUSICE_OPEN
    if (et_is_open != 0)
		return -EBUSY;
    et_is_open = 1;
#endif
	spin_lock_irq (&et_lock);
	turbine_per = 0L;
	spin_unlock_irq (&et_lock);
    return 0;
}

static int et_close(struct inode *inode, struct file *file)
{
#ifdef ET_EXCLUSICE_OPEN
    et_is_open = 0;
#endif
    return 0;
}

static int et_write (struct file *file, u8 *buf, 
			  size_t count, loff_t *ppos)
{
    printk(KERN_DEBUG "  et_write \n" );
	return 0;
} 

static size_t et_read (struct file *file, char *buf, 
			 size_t count, loff_t *ppos)
{
    DECLARE_WAITQUEUE(wait, current);
    unsigned long data;
    ssize_t retval;

    printk(KERN_DEBUG "  et_read \n" );

    if (count != sizeof (unsigned int) && count != sizeof (unsigned long))
        return -EINVAL;

//    add_wait_queue(&et_wait, &wait);

    while (1) {
        __set_current_state(TASK_INTERRUPTIBLE);
        spin_lock_irq (&et_lock);
        data = turbine_per;
        turbine_per = 0L;
        spin_unlock_irq (&et_lock);

        if (data != 0)
            break;

        if (file->f_flags & O_NONBLOCK) {
            retval = -EAGAIN;
            goto out;
        }
        if (signal_pending(current)) {
            retval = -ERESTARTSYS;
            goto out;
        }
        schedule();
    }
    if (count == sizeof(unsigned int))
        retval = put_user(data, (unsigned int *)buf);
    else
        retval = put_user(data, (unsigned long *)buf);
    if (!retval)
        retval = count;
 out:
    current->state = TASK_RUNNING;
//    remove_wait_queue(&et_wait, &wait);

    return retval;
}

static int et_ioctl (struct inode *inode, struct file *file, 
		      unsigned int cmd, unsigned long arg)
{
	unsigned long data;

	// printk(KERN_DEBUG "et_ioctl %04x %08lx\n", cmd, arg);
	switch (cmd) {
	case ET_POUT:
	case ET_52k:
	case ET_BKL: 
	case ET_RLY1: 
	case ET_RLY2:
		out_be32(&gpt[cmd].cr,  (arg & 0xffff0000) |1);  /* width, update_now */
    	out_be32(&gpt[cmd].cir, ((CONFIG_PPC_5xxx_IPBFREQ / 1000) << 16) | (arg&0xffff) ); // prescale, period
		break;
	case ET_TIN: 
		data = turbine_per;
		turbine_per = 0L;
		return copy_to_user((void *)arg, &data, sizeof data) ? -EFAULT : 0;
		break;
	case ET_TDIR:
	case ET_KP_ACTIVE: 
		data = (gpt[cmd].sr & MPC5xxx_GPT_SR_PIN)>>8;
		return copy_to_user((void *)arg, &data, sizeof data) ? -EFAULT : 0;

	//case ET_RLY1: 
	//case ET_RLY2:
	//	if( arg == 1L)
	//		out_be32(&gpt[cmd].emsr, MPC5xxx_GPT_EMSR_OUTPUT_1 | MPC5xxx_GPT_EMSR_INTERNAL);
	//	else
	//		out_be32(&gpt[cmd].emsr, MPC5xxx_GPT_EMSR_OUTPUT_0 | MPC5xxx_GPT_EMSR_INTERNAL);
	//	break;
	}
    return 0;
}

static struct file_operations et_fops = {
    owner: 		THIS_MODULE,
    open:  		et_open,
    release:  	et_close,
    read: 		et_read,
    write: 		et_write,
    ioctl: 		et_ioctl,
};

static void et_init_gpt(void)
{
	unsigned int per;

    /* Pulse Out   -      Timer 0 */
    out_be32(&gpt[ET_POUT].emsr, 
        MPC5xxx_GPT_EMSR_PWM | MPC5xxx_GPT_EMSR_CE | MPC5xxx_GPT_EMSR_CONTINOUS);

	/* Turbine in  - GPIO Timer 1 */
	turbine_per = 0L;
    out_be32(&gpt[ET_TIN].cir, (   66<<16) | 1 );  /* prescale(16), period(16)  */
    out_be32(&gpt[ET_TIN].emsr,
        MPC5xxx_GPT_EMSR_INP_CAPTURE | MPC5xxx_GPT_EMSR_ICT_FALLING | MPC5xxx_GPT_EMSR_INT_ENABLE);

	/* Turbine dir - GPIO Timer 2 */
    out_be32(&gpt[ET_TDIR].emsr,
        MPC5xxx_GPT_EMSR_INP_CAPTURE | MPC5xxx_GPT_EMSR_ICT_FALLING );

	/* 52k ref     - GPIO Timer 3 */
	per = 40 ; // 40 usec
    out_be32(&gpt[ET_52k].cr,  (per/2)<<16  | 1);     /* width, update_now */
    out_be32(&gpt[ET_52k].cir, (    33<<16) | per );  /* prescale(16), period(16)  */
    out_be32(&gpt[ET_52k].emsr,
         MPC5xxx_GPT_EMSR_PWM | MPC5xxx_GPT_EMSR_CE | MPC5xxx_GPT_EMSR_CONTINOUS);

	/* KP_active  - GPIO Timer 4 */
    out_be32(&gpt[ET_KP_ACTIVE].emsr,
        MPC5xxx_GPT_EMSR_INP_CAPTURE | MPC5xxx_GPT_EMSR_ICT_FALLING );

	/* Relay 1    - GPIO Timer 5 */
    out_be32(&gpt[ET_RLY1].emsr,
        MPC5xxx_GPT_EMSR_PWM | MPC5xxx_GPT_EMSR_CE | MPC5xxx_GPT_EMSR_CONTINOUS);
    //		MPC5xxx_GPT_EMSR_OUTPUT_1 | MPC5xxx_GPT_EMSR_INTERNAL);

	/* Relay 2    - GPIO Timer 5 */
    out_be32(&gpt[ET_RLY2].emsr,
        MPC5xxx_GPT_EMSR_PWM | MPC5xxx_GPT_EMSR_CE | MPC5xxx_GPT_EMSR_CONTINOUS);
 	//		MPC5xxx_GPT_EMSR_OUTPUT_1 | MPC5xxx_GPT_EMSR_INTERNAL);


	/* LCD BL Lite- GPIO Timer 7 */
	per = 4000 ; // 4 msec
    out_be32(&gpt[ET_BKL].cr,  (per/4)<<16  | 1);     /* width, update_now */
    out_be32(&gpt[ET_BKL].cir, (    66<<16) | per );  /* prescale(16), period(16)  */
    out_be32(&gpt[ET_BKL].emsr,
         MPC5xxx_GPT_EMSR_PWM | MPC5xxx_GPT_EMSR_CE | MPC5xxx_GPT_EMSR_CONTINOUS);
}

static int __init et_init (void)
{
#ifdef CONFIG_PROC_FS
    struct proc_dir_entry * proc;
#endif
    int ret = -ENODEV;
	
    ret = register_chrdev(ET_MAJOR, ET_NAME, &et_fops);
    if (ret < 0) {
		printk(KERN_ERR ET_MSG "Couldn't register " ET_NAME " driver\n");
		goto abort;
    }
    if (major == 0)
		major = ret;   /* dynamic */

#ifdef CONFIG_PROC_FS
    proc = create_proc_entry(ET_NAME, S_IFREG | S_IRUGO, NULL);
    if (proc == NULL) {
		printk(KERN_ERR ET_MSG "failed to create /proc/"ET_NAME"\n");
		goto abort_unregister;
    }
    proc->read_proc  = et_read_proc;
    proc->write_proc = et_write_proc;
#endif

	if (request_irq(ET_PORT_TO_IRQ(ET_TIN), et_interrupt, 0, "et Trubine", NULL)) {
			printk(KERN_ERR ET_MSG "couldn't register interrupts\n");
			goto abort_remove_proc;
    }
	et_init_gpt();

    printk(KERN_INFO "ET Display Driver v%s loaded ET_TIN irq %d\n", 
		ET_VERSION, ET_PORT_TO_IRQ(ET_TIN) );

	intr->main_mask &= ~(0x000000ff);	/* enable timer ints */
    printk(KERN_INFO "et_init 00 intr->per_mask  %08x\n", intr->per_mask);
    printk(KERN_INFO "et_init 10 intr->ctrl      %08x\n", intr->ctrl);
    printk(KERN_INFO "et_init 14 intr->main_mask %08x\n", intr->main_mask);
    printk(KERN_INFO "et_init 24 intr->enc_stat  %08x\n", intr->enc_status);
    printk(KERN_INFO "et_init 28 intr->crit_stat %08x\n", intr->crit_status);
    printk(KERN_INFO "et_init 2c intr->main_stat %08x\n", intr->main_status);
    printk(KERN_INFO "et_init 30 intr->per_stat  %08x\n", intr->per_status);
    printk(KERN_INFO "et_init 38 intr->per_error %08x\n", intr->per_error);

	sti();

/*
    volatile u32        per_mask;    // INTR + 0x00 
    volatile u32        per_pri1;    // INTR + 0x04
    volatile u32        per_pri2;    // INTR + 0x08
    volatile u32        per_pri3;    // INTR + 0x0c
    volatile u32        ctrl;        // INTR + 0x10
    volatile u32        main_mask;   // INTR + 0x14
    volatile u32        main_pri1;   // INTR + 0x18
    volatile u32        main_pri2;   // INTR + 0x1c
    volatile u32        reserved1;   // INTR + 0x20
    volatile u32        enc_status;  // INTR + 0x24
    volatile u32        crit_status; // INTR + 0x28
    volatile u32        main_status; // INTR + 0x2c
    volatile u32        per_status;  // INTR + 0x30
    volatile u32        reserved2;   // INTR + 0x34
    volatile u32        per_error;   // INTR + 0x38
*/

    return 0;
	
 abort_remove_proc:
    remove_proc_entry(ET_NAME,  NULL);
 abort_unregister:
    unregister_chrdev(major, ET_NAME);	
 abort:
    return ret;
}

static void __devexit et_cleanup (void)
{
    free_irq(ET_PORT_TO_IRQ(ET_TIN), NULL);
    remove_proc_entry(ET_NAME,  NULL);
    unregister_chrdev(major, ET_NAME);
    printk(KERN_INFO "ET Display Driver v%s unloaded\n", ET_VERSION);
}

EXPORT_NO_SYMBOLS;

module_init(et_init)
module_exit(et_cleanup)


^ permalink raw reply

* Re: ibook1 hangs during boot, atyfb broken
From: Heikki Lindholm @ 2006-02-24 13:23 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Olaf Hering
In-Reply-To: <1140779302.8264.79.camel@localhost.localdomain>

Benjamin Herrenschmidt kirjoitti:
>>Using an older DVI TiBook, atyfb has been broken at least since 2.6.8 or 
>>so, and still is with 2.6.15, in that it can't seem to synchronize with 
>>the LCD and maybe 50% of the (re-)boots produce just more-or-less 
>>shimmering/flashing garbage on screen. Doesn't completely hang though...
> 
> 
> Except that no tibook ever used atyfb...

Damn straight! I stand corrected (confused with one PC laptop), it's the 
radeon thing then..

-- Heikki Lindholm

^ permalink raw reply

* Re: PQ2FADS_ZU: u-boot-1.1.4, eldk.3.1.1, linux-2.4.25 boots problem
From: Vitaly Bordug @ 2006-02-24 12:54 UTC (permalink / raw)
  Cc: linuxppc-embedded
In-Reply-To: <OFB33741BA.EBB350F9-ON4825711F.003669C0@uk.marconicomms.com>

On Fri, 24 Feb 2006 18:03:21 +0800
"KokHow Teh" <KokHow.Teh@marconi.com> wrote:

> Hi;
>       I use the above software, apply linuxppc-2005-03-06-2006-02-15.patch
> from http://mpc8260sar.sourceforge.net/, `make PQ2FADS_config`, not using
> devfs and never manage to boot the kernel:
> 
> u-boot>  printenv
> ramboot=setenv bootargs root=/dev/ram rw;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile
> ;bootm $loadaddr $ramdiskaddr
> bootdelay=10
> baudrate=115200
> ethaddr=08:00:3E:33:44:56
> ipaddr=147.128.28.44
> serverip=147.128.28.42
> rootpath="/fadsroot"
> gatewayip=147.128.28.1
> netmask=255.255.254.0
> hostname=PQ2FADS-ZU
> bootfile="uImage.linux"
> netdev=eth0
> ramdiskaddr=400000
> ramdiskfile=uInitRD
> ethact=FCC2 ETHERNET
> testdramdata=y
> testdramaddress=y
> testdramwalk=n
> x86_run_bios=on
> bootcmd=run nfsboot
> nfsargs=setenv bootargs $bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath
> setconsole=setenv bootargs $console
> addip=setenv bootargs $bootargs ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off
> loadaddr=0x1000000
> nfsboot=tftp $loadaddr $bootfile; run setconsole nfsargs addip; echo $bootargs; bootm
> console=console=ttyS0,115200n8 console=tty0
> stdin=serial
> stdout=serial
> stderr=serial
> 
> Environment size: 891/262140 bytes
> u-boot>
> u-boot> boot
> Using FCC2 ETHERNET device
> TFTP from server 147.128.28.42; our IP address is 147.128.28.44
> Filename 'uImage.linux'.
> Load address: 0x1000000
> Loading: #################################################################
>          #################################################################
>          ######################################################
> done
> Bytes transferred = 941606 (e5e26 hex)
> console=ttyS0,115200n8 console=tty0 root=/dev/nfs rw nfsroot=147.128.28.42:/fadsroot ip=147.128.
> 28.44:147.128.28.42:147.128.28.1:255.255.254.0:PQ2FADS-ZU:eth0:off
> ## Booting image at 01000000 ...
>    Image Name:   Linux Kernel Image
>    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>    Data Size:    941542 Bytes = 919.5 kB
>    Load Address: 00000000
>    Entry Point:  00000000
>    Verifying Checksum ... OK
>    Uncompressing Kernel Image ... OK
> 
> 
> U-Boot 1.1.4 (Feb 15 2006 - 16:19:49)
> 
> MPC8260 Reset Status: Check Stop, External Soft, External Hard
> 
> 
>       I have tried console=ttyCPM0,115200n8 console=tty0 and it makes no difference. BTW, which one should be used for serial console in 2.4.x kernel
> for this PowerQUICC II 8280 platform? ttySx or ttyCPMx?
>       Any insight is appreciated.
> 
> Regards,
> TEH
> 
> 
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> 
> 

The right thing is ttyS0 for 2.4.x... 
First, if that will not help, I suggest to comment out the PCI initialization code, and to see if it will help.

-- 
Sincerely, 
Vitaly

^ permalink raw reply

* PQ2FADS_ZU: u-boot-1.1.4, eldk.3.1.1, linux-2.4.25 boots problem
From: Heiko Schocher @ 2006-02-24 10:47 UTC (permalink / raw)
  To: Linuxppc-Embedded@Ozlabs. Org

Hello,

I think your Environmentsettings are bogus:

your Environmentsettings:
> setconsole=setenv bootargs $console
[...]
> nfsboot=tftp $loadaddr $bootfile; run setconsole nfsargs addip; echo $bootargs; bootm
> console=console=ttyS0,115200n8 console=tty0

try this Environmentsettings:

addcons=setenv bootargs $(bootargs) console=ttyS0,115200
nfsboot=tftp $loadaddr $bootfile; run nfsargs addip addcons; echo $bootargs; bootm

> I have tried console=ttyCPM0,115200n8 console=tty0 and it makes no difference.

try console=ttyS0,115200

> BTW, which one should be used for serial console in 2.4.x kernel
> for this PowerQUICC II 8280 platform? ttySx or ttyCPMx?

If you have a 2.4.x Kernel, you must use ttySx, on a 2.6.x Kernel
it is ttyCPMx

Is there anything in the log_buf? Try a

http://www.denx.de/wiki/view/DULG/LinuxPostMortemAnalysis

Best regards

Heiko

^ permalink raw reply

* Re: ibook1 hangs during boot, atyfb broken
From: Benjamin Herrenschmidt @ 2006-02-24 11:08 UTC (permalink / raw)
  To: Heikki Lindholm; +Cc: linuxppc-dev, Olaf Hering
In-Reply-To: <43FEB064.1@cs.helsinki.fi>


> Using an older DVI TiBook, atyfb has been broken at least since 2.6.8 or 
> so, and still is with 2.6.15, in that it can't seem to synchronize with 
> the LCD and maybe 50% of the (re-)boots produce just more-or-less 
> shimmering/flashing garbage on screen. Doesn't completely hang though...

Except that no tibook ever used atyfb...

Ben.

^ permalink raw reply

* PQ2FADS_ZU: u-boot-1.1.4, eldk.3.1.1, linux-2.4.25 boots problem
From: KokHow Teh @ 2006-02-24 10:03 UTC (permalink / raw)
  To: linuxppc-embedded

Hi;
      I use the above software, apply linuxppc-2005-03-06-2006-02-15.patch
from http://mpc8260sar.sourceforge.net/, `make PQ2FADS_config`, not using
devfs and never manage to boot the kernel:

u-boot>  printenv
ramboot=setenv bootargs root=/dev/ram rw;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile
;bootm $loadaddr $ramdiskaddr
bootdelay=10
baudrate=115200
ethaddr=08:00:3E:33:44:56
ipaddr=147.128.28.44
serverip=147.128.28.42
rootpath="/fadsroot"
gatewayip=147.128.28.1
netmask=255.255.254.0
hostname=PQ2FADS-ZU
bootfile="uImage.linux"
netdev=eth0
ramdiskaddr=400000
ramdiskfile=uInitRD
ethact=FCC2 ETHERNET
testdramdata=y
testdramaddress=y
testdramwalk=n
x86_run_bios=on
bootcmd=run nfsboot
nfsargs=setenv bootargs $bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath
setconsole=setenv bootargs $console
addip=setenv bootargs $bootargs ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off
loadaddr=0x1000000
nfsboot=tftp $loadaddr $bootfile; run setconsole nfsargs addip; echo $bootargs; bootm
console=console=ttyS0,115200n8 console=tty0
stdin=serial
stdout=serial
stderr=serial

Environment size: 891/262140 bytes
u-boot>
u-boot> boot
Using FCC2 ETHERNET device
TFTP from server 147.128.28.42; our IP address is 147.128.28.44
Filename 'uImage.linux'.
Load address: 0x1000000
Loading: #################################################################
         #################################################################
         ######################################################
done
Bytes transferred = 941606 (e5e26 hex)
console=ttyS0,115200n8 console=tty0 root=/dev/nfs rw nfsroot=147.128.28.42:/fadsroot ip=147.128.
28.44:147.128.28.42:147.128.28.1:255.255.254.0:PQ2FADS-ZU:eth0:off
## Booting image at 01000000 ...
   Image Name:   Linux Kernel Image
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    941542 Bytes = 919.5 kB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK


U-Boot 1.1.4 (Feb 15 2006 - 16:19:49)

MPC8260 Reset Status: Check Stop, External Soft, External Hard


      I have tried console=ttyCPM0,115200n8 console=tty0 and it makes no difference. BTW, which one should be used for serial console in 2.4.x kernel
for this PowerQUICC II 8280 platform? ttySx or ttyCPMx?
      Any insight is appreciated.

Regards,
TEH

^ permalink raw reply

* Re: UTOPIA support for MPC885 with 2.6.15 kernel
From: Alex Zeffertt @ 2006-02-24  9:50 UTC (permalink / raw)
  To: Pelton, Dave; +Cc: linuxppc-embedded
In-Reply-To: <3B9518857C91E345AA1806A6F53C0EB701596AF2@onmxm01.ciena.com>

Hi Dave,

I maintain the mpc860sar project - although it hasn't required much
maintenance for the past year or so.

Nobody has told me about any linux-2.6 port, so it's possible you are
the first to do this.

If you are happy with your port I'd appreciate it if you sent me a
patch which I would then consider adding to the site.

FYI, I also maintain a  PQII driver called mpc8260sar, and I have
been sent a patch which added support for linux-2.6 without breaking
linux-2.4, so I added this to the sourceforge project.  If you like
I'll send you the PQII linux-2.6 patch as a guide for how to do it for
the original PQI driver.

Alex


On Fri, 24 Feb 2006 00:54:39 -0500
"Pelton, Dave" <dpelton@ciena.com> wrote:

> Hello,
> 
> I am currently working with a MPC885ADS board running a 2.6.15
> kernel build.  I have been attempting to get the UTOPIA interface
> working, but I have not been able to find kernel code (or patches)
> to do this.  
> 
> The closest I have found so far is the MPC860/862 ATM driver on
> SourceForge.  Unfortunately this driver was written for the 2.4
> kernel, and does not include MPHY support for ESAR mode.  I have
> been able to get this code to compile and run on my kernel, and now
> I am digging into the ESAR/MPHY support stuff.  
> 
> I was wondering if anyone else has already done anything along these
> lines (either a ESAR/MPHY driver or MPC855 UTOPIA support on the 2.6
> kernel), as I would prefer to build on existing code rather than
> gluing this stuff together myself.
> 
> - Thanks,
>   David Pelton.
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

^ permalink raw reply

* Re: ibook1 hangs during boot, atyfb broken
From: Olaf Hering @ 2006-02-24  9:16 UTC (permalink / raw)
  To: Heikki Lindholm; +Cc: linuxppc-dev
In-Reply-To: <43FEB064.1@cs.helsinki.fi>

 On Fri, Feb 24, Heikki Lindholm wrote:

> Using an older DVI TiBook, atyfb has been broken at least since 2.6.8 or 

atyfb vs. aty128fb.

^ permalink raw reply

* command to check debug objects
From: Subramanian Olagappan @ 2006-02-24  7:43 UTC (permalink / raw)
  To: linuxppc-dev

Hi,

I am looking for the command to see if the .o's or .lib is generated
using -g [ debug ] objects.

tried with readelf , but would like to know the exact options to use on
power pc.

Thanks,
ols

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply

* Re: ibook1 hangs during boot, atyfb broken
From: Heikki Lindholm @ 2006-02-24  7:06 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Olaf Hering
In-Reply-To: <1140752928.8264.72.camel@localhost.localdomain>

Benjamin Herrenschmidt kirjoitti:
> On Fri, 2006-02-24 at 00:24 +0100, Olaf Hering wrote:
> 
>>My iBook1 did not work with recent kernels (2.6.15+), 2.6.13 was always ok.
>>Today I did some more testing, with 2.6.16-rc4-git3.
>>If I boot with 'quiet panic=1 root=/dev/blah', it will hang in 75% of the boots 
>>before displaying the penguin.
>>Adding video=atyfb:off did fix it, tried it a few times. Then I removed
>>the quiet and video= option, and it did boot again. Then I reverted the
>>atyfb to 2.6.15 status and did a reboot loop.
>>Unfortunately, after 13 reboots with just 'panic=1 root=/x' it was stuck, after 
>>time_init: processor frequency = 300MHz.
> 
> 
> It boots with video=atyfb:noaccel ?
> 
> I suggest you report that to the linux-fbdev mailing list. That problem
> seems to happen with some wallstreet powerbooks too, there is definitely
> something broken there...

Using an older DVI TiBook, atyfb has been broken at least since 2.6.8 or 
so, and still is with 2.6.15, in that it can't seem to synchronize with 
the LCD and maybe 50% of the (re-)boots produce just more-or-less 
shimmering/flashing garbage on screen. Doesn't completely hang though...

-- Heikki Lindholm

^ permalink raw reply

* Re: parsing of some early cmdline options
From: Kumar Gala @ 2006-02-24  7:14 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev
In-Reply-To: <200602241040.54060.michael@ellerman.id.au>


On Feb 23, 2006, at 5:40 PM, Michael Ellerman wrote:

> On Fri, 24 Feb 2006 10:19, Benjamin Herrenschmidt wrote:
>> On Thu, 2006-02-23 at 17:02 -0600, Kumar Gala wrote:
>>> Guys,
>>>
>>> I noticed that we have code in arch/powerpc/kernel/prom_init.c to  
>>> handle
>>> parsing iommu=, mem=, and crashkernel=.
>>>
>>> The problem I have is that we only use/build prom_init.c on  
>>> MULTIPLATFORM
>>> (coming from true OF).
>
>>> Any ideas on how to handle this for the !MULTIPLATFORM cases.   
>>> I'm most
>>> concerned about mem=.
>
> mem= is a bit tricky because you need to know about it really  
> early, otherwise
> your bootloader might violate the limit. But we could certainly  
> check for it
> again in prom.c. And you can always just set /chosen/linux,memory- 
> limit.

Agreed, I'm looking at adding "early" cmd_line parsing in  
early_init_dt_scan_chosen().  I assume we agree that mem= on command  
line overrides "linux,memory-limit".  I guessing that "linux,memory- 
limit" is only ever created in prom_init.c which would be from a mem=  
parsing.

- k

^ permalink raw reply

* UTOPIA support for MPC885 with 2.6.15 kernel
From: Pelton, Dave @ 2006-02-24  5:54 UTC (permalink / raw)
  To: linuxppc-embedded

Hello,

I am currently working with a MPC885ADS board running a 2.6.15 kernel
build.  I have been attempting to get the UTOPIA interface working, but
I have not been able to find kernel code (or patches) to do this. =20

The closest I have found so far is the MPC860/862 ATM driver on
SourceForge.  Unfortunately this driver was written for the 2.4 kernel,
and does not include MPHY support for ESAR mode.  I have been able to
get this code to compile and run on my kernel, and now I am digging into
the ESAR/MPHY support stuff. =20

I was wondering if anyone else has already done anything along these
lines (either a ESAR/MPHY driver or MPC855 UTOPIA support on the 2.6
kernel), as I would prefer to build on existing code rather than gluing
this stuff together myself.

- Thanks,
  David Pelton.

^ permalink raw reply

* Re: ibook1 hangs during boot, atyfb broken
From: Benjamin Herrenschmidt @ 2006-02-24  3:48 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linuxppc-dev
In-Reply-To: <20060223232423.GA29454@suse.de>

On Fri, 2006-02-24 at 00:24 +0100, Olaf Hering wrote:
> My iBook1 did not work with recent kernels (2.6.15+), 2.6.13 was always ok.
> Today I did some more testing, with 2.6.16-rc4-git3.
> If I boot with 'quiet panic=1 root=/dev/blah', it will hang in 75% of the boots 
> before displaying the penguin.
> Adding video=atyfb:off did fix it, tried it a few times. Then I removed
> the quiet and video= option, and it did boot again. Then I reverted the
> atyfb to 2.6.15 status and did a reboot loop.
> Unfortunately, after 13 reboots with just 'panic=1 root=/x' it was stuck, after 
> time_init: processor frequency = 300MHz.

It boots with video=atyfb:noaccel ?

I suggest you report that to the linux-fbdev mailing list. That problem
seems to happen with some wallstreet powerbooks too, there is definitely
something broken there...

Ben.

^ permalink raw reply

* RE: boot failure on lite5200b board
From: #LI JIANGGAN# @ 2006-02-24  3:31 UTC (permalink / raw)
  To: John Rigby; +Cc: linuxppc-embedded
In-Reply-To: <4b73d43f0602230818w63423513n817d9ec7eb580d2c@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 8800 bytes --]

I have actually tried both kernel with both console configurations. It gave the same output, thus I presume that the problem lies somewhere else. I attached the log to this email. 

the board is Lite5200B Version 1.0. Which .config file do you want?

Sylvain, we have ordered a debugging set but we are still waiting for delivery, the leaking time is said to be one month, tant pis. And the log I attached here are booting from a higher address (0x500000).

My current u-boot args:
Autostarting. Press any key to abort..

Hit any key to stop autoboot:  0
=> printenv
baudrate=115200
autoload=no
ethact=FEC ETHERNET
flshroot=root=/dev/mtdblock2 rw
ethaddr=00:01:9F:00:27:2F
preboot=echo; echo Autostarting. Press any key to abort..; echo
bootdelay=5
hostname=icecube
bootfile=MPC5200/uImage
nv=nfsroot root=/dev/nfs rw nfsroot=10.190.3.113:/opt/eldk/rootfs
ip=ip=10.190.3.144:10.190.3.103:10.190.3.103:255.255.240.0:icecube::off
nfsroot=root=/dev/nfs rw nfsroot=10.190.3.103:/opt/eldk-4-0/rootfs
bootcmd=run net_nfs
filesize=546
fileaddr=500000
netmask=255.255.240.0
ipaddr=10.190.3.144
serverip=10.190.3.103
setconsole=setenv bootargs console=ttyPSC0, 115200n8 console=tty1
rootfs=root=/dev/nfs rw nfsroot=10.190.3.103:/opt/eldk-4-0/rootfs
bootargs=env bootargs root=/dev/nfs rw nfsroot=10.190.3.103:/opt/eldk-4-0/rootfs ip=10.190.3.144:10.190.3.103:10.190.3.103:255.255.240.0:icecube::off
flash_nfs=run setconsole nfsargs addip;bootm
net_nfs=tftp 500000 MPC5200/uImage;run setconsole nfsargs addip;bootm
nfsargs=setenv bootargs env bootargs root=/dev/nfs rw nfsroot=10.190.3.103:/opt/eldk-4-0/rootfs ip=10.190.3.144:10.190.3.103:10.190.3.103:255.255.240.0:icecube::offroot=/dev/nfs rw
addip=setenv bootargs env bootargs root=/dev/nfs rw nfsroot=10.190.3.103:/opt/eldk-4-0/rootfs ip=10.190.3.144:10.190.3.103:10.190.3.103:255.255.240.0:icecube::off
ramargs=setenv bootargs root=/dev/ram rw
console=console=ttyS0,115200n8 console=tty1
stdin=serial
stdout=serial
stderr=serial

Environment size: 1472/65532 bytes
=>                            




USING Sylvain's KERNEL:

U-Boot 1.1.3 (Feb  6 2006 - 09:56:46)

CPU:   MPC5200 v2.2 at 462 MHz
       Bus 132 MHz, IPB 132 MHz, PCI 33 MHz
Board: Freescale MPC5200 (Lite5200B)
I2C:   85 kHz, ready
DRAM:  256 MB
FLASH: 32 MB
PCI:   Bus Dev VenId DevId Class Int
        00  1a  1057  5809  0680  00
In:    serial
Out:   serial
Err:   serial
Net:   FEC ETHERNET
IDE:   Bus 0: OK
  Device 0: not available
  Device 1: not available

Autostarting. Press any key to abort..

Hit any key to stop autoboot:  0
Using FEC ETHERNET device
TFTP from server 10.190.3.103; our IP address is 10.190.3.144
Filename 'MPC5200/uImage'.
Load address: 0x500000
Loading: #################################################################
         ################################################################
done
Bytes transferred = 658114 (a0ac2 hex)
## Booting image at 00500000 ...
   Image Name:   Linux-2.6.16-rc1
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    658050 Bytes = 642.6 kB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
id mach(): done
MMU:enter
MMU:hw init
MMU:mapin
MMU:setio
MMU:exit
setup_arch: enter
setup_arch: bootmem
arch: exit



USING KERNEL FROM Freescale:

U-Boot 1.1.3 (Feb  6 2006 - 09:56:46)

CPU:   MPC5200 v2.2 at 462 MHz
       Bus 132 MHz, IPB 132 MHz, PCI 33 MHz
Board: Freescale MPC5200 (Lite5200B)
I2C:   85 kHz, ready
DRAM:  256 MB
FLASH: 32 MB
PCI:   Bus Dev VenId DevId Class Int
        00  1a  1057  5809  0680  00
In:    serial
Out:   serial
Err:   serial
Net:   FEC ETHERNET
IDE:   Bus 0: OK
  Device 0: not available
  Device 1: not available

Autostarting. Press any key to abort..

Hit any key to stop autoboot:  0
Using FEC ETHERNET device
TFTP from server 10.190.3.103; our IP address is 10.190.3.144
Filename 'MPC5200/uImage'.
Load address: 0x500000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###################################
done
Bytes transferred = 1510143 (170aff hex)
## Booting image at 00500000 ...
   Image Name:   Linux-2.6.11.7
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1510079 Bytes =  1.4 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
id mach(): done
MMU:enter
MMU:hw init
MMU:mapin
MMU:setio
MMU:exit
setup_arch: enter
setup_arch: bootmem
ocp: exit
arch: exit



-----Original Message-----
From: John Rigby [mailto:jcrigby@gmail.com]
Sent: Fri 2/24/2006 0:18
To: #LI JIANGGAN#
Subject: Re: boot failure on lite5200b board
 
If you are using Sylvain's kernel you need to set console=ttyPSC0.  If you are
using a kernel from Freescale then you need to set console=ttyS0.

Also what rev of the board do you have?



On 2/23/06, #LI JIANGGAN# <lijianggan@pmail.ntu.edu.sg> wrote:
>
>
> Thank you José María and Andrey for your advices, however the problem
> remains. I've tried setting the console (though I remember that our previous
> lite5200 board was working fine on kernel 2.4 without setting the console);
> meantime, I've set the booting image to 0x500000; I have also tried using
> the kernel image come together with the BSP, it's always the same error.
>
>  Sylvain, I've actually using your kernel source, the compiled image is
> around 700k (compared to the 1.4M image from the BSP), but it doesn't solve
> the problem. So I presume that the problem is lying somewhere else.
>
>  A SNAPSHOT OF THE BOOTING MESSAGES:
>
>
>  U-Boot 1.1.3 (Feb  6 2006 - 09:56:46)
>
>  CPU:   MPC5200 v2.2 at 462 MHz
>         Bus 132 MHz, IPB 132 MHz, PCI 33 MHz
>  Board: Freescale MPC5200 (Lite5200B)
>  I2C:   85 kHz, ready
>  DRAM:  256 MB
>  FLASH: 32 MB
>  PCI:   Bus Dev VenId DevId Class Int
>          00  1a  1057  5809  0680  00
>  In:    serial
>  Out:   serial
>  Err:   serial
>  Net:   FEC ETHERNET
>  IDE:   Bus 0: OK
>    Device 0: not available
>    Device 1: not available
>
>  Autostarting. Press any key to abort..
>
>  Hit any key to stop autoboot:  0
>  Using FEC ETHERNET device
>  TFTP from server 10.190.3.103; our IP address is 10.190.3.144
>  Filename 'MPC5200/uImage'.
>  Load address: 0x100000
>  Loading:
> #################################################################
>
> ################################################################
>  done
>  Bytes transferred = 658114 (a0ac2 hex)
>  ## Booting image at 00100000 ...
>     Image Name:   Linux-2.6.16-rc1
>     Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>     Data Size:    658050 Bytes = 642.6 kB
>     Load Address: 00000000
>     Entry Point:  00000000
>     Verifying Checksum ... OK
>     Uncompressing Kernel Image ... OK
>  id mach(): done
>  MMU:enter
>  MMU:hw init
>  MMU:mapin
>  MMU:setio
>  MMU:exit
>  setup_arch: enter
>  setup_arch: bootmem
>  arch: exit
>
>
>  I am wondering whether it's a kernel problem or more likely to be a problem
> lying with the U-boot. It seems to hang when executing setup_arch()
> function, or maybe there is sth else behind the wall?
>
>  Regards,
>  Jianggan LI
>
>
>
>
>  -----Original Message-----
>  From: Sylvain Munaut [mailto:tnt@246tNt.com]
>  Sent: Thu 2/23/2006 15:38
>  To: #LI JIANGGAN#
>  Cc: linuxppc-embedded@ozlabs.org
>  Subject: Re: boot failure on lite5200b board
>
>  #LI JIANGGAN# wrote:
>  > Hello all,
>  >
>  > For my end-of-study project, I am working on an embedded system with
>  > reference of freescale's lite5200b reference board. I was trying to boot
>  > Linux 2.6.15 on the board (with the fec and bestcomm corrected). however
>  > the booting was stuck at the following stage:
>
>  In addition to what has already been said (use a higher address for the
>  image and don't forget console=ttyPSC0 in kernel command line), make
>  sure you use the kernel from my git tree, it contains a few patches from
>  John Rigby to add support for the lite5200b.
>
>  Please report if it works, I've not been able to test those myself since
>  i'm still on lite5200.
>
>
>          Sylvain
>
>
>
>
>
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>



[-- Attachment #2: Type: text/html, Size: 12521 bytes --]

^ permalink raw reply

* please pull powerpc-merge.git
From: Paul Mackerras @ 2006-02-24  2:36 UTC (permalink / raw)
  To: torvalds; +Cc: linuxppc-dev

Linus,

I have pulled out the problematic commit, so please do a pull from

git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge.git

There are 14 commits there: fixes for various bugs and a performance
regression, plus a defconfig update.

Thanks,
Paul.

Alan Curry:
      powerpc: fix altivec_unavailable_exception Oopses

Anton Blanchard:
      powerpc: Fix runlatch performance issues
      powerpc64: remove broken/bitrotted HMT support

Haren Myneni:
      powerpc: Trivial fix to set the proper timeout value for kdump

Kelly Daly:
      powerpc: disable OProfile for iSeries

Kumar Gala:
      powerpc: Enable coherency for all pages on 83xx to fix PCI data corruption

Michael Ellerman:
      powerpc: Initialise hvlpevent_queue.lock correctly
      powerpc: Only calculate htab_size in one place for kexec

Michal Ostrowski:
      Fix race condition in hvc console.

Olaf Hering:
      ppc: fix adb breakage in xmon

Olof Johansson:
      powerpc: Update {g5,pseries,ppc64}_defconfig

R Sharada:
      powerpc64: fix spinlock recursion in native_hpte_clear

Segher Boessenkool:
      powerpc: Fix some MPIC + HT APIC buglets
      powerpc: Don't re-assign PCI resources on Maple

 arch/powerpc/configs/g5_defconfig         |  174 ++++++++++--------------
 arch/powerpc/configs/ppc64_defconfig      |  173 ++++++++++--------------
 arch/powerpc/configs/pseries_defconfig    |  127 ++++++-----------
 arch/powerpc/kernel/crash.c               |    4 -
 arch/powerpc/kernel/head_32.S             |    1 
 arch/powerpc/kernel/head_64.S             |  109 +--------------
 arch/powerpc/kernel/machine_kexec_64.c    |   10 -
 arch/powerpc/kernel/process.c             |   32 ++++
 arch/powerpc/kernel/prom_init.c           |   38 -----
 arch/powerpc/mm/hash_native_64.c          |    7 +
 arch/powerpc/mm/hash_utils_64.c           |    3 
 arch/powerpc/oprofile/Kconfig             |    1 
 arch/powerpc/platforms/iseries/lpevents.c |    2 
 arch/powerpc/platforms/iseries/setup.c    |    1 
 arch/powerpc/platforms/maple/pci.c        |    4 -
 arch/powerpc/platforms/pseries/Kconfig    |    7 -
 arch/powerpc/sysdev/mpic.c                |    9 +
 arch/ppc/kernel/head.S                    |    1 
 arch/ppc/xmon/adb.c                       |  212 -----------------------------
 arch/ppc/xmon/start.c                     |  169 -----------------------
 arch/ppc/xmon/xmon.c                      |  108 ---------------
 drivers/char/hvc_console.c                |    8 +
 include/asm-powerpc/cputable.h            |    9 +
 include/asm-powerpc/mmu.h                 |    1 
 include/asm-powerpc/reg.h                 |   33 -----
 include/asm-powerpc/thread_info.h         |    4 -
 26 files changed, 274 insertions(+), 973 deletions(-)
 delete mode 100644 arch/ppc/xmon/adb.c

^ permalink raw reply

* Re: please pull powerpc-merge.git
From: Paul Mackerras @ 2006-02-24  0:19 UTC (permalink / raw)
  To: torvalds; +Cc: linuxppc-dev
In-Reply-To: <17405.42237.285728.981952@cargo.ozlabs.ibm.com>

Linus,

Please hold off from pulling powerpc-merge.git for now, if you haven't
already done the pull.  Stephen Rothwell has just convinced me that a
1-line change from Olaf Hering is in fact wrong, so I'll pull that
change out.  If you have pulled I'll just do a reverting commit.  (The
commit in question is 847db200a647058f6af883da3474b867617b7273.)

Paul.

^ permalink raw reply

* Re: [PATCH] change compat shmget size arg to signed
From: Stephen Rothwell @ 2006-02-24  0:12 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linuxppc64-dev, linuxppc-dev
In-Reply-To: <20060223232717.GB29454@suse.de>

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

On Fri, 24 Feb 2006 00:27:17 +0100 Olaf Hering <olh@suse.de> wrote:
>
>  On Fri, Feb 24, Stephen Rothwell wrote:
> 
> > Does the ltp test fail on a standard kernel(where SHMMAX is 0x2000000), or
> > only on a SLES kernel (where SHMMAX is ULONG_MAX)?
> 
> It fails with SLES9 and SLES10. SLES9 has 0x2000000 as default.

So what was shm_ctlmax set to when the test was run.

I am trying to figure out why this test:

if (size < SHMMIN || size > shm_ctlmax)
                return -EINVAL;

Doesn't return -EINVAL for size == 0xffffffff if shm_ctlmax is 0x2000000?

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [PATCH] ppc32: handle Book E debug exceptions on kernel stack
From: David Gibson @ 2006-02-23 23:49 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Paul Mackerras, linuxppc-embedded
In-Reply-To: <Pine.LNX.4.44.0602222217220.28948-100000@gate.crashing.org>

On Wed, Feb 22, 2006 at 10:19:54PM -0600, Kumar Gala wrote:
> On Tue, 14 Feb 2006, Dale Farnsworth wrote:
> 
> > From: Dale Farnsworth <dale@farnsworth.org>
> > 
> > On PPC Book E processsors, we currently handle debug
> > exceptions on the critical exception stack (debug stack
> > for E200).  This causes problems with the kgdb single
> > step handler, which calls smp_processor_id() and spin_lock(),
> > which reference current_thread_info(), which only works when
> > we are on the kernel stack.
> > 
> > We address this by switching to the kernel stack early while
> > handling debug exceptions.  Note that the entry values of r10
> > and r11 are still saved on the critical exception (or debug) stack.
> > 
> > Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
> > 
> 
> Paul,
> 
> We were wondering if you or David remember why a specific critical
> exception stack was added in the 40x port from 2.4 to 2.6?

I don't, in any detail.  But did it have to do with a possible race
with a critical exception in just the wrong part of the normal
exception exit path.  ISTR BenH was worried about something in that
area.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* Re: parsing of some early cmdline options
From: Michael Ellerman @ 2006-02-23 23:40 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <1140736753.8264.55.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

On Fri, 24 Feb 2006 10:19, Benjamin Herrenschmidt wrote:
> On Thu, 2006-02-23 at 17:02 -0600, Kumar Gala wrote:
> > Guys,
> >
> > I noticed that we have code in arch/powerpc/kernel/prom_init.c to handle
> > parsing iommu=, mem=, and crashkernel=.
> >
> > The problem I have is that we only use/build prom_init.c on MULTIPLATFORM
> > (coming from true OF).

> > Any ideas on how to handle this for the !MULTIPLATFORM cases.  I'm most
> > concerned about mem=.

mem= is a bit tricky because you need to know about it really early, otherwise 
your bootloader might violate the limit. But we could certainly check for it 
again in prom.c. And you can always just set /chosen/linux,memory-limit.

cheers

-- 
Michael Ellerman
IBM OzLabs

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [PATCH] change compat shmget size arg to signed
From: Olaf Hering @ 2006-02-23 23:27 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: ppc64-dev, ppc-dev
In-Reply-To: <20060224101644.548b0c24.sfr@canb.auug.org.au>

 On Fri, Feb 24, Stephen Rothwell wrote:

> Does the ltp test fail on a standard kernel(where SHMMAX is 0x2000000), or
> only on a SLES kernel (where SHMMAX is ULONG_MAX)?

It fails with SLES9 and SLES10. SLES9 has 0x2000000 as default.

^ permalink raw reply

* ibook1 hangs during boot, atyfb broken
From: Olaf Hering @ 2006-02-23 23:24 UTC (permalink / raw)
  To: linuxppc-dev


My iBook1 did not work with recent kernels (2.6.15+), 2.6.13 was always ok.
Today I did some more testing, with 2.6.16-rc4-git3.
If I boot with 'quiet panic=1 root=/dev/blah', it will hang in 75% of the boots 
before displaying the penguin.
Adding video=atyfb:off did fix it, tried it a few times. Then I removed
the quiet and video= option, and it did boot again. Then I reverted the
atyfb to 2.6.15 status and did a reboot loop.
Unfortunately, after 13 reboots with just 'panic=1 root=/x' it was stuck, after 
time_init: processor frequency = 300MHz.

"panic=1 root=/dev/blah video=atyfb:off" works better, 27 reboots and
still going.

^ permalink raw reply

* Re: parsing of some early cmdline options
From: Benjamin Herrenschmidt @ 2006-02-23 23:19 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <Pine.LNX.4.44.0602231658210.16092-100000@gate.crashing.org>

On Thu, 2006-02-23 at 17:02 -0600, Kumar Gala wrote:
> Guys,
> 
> I noticed that we have code in arch/powerpc/kernel/prom_init.c to handle 
> parsing iommu=, mem=, and crashkernel=.
> 
> The problem I have is that we only use/build prom_init.c on MULTIPLATFORM 
> (coming from true OF).

MULTIPLATFORM is here to die (or rather be always there, with
ARCH=powerpc we really want to NOT reproduce the old single platform
crap) , but yes, prom_init.c is supposed to only be run on real OFs...

I suppose we woul have to deal with those in early_init_devtree() for
machines that didn't go through prom_init()....

> Any ideas on how to handle this for the !MULTIPLATFORM cases.  I'm most 
> concerned about mem=.

^ permalink raw reply

* Re: [PATCH] change compat shmget size arg to signed
From: Stephen Rothwell @ 2006-02-23 23:16 UTC (permalink / raw)
  To: Olaf Herring; +Cc: ppc64-dev, ppc-dev

Hi Olaf,

> change second arg (the 'size') to signed to handle a size of -1.
> ltp test shmget02 fails. This patch fixes it.
> Oddly, we see the failure only on a POWER4 LPAR with 4.6G ram.
> 
> Signed-off-by: Olaf Hering <olh at suse.de>
> 
>  arch/powerpc/kernel/sys_ppc32.c |    2 +-
>  1 files changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-2.6.16-rc4-olh/arch/powerpc/kernel/sys_ppc32.c
> ===================================================================
> --- linux-2.6.16-rc4-olh.orig/arch/powerpc/kernel/sys_ppc32.c
> +++ linux-2.6.16-rc4-olh/arch/powerpc/kernel/sys_ppc32.c
> @@ -429,7 +429,7 @@ long compat_sys_ipc(u32 call, u32 first,
>  		return sys_shmdt(compat_ptr(ptr));
>  	case SHMGET:
>  		/* sign extend key_t */
> -		return sys_shmget((int)first, second, third);
> +		return sys_shmget((int)first, (int)second, third);
>  	case SHMCTL:
>  		/* sign extend shmid */
>  		return compat_sys_shmctl((int)first, second, compat_ptr(ptr));

Does the ltp test fail on a standard kernel(where SHMMAX is 0x2000000), or
only on a SLES kernel (where SHMMAX is ULONG_MAX)?

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply

* parsing of some early cmdline options
From: Kumar Gala @ 2006-02-23 23:02 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras; +Cc: linuxppc-dev

Guys,

I noticed that we have code in arch/powerpc/kernel/prom_init.c to handle 
parsing iommu=, mem=, and crashkernel=.

The problem I have is that we only use/build prom_init.c on MULTIPLATFORM 
(coming from true OF).

Any ideas on how to handle this for the !MULTIPLATFORM cases.  I'm most 
concerned about mem=.

- kumar

^ permalink raw reply

* Re: PowerPC: Sleeping function called from invalid context at emulate_instruction()
From: Paul Mackerras @ 2006-02-23 22:57 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev list, Linux Kernel, Michael Buesch
In-Reply-To: <7A04DCF5-C5CF-46E2-A133-A7743BD83B17@kernel.crashing.org>

Kumar Gala writes:

> Last time this was brought up we left it wondering why you had made  
> program_check_exception() run with interrupts disabled.  Any further  
> ideas on that one?

I think it was so that if we are entering the kernel debugger, we do
so on the same cpu that the exception was generated on.  This should
fix it.

Paul.

diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 7509aa6..98660ae 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -814,6 +814,8 @@ void __kprobes program_check_exception(s
 		return;
 	}
 
+	local_irq_enable();
+
 	/* Try to emulate it if we should. */
 	if (reason & (REASON_ILLEGAL | REASON_PRIVILEGED)) {
 		switch (emulate_instruction(regs)) {

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox