Commit a6e470fd authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
  parisc: struct device - replace bus_id with dev_name(), dev_set_name()
  parisc: fix kernel crash when unwinding a userspace process
  parisc: __kernel_time_t is always long
parents 8e36a5d6 90f67130
...@@ -42,9 +42,9 @@ struct parisc_driver { ...@@ -42,9 +42,9 @@ struct parisc_driver {
#define to_parisc_driver(d) container_of(d, struct parisc_driver, drv) #define to_parisc_driver(d) container_of(d, struct parisc_driver, drv)
#define parisc_parent(d) to_parisc_device(d->dev.parent) #define parisc_parent(d) to_parisc_device(d->dev.parent)
static inline char *parisc_pathname(struct parisc_device *d) static inline const char *parisc_pathname(struct parisc_device *d)
{ {
return d->dev.bus_id; return dev_name(&d->dev);
} }
static inline void static inline void
......
...@@ -24,13 +24,12 @@ typedef int __kernel_daddr_t; ...@@ -24,13 +24,12 @@ typedef int __kernel_daddr_t;
typedef unsigned long __kernel_size_t; typedef unsigned long __kernel_size_t;
typedef long __kernel_ssize_t; typedef long __kernel_ssize_t;
typedef long __kernel_ptrdiff_t; typedef long __kernel_ptrdiff_t;
typedef long __kernel_time_t;
#else #else
typedef unsigned int __kernel_size_t; typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t; typedef int __kernel_ssize_t;
typedef int __kernel_ptrdiff_t; typedef int __kernel_ptrdiff_t;
typedef long __kernel_time_t;
#endif #endif
typedef long __kernel_time_t;
typedef char * __kernel_caddr_t; typedef char * __kernel_caddr_t;
typedef unsigned short __kernel_uid16_t; typedef unsigned short __kernel_uid16_t;
......
...@@ -43,7 +43,7 @@ struct hppa_dma_ops *hppa_dma_ops __read_mostly; ...@@ -43,7 +43,7 @@ struct hppa_dma_ops *hppa_dma_ops __read_mostly;
EXPORT_SYMBOL(hppa_dma_ops); EXPORT_SYMBOL(hppa_dma_ops);
static struct device root = { static struct device root = {
.bus_id = "parisc", .init_name = "parisc",
}; };
static inline int check_dev(struct device *dev) static inline int check_dev(struct device *dev)
...@@ -393,7 +393,8 @@ EXPORT_SYMBOL(print_pci_hwpath); ...@@ -393,7 +393,8 @@ EXPORT_SYMBOL(print_pci_hwpath);
static void setup_bus_id(struct parisc_device *padev) static void setup_bus_id(struct parisc_device *padev)
{ {
struct hardware_path path; struct hardware_path path;
char *output = padev->dev.bus_id; char name[20];
char *output = name;
int i; int i;
get_node_path(padev->dev.parent, &path); get_node_path(padev->dev.parent, &path);
...@@ -404,6 +405,7 @@ static void setup_bus_id(struct parisc_device *padev) ...@@ -404,6 +405,7 @@ static void setup_bus_id(struct parisc_device *padev)
output += sprintf(output, "%u:", (unsigned char) path.bc[i]); output += sprintf(output, "%u:", (unsigned char) path.bc[i]);
} }
sprintf(output, "%u", (unsigned char) padev->hw_path); sprintf(output, "%u", (unsigned char) padev->hw_path);
dev_set_name(&padev->dev, name);
} }
struct parisc_device * create_tree_node(char id, struct device *parent) struct parisc_device * create_tree_node(char id, struct device *parent)
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/kallsyms.h>
#include <linux/bug.h> #include <linux/bug.h>
#include <asm/assembly.h> #include <asm/assembly.h>
...@@ -51,7 +50,7 @@ ...@@ -51,7 +50,7 @@
DEFINE_SPINLOCK(pa_dbit_lock); DEFINE_SPINLOCK(pa_dbit_lock);
#endif #endif
void parisc_show_stack(struct task_struct *t, unsigned long *sp, static void parisc_show_stack(struct task_struct *task, unsigned long *sp,
struct pt_regs *regs); struct pt_regs *regs);
static int printbinary(char *buf, unsigned long x, int nbits) static int printbinary(char *buf, unsigned long x, int nbits)
...@@ -121,18 +120,19 @@ static void print_fr(char *level, struct pt_regs *regs) ...@@ -121,18 +120,19 @@ static void print_fr(char *level, struct pt_regs *regs)
void show_regs(struct pt_regs *regs) void show_regs(struct pt_regs *regs)
{ {
int i; int i, user;
char *level; char *level;
unsigned long cr30, cr31; unsigned long cr30, cr31;
level = user_mode(regs) ? KERN_DEBUG : KERN_CRIT; user = user_mode(regs);
level = user ? KERN_DEBUG : KERN_CRIT;
print_gr(level, regs); print_gr(level, regs);
for (i = 0; i < 8; i += 4) for (i = 0; i < 8; i += 4)
PRINTREGS(level, regs->sr, "sr", RFMT, i); PRINTREGS(level, regs->sr, "sr", RFMT, i);
if (user_mode(regs)) if (user)
print_fr(level, regs); print_fr(level, regs);
cr30 = mfctl(30); cr30 = mfctl(30);
...@@ -145,14 +145,18 @@ void show_regs(struct pt_regs *regs) ...@@ -145,14 +145,18 @@ void show_regs(struct pt_regs *regs)
printk("%s CPU: %8d CR30: " RFMT " CR31: " RFMT "\n", printk("%s CPU: %8d CR30: " RFMT " CR31: " RFMT "\n",
level, current_thread_info()->cpu, cr30, cr31); level, current_thread_info()->cpu, cr30, cr31);
printk("%s ORIG_R28: " RFMT "\n", level, regs->orig_r28); printk("%s ORIG_R28: " RFMT "\n", level, regs->orig_r28);
printk(level);
print_symbol(" IAOQ[0]: %s\n", regs->iaoq[0]); if (user) {
printk(level); printk("%s IAOQ[0]: " RFMT "\n", level, regs->iaoq[0]);
print_symbol(" IAOQ[1]: %s\n", regs->iaoq[1]); printk("%s IAOQ[1]: " RFMT "\n", level, regs->iaoq[1]);
printk(level); printk("%s RP(r2): " RFMT "\n", level, regs->gr[2]);
print_symbol(" RP(r2): %s\n", regs->gr[2]); } else {
printk("%s IAOQ[0]: %pS\n", level, (void *) regs->iaoq[0]);
parisc_show_stack(current, NULL, regs); printk("%s IAOQ[1]: %pS\n", level, (void *) regs->iaoq[1]);
printk("%s RP(r2): %pS\n", level, (void *) regs->gr[2]);
parisc_show_stack(current, NULL, regs);
}
} }
...@@ -173,20 +177,15 @@ static void do_show_stack(struct unwind_frame_info *info) ...@@ -173,20 +177,15 @@ static void do_show_stack(struct unwind_frame_info *info)
break; break;
if (__kernel_text_address(info->ip)) { if (__kernel_text_address(info->ip)) {
printk("%s [<" RFMT ">] ", (i&0x3)==1 ? KERN_CRIT : "", info->ip); printk(KERN_CRIT " [<" RFMT ">] %pS\n",
#ifdef CONFIG_KALLSYMS info->ip, (void *) info->ip);
print_symbol("%s\n", info->ip);
#else
if ((i & 0x03) == 0)
printk("\n");
#endif
i++; i++;
} }
} }
printk("\n"); printk(KERN_CRIT "\n");
} }
void parisc_show_stack(struct task_struct *task, unsigned long *sp, static void parisc_show_stack(struct task_struct *task, unsigned long *sp,
struct pt_regs *regs) struct pt_regs *regs)
{ {
struct unwind_frame_info info; struct unwind_frame_info info;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment