diff options
-rw-r--r-- | arch/parisc/kernel/entry.S | 2 | ||||
-rw-r--r-- | arch/parisc/kernel/module.c | 50 | ||||
-rw-r--r-- | drivers/char/agp/parisc-agp.c | 2 | ||||
-rw-r--r-- | drivers/input/serio/hp_sdc_mlc.c | 2 | ||||
-rw-r--r-- | drivers/parisc/ccio-dma.c | 1 | ||||
-rw-r--r-- | drivers/parisc/dino.c | 2 | ||||
-rw-r--r-- | drivers/parisc/eisa_eeprom.c | 2 | ||||
-rw-r--r-- | drivers/parisc/hppb.c | 9 | ||||
-rw-r--r-- | drivers/parisc/lba_pci.c | 2 | ||||
-rw-r--r-- | drivers/parisc/pdc_stable.c | 2 | ||||
-rw-r--r-- | drivers/video/console/sticore.c | 9 |
11 files changed, 65 insertions, 18 deletions
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index ae3e70cd1e14..e552e547cb93 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -553,7 +553,7 @@ | |||
553 | * on most of those machines only handles cache transactions. | 553 | * on most of those machines only handles cache transactions. |
554 | */ | 554 | */ |
555 | extrd,u,*= \pte,_PAGE_NO_CACHE_BIT+32,1,%r0 | 555 | extrd,u,*= \pte,_PAGE_NO_CACHE_BIT+32,1,%r0 |
556 | depi 1,12,1,\prot | 556 | depdi 1,12,1,\prot |
557 | 557 | ||
558 | /* Drop prot bits and convert to page addr for iitlbt and idtlbt */ | 558 | /* Drop prot bits and convert to page addr for iitlbt and idtlbt */ |
559 | convert_for_tlb_insert20 \pte | 559 | convert_for_tlb_insert20 \pte |
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index ef5caf2e6ed0..61ee0eec4e69 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c | |||
@@ -86,8 +86,12 @@ | |||
86 | * the bottom of the table, which has a maximum signed displacement of | 86 | * the bottom of the table, which has a maximum signed displacement of |
87 | * 0x3fff; however, since we're only going forward, this becomes | 87 | * 0x3fff; however, since we're only going forward, this becomes |
88 | * 0x1fff, and thus, since each GOT entry is 8 bytes long we can have | 88 | * 0x1fff, and thus, since each GOT entry is 8 bytes long we can have |
89 | * at most 1023 entries */ | 89 | * at most 1023 entries. |
90 | #define MAX_GOTS 1023 | 90 | * To overcome this 14bit displacement with some kernel modules, we'll |
91 | * use instead the unusal 16bit displacement method (see reassemble_16a) | ||
92 | * which gives us a maximum positive displacement of 0x7fff, and as such | ||
93 | * allows us to allocate up to 4095 GOT entries. */ | ||
94 | #define MAX_GOTS 4095 | ||
91 | 95 | ||
92 | /* three functions to determine where in the module core | 96 | /* three functions to determine where in the module core |
93 | * or init pieces the location is */ | 97 | * or init pieces the location is */ |
@@ -145,12 +149,40 @@ struct stub_entry { | |||
145 | /* The reassemble_* functions prepare an immediate value for | 149 | /* The reassemble_* functions prepare an immediate value for |
146 | insertion into an opcode. pa-risc uses all sorts of weird bitfields | 150 | insertion into an opcode. pa-risc uses all sorts of weird bitfields |
147 | in the instruction to hold the value. */ | 151 | in the instruction to hold the value. */ |
152 | static inline int sign_unext(int x, int len) | ||
153 | { | ||
154 | int len_ones; | ||
155 | |||
156 | len_ones = (1 << len) - 1; | ||
157 | return x & len_ones; | ||
158 | } | ||
159 | |||
160 | static inline int low_sign_unext(int x, int len) | ||
161 | { | ||
162 | int sign, temp; | ||
163 | |||
164 | sign = (x >> (len-1)) & 1; | ||
165 | temp = sign_unext(x, len-1); | ||
166 | return (temp << 1) | sign; | ||
167 | } | ||
168 | |||
148 | static inline int reassemble_14(int as14) | 169 | static inline int reassemble_14(int as14) |
149 | { | 170 | { |
150 | return (((as14 & 0x1fff) << 1) | | 171 | return (((as14 & 0x1fff) << 1) | |
151 | ((as14 & 0x2000) >> 13)); | 172 | ((as14 & 0x2000) >> 13)); |
152 | } | 173 | } |
153 | 174 | ||
175 | static inline int reassemble_16a(int as16) | ||
176 | { | ||
177 | int s, t; | ||
178 | |||
179 | /* Unusual 16-bit encoding, for wide mode only. */ | ||
180 | t = (as16 << 1) & 0xffff; | ||
181 | s = (as16 & 0x8000); | ||
182 | return (t ^ s ^ (s >> 1)) | (s >> 15); | ||
183 | } | ||
184 | |||
185 | |||
154 | static inline int reassemble_17(int as17) | 186 | static inline int reassemble_17(int as17) |
155 | { | 187 | { |
156 | return (((as17 & 0x10000) >> 16) | | 188 | return (((as17 & 0x10000) >> 16) | |
@@ -407,6 +439,7 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, | |||
407 | enum elf_stub_type stub_type, Elf_Addr loc0, unsigned int targetsec) | 439 | enum elf_stub_type stub_type, Elf_Addr loc0, unsigned int targetsec) |
408 | { | 440 | { |
409 | struct stub_entry *stub; | 441 | struct stub_entry *stub; |
442 | int __maybe_unused d; | ||
410 | 443 | ||
411 | /* initialize stub_offset to point in front of the section */ | 444 | /* initialize stub_offset to point in front of the section */ |
412 | if (!me->arch.section[targetsec].stub_offset) { | 445 | if (!me->arch.section[targetsec].stub_offset) { |
@@ -460,12 +493,19 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, | |||
460 | */ | 493 | */ |
461 | switch (stub_type) { | 494 | switch (stub_type) { |
462 | case ELF_STUB_GOT: | 495 | case ELF_STUB_GOT: |
463 | stub->insns[0] = 0x537b0000; /* ldd 0(%dp),%dp */ | 496 | d = get_got(me, value, addend); |
497 | if (d <= 15) { | ||
498 | /* Format 5 */ | ||
499 | stub->insns[0] = 0x0f6010db; /* ldd 0(%dp),%dp */ | ||
500 | stub->insns[0] |= low_sign_unext(d, 5) << 16; | ||
501 | } else { | ||
502 | /* Format 3 */ | ||
503 | stub->insns[0] = 0x537b0000; /* ldd 0(%dp),%dp */ | ||
504 | stub->insns[0] |= reassemble_16a(d); | ||
505 | } | ||
464 | stub->insns[1] = 0x53610020; /* ldd 10(%dp),%r1 */ | 506 | stub->insns[1] = 0x53610020; /* ldd 10(%dp),%r1 */ |
465 | stub->insns[2] = 0xe820d000; /* bve (%r1) */ | 507 | stub->insns[2] = 0xe820d000; /* bve (%r1) */ |
466 | stub->insns[3] = 0x537b0030; /* ldd 18(%dp),%dp */ | 508 | stub->insns[3] = 0x537b0030; /* ldd 18(%dp),%dp */ |
467 | |||
468 | stub->insns[0] |= reassemble_14(get_got(me, value, addend) & 0x3fff); | ||
469 | break; | 509 | break; |
470 | case ELF_STUB_MILLI: | 510 | case ELF_STUB_MILLI: |
471 | stub->insns[0] = 0x20200000; /* ldil 0,%r1 */ | 511 | stub->insns[0] = 0x20200000; /* ldil 0,%r1 */ |
diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c index f4bb43fb8016..e077701ae3d9 100644 --- a/drivers/char/agp/parisc-agp.c +++ b/drivers/char/agp/parisc-agp.c | |||
@@ -225,7 +225,7 @@ static const struct agp_bridge_driver parisc_agp_driver = { | |||
225 | .configure = parisc_agp_configure, | 225 | .configure = parisc_agp_configure, |
226 | .fetch_size = parisc_agp_fetch_size, | 226 | .fetch_size = parisc_agp_fetch_size, |
227 | .tlb_flush = parisc_agp_tlbflush, | 227 | .tlb_flush = parisc_agp_tlbflush, |
228 | .mask_memory = parisc_agp_mask_memory, | 228 | .mask_memory = parisc_agp_page_mask_memory, |
229 | .masks = parisc_agp_masks, | 229 | .masks = parisc_agp_masks, |
230 | .agp_enable = parisc_agp_enable, | 230 | .agp_enable = parisc_agp_enable, |
231 | .cache_flush = global_cache_flush, | 231 | .cache_flush = global_cache_flush, |
diff --git a/drivers/input/serio/hp_sdc_mlc.c b/drivers/input/serio/hp_sdc_mlc.c index b587e2d576ac..820e51673b26 100644 --- a/drivers/input/serio/hp_sdc_mlc.c +++ b/drivers/input/serio/hp_sdc_mlc.c | |||
@@ -296,7 +296,7 @@ static void hp_sdc_mlc_out(hil_mlc *mlc) | |||
296 | priv->tseq[3] = 0; | 296 | priv->tseq[3] = 0; |
297 | if (mlc->opacket & HIL_CTRL_APE) { | 297 | if (mlc->opacket & HIL_CTRL_APE) { |
298 | priv->tseq[3] |= HP_SDC_LPC_APE_IPF; | 298 | priv->tseq[3] |= HP_SDC_LPC_APE_IPF; |
299 | down_trylock(&mlc->csem); | 299 | BUG_ON(down_trylock(&mlc->csem)); |
300 | } | 300 | } |
301 | enqueue: | 301 | enqueue: |
302 | hp_sdc_enqueue_transaction(&priv->trans); | 302 | hp_sdc_enqueue_transaction(&priv->trans); |
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 0f0e0b919ef4..a45b0c0d574e 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c | |||
@@ -70,7 +70,6 @@ | |||
70 | #undef CCIO_COLLECT_STATS | 70 | #undef CCIO_COLLECT_STATS |
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | #include <linux/proc_fs.h> | ||
74 | #include <asm/runway.h> /* for proc_runway_root */ | 73 | #include <asm/runway.h> /* for proc_runway_root */ |
75 | 74 | ||
76 | #ifdef DEBUG_CCIO_INIT | 75 | #ifdef DEBUG_CCIO_INIT |
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index c590974e9815..d69bde6a2343 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c | |||
@@ -614,7 +614,7 @@ dino_fixup_bus(struct pci_bus *bus) | |||
614 | dev_name(&bus->self->dev), i, | 614 | dev_name(&bus->self->dev), i, |
615 | bus->self->resource[i].start, | 615 | bus->self->resource[i].start, |
616 | bus->self->resource[i].end); | 616 | bus->self->resource[i].end); |
617 | pci_assign_resource(bus->self, i); | 617 | WARN_ON(pci_assign_resource(bus->self, i)); |
618 | DBG("DEBUG %s after assign %d [0x%lx,0x%lx]\n", | 618 | DBG("DEBUG %s after assign %d [0x%lx,0x%lx]\n", |
619 | dev_name(&bus->self->dev), i, | 619 | dev_name(&bus->self->dev), i, |
620 | bus->self->resource[i].start, | 620 | bus->self->resource[i].start, |
diff --git a/drivers/parisc/eisa_eeprom.c b/drivers/parisc/eisa_eeprom.c index 685d94e69d44..8c0b26e9b98a 100644 --- a/drivers/parisc/eisa_eeprom.c +++ b/drivers/parisc/eisa_eeprom.c | |||
@@ -55,7 +55,7 @@ static ssize_t eisa_eeprom_read(struct file * file, | |||
55 | ssize_t ret; | 55 | ssize_t ret; |
56 | int i; | 56 | int i; |
57 | 57 | ||
58 | if (*ppos >= HPEE_MAX_LENGTH) | 58 | if (*ppos < 0 || *ppos >= HPEE_MAX_LENGTH) |
59 | return 0; | 59 | return 0; |
60 | 60 | ||
61 | count = *ppos + count < HPEE_MAX_LENGTH ? count : HPEE_MAX_LENGTH - *ppos; | 61 | count = *ppos + count < HPEE_MAX_LENGTH ? count : HPEE_MAX_LENGTH - *ppos; |
diff --git a/drivers/parisc/hppb.c b/drivers/parisc/hppb.c index 13856415b432..815db175d427 100644 --- a/drivers/parisc/hppb.c +++ b/drivers/parisc/hppb.c | |||
@@ -62,7 +62,8 @@ static int hppb_probe(struct parisc_device *dev) | |||
62 | } | 62 | } |
63 | card = card->next; | 63 | card = card->next; |
64 | } | 64 | } |
65 | printk(KERN_INFO "Found GeckoBoa at 0x%x\n", dev->hpa.start); | 65 | printk(KERN_INFO "Found GeckoBoa at 0x%llx\n", |
66 | (unsigned long long) dev->hpa.start); | ||
66 | 67 | ||
67 | card->hpa = dev->hpa.start; | 68 | card->hpa = dev->hpa.start; |
68 | card->mmio_region.name = "HP-PB Bus"; | 69 | card->mmio_region.name = "HP-PB Bus"; |
@@ -73,8 +74,10 @@ static int hppb_probe(struct parisc_device *dev) | |||
73 | 74 | ||
74 | status = ccio_request_resource(dev, &card->mmio_region); | 75 | status = ccio_request_resource(dev, &card->mmio_region); |
75 | if(status < 0) { | 76 | if(status < 0) { |
76 | printk(KERN_ERR "%s: failed to claim HP-PB bus space (%08x, %08x)\n", | 77 | printk(KERN_ERR "%s: failed to claim HP-PB " |
77 | __FILE__, card->mmio_region.start, card->mmio_region.end); | 78 | "bus space (0x%08llx, 0x%08llx)\n", |
79 | __FILE__, (unsigned long long) card->mmio_region.start, | ||
80 | (unsigned long long) card->mmio_region.end); | ||
78 | } | 81 | } |
79 | 82 | ||
80 | return 0; | 83 | return 0; |
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index ede614616f8e..3aeb3279c92a 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c | |||
@@ -992,7 +992,7 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev) | |||
992 | return; | 992 | return; |
993 | 993 | ||
994 | io_pdc_cell = kzalloc(sizeof(pdc_pat_cell_mod_maddr_block_t), GFP_KERNEL); | 994 | io_pdc_cell = kzalloc(sizeof(pdc_pat_cell_mod_maddr_block_t), GFP_KERNEL); |
995 | if (!pa_pdc_cell) { | 995 | if (!io_pdc_cell) { |
996 | kfree(pa_pdc_cell); | 996 | kfree(pa_pdc_cell); |
997 | return; | 997 | return; |
998 | } | 998 | } |
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index f9f9a5f1bbd0..13a64bc081b6 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c | |||
@@ -370,7 +370,7 @@ pdcspath_layer_read(struct pdcspath_entry *entry, char *buf) | |||
370 | if (!i) /* entry is not ready */ | 370 | if (!i) /* entry is not ready */ |
371 | return -ENODATA; | 371 | return -ENODATA; |
372 | 372 | ||
373 | for (i = 0; devpath->layers[i] && (likely(i < 6)); i++) | 373 | for (i = 0; i < 6 && devpath->layers[i]; i++) |
374 | out += sprintf(out, "%u ", devpath->layers[i]); | 374 | out += sprintf(out, "%u ", devpath->layers[i]); |
375 | 375 | ||
376 | out += sprintf(out, "\n"); | 376 | out += sprintf(out, "\n"); |
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index ef7870f5ea08..857b3668b3ba 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c | |||
@@ -957,9 +957,14 @@ static int __devinit sticore_pci_init(struct pci_dev *pd, | |||
957 | #ifdef CONFIG_PCI | 957 | #ifdef CONFIG_PCI |
958 | unsigned long fb_base, rom_base; | 958 | unsigned long fb_base, rom_base; |
959 | unsigned int fb_len, rom_len; | 959 | unsigned int fb_len, rom_len; |
960 | int err; | ||
960 | struct sti_struct *sti; | 961 | struct sti_struct *sti; |
961 | 962 | ||
962 | pci_enable_device(pd); | 963 | err = pci_enable_device(pd); |
964 | if (err < 0) { | ||
965 | dev_err(&pd->dev, "Cannot enable PCI device\n"); | ||
966 | return err; | ||
967 | } | ||
963 | 968 | ||
964 | fb_base = pci_resource_start(pd, 0); | 969 | fb_base = pci_resource_start(pd, 0); |
965 | fb_len = pci_resource_len(pd, 0); | 970 | fb_len = pci_resource_len(pd, 0); |
@@ -1048,7 +1053,7 @@ static void __devinit sti_init_roms(void) | |||
1048 | 1053 | ||
1049 | /* Register drivers for native & PCI cards */ | 1054 | /* Register drivers for native & PCI cards */ |
1050 | register_parisc_driver(&pa_sti_driver); | 1055 | register_parisc_driver(&pa_sti_driver); |
1051 | pci_register_driver(&pci_sti_driver); | 1056 | WARN_ON(pci_register_driver(&pci_sti_driver)); |
1052 | 1057 | ||
1053 | /* if we didn't find the given default sti, take the first one */ | 1058 | /* if we didn't find the given default sti, take the first one */ |
1054 | if (!default_sti) | 1059 | if (!default_sti) |