提交 83bdd240 编写于 作者: L Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Fix sun4u execute bit check in TSB I-TLB load.
  sparc: Fix incorrect comparison in of_bus_ambapp_match()
  sparc64: Sync of_create_pci_dev() with drivers/pci/probe.c changes.
  sparc64: Tighten checks in kstack_valid().
...@@ -11,6 +11,10 @@ static inline bool kstack_valid(struct thread_info *tp, unsigned long sp) ...@@ -11,6 +11,10 @@ static inline bool kstack_valid(struct thread_info *tp, unsigned long sp)
{ {
unsigned long base = (unsigned long) tp; unsigned long base = (unsigned long) tp;
/* Stack pointer must be 16-byte aligned. */
if (sp & (16UL - 1))
return false;
if (sp >= (base + sizeof(struct thread_info)) && if (sp >= (base + sizeof(struct thread_info)) &&
sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf))) sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf)))
return true; return true;
......
...@@ -105,7 +105,7 @@ static unsigned long of_bus_sbus_get_flags(const u32 *addr, unsigned long flags) ...@@ -105,7 +105,7 @@ static unsigned long of_bus_sbus_get_flags(const u32 *addr, unsigned long flags)
static int of_bus_ambapp_match(struct device_node *np) static int of_bus_ambapp_match(struct device_node *np)
{ {
return !strcmp(np->name, "ambapp"); return !strcmp(np->type, "ambapp");
} }
static void of_bus_ambapp_count_cells(struct device_node *child, static void of_bus_ambapp_count_cells(struct device_node *child,
......
...@@ -247,6 +247,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, ...@@ -247,6 +247,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
struct pci_bus *bus, int devfn) struct pci_bus *bus, int devfn)
{ {
struct dev_archdata *sd; struct dev_archdata *sd;
struct pci_slot *slot;
struct of_device *op; struct of_device *op;
struct pci_dev *dev; struct pci_dev *dev;
const char *type; const char *type;
...@@ -286,6 +287,11 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, ...@@ -286,6 +287,11 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
dev->dev.bus = &pci_bus_type; dev->dev.bus = &pci_bus_type;
dev->devfn = devfn; dev->devfn = devfn;
dev->multifunction = 0; /* maybe a lie? */ dev->multifunction = 0; /* maybe a lie? */
set_pcie_port_type(dev);
list_for_each_entry(slot, &dev->bus->slots, list)
if (PCI_SLOT(dev->devfn) == slot->number)
dev->slot = slot;
dev->vendor = of_getintprop_default(node, "vendor-id", 0xffff); dev->vendor = of_getintprop_default(node, "vendor-id", 0xffff);
dev->device = of_getintprop_default(node, "device-id", 0xffff); dev->device = of_getintprop_default(node, "device-id", 0xffff);
...@@ -322,6 +328,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, ...@@ -322,6 +328,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
dev->current_state = 4; /* unknown power state */ dev->current_state = 4; /* unknown power state */
dev->error_state = pci_channel_io_normal; dev->error_state = pci_channel_io_normal;
dev->dma_mask = 0xffffffff;
if (!strcmp(node->name, "pci")) { if (!strcmp(node->name, "pci")) {
/* a PCI-PCI bridge */ /* a PCI-PCI bridge */
......
...@@ -191,10 +191,12 @@ tsb_dtlb_load: ...@@ -191,10 +191,12 @@ tsb_dtlb_load:
tsb_itlb_load: tsb_itlb_load:
/* Executable bit must be set. */ /* Executable bit must be set. */
661: andcc %g5, _PAGE_EXEC_4U, %g0 661: sethi %hi(_PAGE_EXEC_4U), %g4
.section .sun4v_1insn_patch, "ax" andcc %g5, %g4, %g0
.section .sun4v_2insn_patch, "ax"
.word 661b .word 661b
andcc %g5, _PAGE_EXEC_4V, %g0 andcc %g5, _PAGE_EXEC_4V, %g0
nop
.previous .previous
be,pn %xcc, tsb_do_fault be,pn %xcc, tsb_do_fault
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册