Commit 2c692c65 authored by David S. Miller's avatar David S. Miller

Merge nuts.ninka.net:/home/davem/src/BK/sparcwork-2.5

into nuts.ninka.net:/home/davem/src/BK/sparc-2.5
parents b527eea4 9f2db9bb
...@@ -41,6 +41,7 @@ CONFIG_NR_CPUS=4 ...@@ -41,6 +41,7 @@ CONFIG_NR_CPUS=4
CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y CONFIG_CPU_FREQ_TABLE=y
CONFIG_US3_FREQ=m CONFIG_US3_FREQ=m
CONFIG_US2E_FREQ=m
CONFIG_CPU_FREQ_PROC_INTF=y CONFIG_CPU_FREQ_PROC_INTF=y
CONFIG_CPU_FREQ_GOV_USERSPACE=m CONFIG_CPU_FREQ_GOV_USERSPACE=m
# CONFIG_CPU_FREQ_24_API is not set # CONFIG_CPU_FREQ_24_API is not set
...@@ -361,11 +362,11 @@ CONFIG_INET_ECN=y ...@@ -361,11 +362,11 @@ CONFIG_INET_ECN=y
# CONFIG_SYN_COOKIES is not set # CONFIG_SYN_COOKIES is not set
CONFIG_INET_AH=y CONFIG_INET_AH=y
CONFIG_INET_ESP=y CONFIG_INET_ESP=y
CONFIG_XFRM_USER=m
CONFIG_IPV6=m CONFIG_IPV6=m
CONFIG_IPV6_PRIVACY=y CONFIG_IPV6_PRIVACY=y
CONFIG_INET6_AH=m CONFIG_INET6_AH=m
CONFIG_INET6_ESP=m CONFIG_INET6_ESP=m
CONFIG_XFRM_USER=m
# #
# SCTP Configuration (EXPERIMENTAL) # SCTP Configuration (EXPERIMENTAL)
......
...@@ -356,7 +356,7 @@ int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *) ...@@ -356,7 +356,7 @@ int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *)
} }
if (action == NULL) if (action == NULL)
action = (struct irqaction *)kmalloc(sizeof(struct irqaction), action = (struct irqaction *)kmalloc(sizeof(struct irqaction),
GFP_KERNEL); GFP_ATOMIC);
if (!action) { if (!action) {
spin_unlock_irqrestore(&irq_action_lock, flags); spin_unlock_irqrestore(&irq_action_lock, flags);
...@@ -376,7 +376,7 @@ int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *) ...@@ -376,7 +376,7 @@ int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *)
goto free_and_ebusy; goto free_and_ebusy;
} }
if ((bucket->flags & IBF_MULTI) == 0) { if ((bucket->flags & IBF_MULTI) == 0) {
vector = kmalloc(sizeof(void *) * 4, GFP_KERNEL); vector = kmalloc(sizeof(void *) * 4, GFP_ATOMIC);
if (vector == NULL) if (vector == NULL)
goto free_and_enomem; goto free_and_enomem;
...@@ -900,7 +900,7 @@ int request_fast_irq(unsigned int irq, ...@@ -900,7 +900,7 @@ int request_fast_irq(unsigned int irq,
} }
if (action == NULL) if (action == NULL)
action = (struct irqaction *)kmalloc(sizeof(struct irqaction), action = (struct irqaction *)kmalloc(sizeof(struct irqaction),
GFP_KERNEL); GFP_ATOMIC);
if (!action) { if (!action) {
spin_unlock_irqrestore(&irq_action_lock, flags); spin_unlock_irqrestore(&irq_action_lock, flags);
return -ENOMEM; return -ENOMEM;
......
...@@ -470,6 +470,54 @@ int pci_assign_resource(struct pci_dev *pdev, int resource) ...@@ -470,6 +470,54 @@ int pci_assign_resource(struct pci_dev *pdev, int resource)
return err; return err;
} }
/* Sort resources by alignment */
void pdev_sort_resources(struct pci_dev *dev, struct resource_list *head)
{
int i;
for (i = 0; i < PCI_NUM_RESOURCES; i++) {
struct resource *r;
struct resource_list *list, *tmp;
unsigned long r_align;
r = &dev->resource[i];
r_align = r->end - r->start;
if (!(r->flags) || r->parent)
continue;
if (!r_align) {
printk(KERN_WARNING "PCI: Ignore bogus resource %d "
"[%lx:%lx] of %s\n",
i, r->start, r->end, dev->dev.name);
continue;
}
r_align = (i < PCI_BRIDGE_RESOURCES) ? r_align + 1 : r->start;
for (list = head; ; list = list->next) {
unsigned long align = 0;
struct resource_list *ln = list->next;
int idx;
if (ln) {
idx = ln->res - &ln->dev->resource[0];
align = (idx < PCI_BRIDGE_RESOURCES) ?
ln->res->end - ln->res->start + 1 :
ln->res->start;
}
if (r_align > align) {
tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
if (!tmp)
panic("pdev_sort_resources(): "
"kmalloc() failed!\n");
tmp->next = ln;
tmp->res = r;
tmp->dev = dev;
list->next = tmp;
break;
}
}
}
}
void pcibios_update_irq(struct pci_dev *pdev, int irq) void pcibios_update_irq(struct pci_dev *pdev, int irq)
{ {
} }
...@@ -484,6 +532,44 @@ int pcibios_enable_device(struct pci_dev *pdev, int mask) ...@@ -484,6 +532,44 @@ int pcibios_enable_device(struct pci_dev *pdev, int mask)
return 0; return 0;
} }
void pcibios_resource_to_bus(struct pci_dev *pdev, struct pci_bus_region *region,
struct resource *res)
{
struct pci_pbm_info *pbm = pci_bus2pbm[pdev->bus->number];
struct resource zero_res, *root;
zero_res.start = 0;
zero_res.end = 0;
zero_res.flags = res->flags;
if (res->flags & IORESOURCE_IO)
root = &pbm->io_space;
else
root = &pbm->mem_space;
pbm->parent->resource_adjust(pdev, &zero_res, root);
region->start = res->start - zero_res.start;
region->end = res->end - zero_res.start;
}
void pcibios_bus_to_resource(struct pci_dev *pdev, struct resource *res,
struct pci_bus_region *region)
{
struct pci_pbm_info *pbm = pci_bus2pbm[pdev->bus->number];
struct resource *root;
res->start = region->start;
res->end = region->end;
if (res->flags & IORESOURCE_IO)
root = &pbm->io_space;
else
root = &pbm->mem_space;
pbm->parent->resource_adjust(pdev, res, root);
}
char * __init pcibios_setup(char *str) char * __init pcibios_setup(char *str)
{ {
if (!strcmp(str, "onboardfirst")) { if (!strcmp(str, "onboardfirst")) {
......
...@@ -185,6 +185,7 @@ rtrap_xcall: ...@@ -185,6 +185,7 @@ rtrap_xcall:
* sched+signal checks with IRQs disabled. * sched+signal checks with IRQs disabled.
*/ */
to_user: wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate to_user: wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate
wrpr 0, %pil
__handle_preemption_continue: __handle_preemption_continue:
ldx [%g6 + TI_FLAGS], %l0 ldx [%g6 + TI_FLAGS], %l0
sethi %hi(_TIF_USER_WORK_MASK), %o0 sethi %hi(_TIF_USER_WORK_MASK), %o0
...@@ -271,6 +272,7 @@ to_kernel: ...@@ -271,6 +272,7 @@ to_kernel:
brnz %l5, kern_fpucheck brnz %l5, kern_fpucheck
sethi %hi(PREEMPT_ACTIVE), %l6 sethi %hi(PREEMPT_ACTIVE), %l6
stw %l6, [%g6 + TI_PRE_COUNT] stw %l6, [%g6 + TI_PRE_COUNT]
wrpr 0, %pil
call schedule call schedule
nop nop
ba,pt %xcc, rtrap ba,pt %xcc, rtrap
......
...@@ -1575,6 +1575,9 @@ void show_trace_raw(struct thread_info *tp, unsigned long ksp) ...@@ -1575,6 +1575,9 @@ void show_trace_raw(struct thread_info *tp, unsigned long ksp)
struct reg_window *rw; struct reg_window *rw;
int count = 0; int count = 0;
if (tp == current_thread_info())
flushw_all();
fp = ksp + STACK_BIAS; fp = ksp + STACK_BIAS;
thread_base = (unsigned long) tp; thread_base = (unsigned long) tp;
do { do {
...@@ -1597,6 +1600,15 @@ void show_trace_task(struct task_struct *tsk) ...@@ -1597,6 +1600,15 @@ void show_trace_task(struct task_struct *tsk)
tsk->thread_info->ksp); tsk->thread_info->ksp);
} }
void dump_stack(void)
{
unsigned long ksp;
__asm__ __volatile__("mov %%fp, %0"
: "=r" (ksp));
show_trace_raw(current_thread_info(), ksp);
}
void die_if_kernel(char *str, struct pt_regs *regs) void die_if_kernel(char *str, struct pt_regs *regs)
{ {
static int die_counter; static int die_counter;
......
...@@ -389,7 +389,7 @@ static int __init ohci_hcd_pci_init (void) ...@@ -389,7 +389,7 @@ static int __init ohci_hcd_pci_init (void)
if (usb_disabled()) if (usb_disabled())
return -ENODEV; return -ENODEV;
printk (KERN_DEBUG "%s: block sizes: ed %d td %d\n", hcd_name, printk (KERN_DEBUG "%s: block sizes: ed %Zd td %Zd\n", hcd_name,
sizeof (struct ed), sizeof (struct td)); sizeof (struct ed), sizeof (struct td));
return pci_module_init (&ohci_pci_driver); return pci_module_init (&ohci_pci_driver);
} }
......
...@@ -205,9 +205,14 @@ extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, ...@@ -205,9 +205,14 @@ extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
#define HAVE_ARCH_PCI_MWI #define HAVE_ARCH_PCI_MWI
extern int pcibios_prep_mwi(struct pci_dev *dev); extern int pcibios_prep_mwi(struct pci_dev *dev);
#endif /* __KERNEL__ */ extern void
pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
struct resource *res);
extern void
pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
struct pci_bus_region *region);
/* generic pci stuff */ #endif /* __KERNEL__ */
#include <asm-generic/pci.h>
#endif /* __SPARC64_PCI_H */ #endif /* __SPARC64_PCI_H */
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