Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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:
sparc32: Delete prom_stdin and prom_stdout.
sparc32: More memory probing consolidation.
sparc32: Kill totally unused memory information tables.
sparc64: Fix syscall restart, for real...
serial: Fix sparc driver name strings.
sparc64: Stop creating dummy root PCI host controller devices.

+119 -386
+1 -4
arch/sparc/kernel/setup.c
··· 180 180 181 181 /* This routine will in the future do all the nasty prom stuff 182 182 * to probe for the mmu type and its parameters, etc. This will 183 - * also be where SMP things happen plus the Sparc specific memory 184 - * physical memory probe as on the alpha. 183 + * also be where SMP things happen. 185 184 */ 186 185 187 - extern int prom_probe_memory(void); 188 186 extern void sun4c_probe_vac(void); 189 187 extern char cputypval; 190 188 extern unsigned long start, end; ··· 266 268 if (ARCH_SUN4C_SUN4) 267 269 sun4c_probe_vac(); 268 270 load_mmu(); 269 - (void) prom_probe_memory(); 270 271 271 272 phys_base = 0xffffffffUL; 272 273 highest_paddr = 0UL;
+6 -55
arch/sparc/mm/fault.c
··· 47 47 int vac_entries_per_context, vac_entries_per_segment; 48 48 int vac_entries_per_page; 49 49 50 - /* Nice, simple, prom library does all the sweating for us. ;) */ 51 - int prom_probe_memory (void) 50 + /* Return how much physical memory we have. */ 51 + unsigned long probe_memory(void) 52 52 { 53 - register struct linux_mlist_v0 *mlist; 54 - register unsigned long bytes, base_paddr, tally; 55 - register int i; 53 + unsigned long total = 0; 54 + int i; 56 55 57 - i = 0; 58 - mlist= *prom_meminfo()->v0_available; 59 - bytes = tally = mlist->num_bytes; 60 - base_paddr = (unsigned long) mlist->start_adr; 61 - 62 - sp_banks[0].base_addr = base_paddr; 63 - sp_banks[0].num_bytes = bytes; 56 + for (i = 0; sp_banks[i].num_bytes; i++) 57 + total += sp_banks[i].num_bytes; 64 58 65 - while (mlist->theres_more != (void *) 0){ 66 - i++; 67 - mlist = mlist->theres_more; 68 - bytes = mlist->num_bytes; 69 - tally += bytes; 70 - if (i > SPARC_PHYS_BANKS-1) { 71 - printk ("The machine has more banks than " 72 - "this kernel can support\n" 73 - "Increase the SPARC_PHYS_BANKS " 74 - "setting (currently %d)\n", 75 - SPARC_PHYS_BANKS); 76 - i = SPARC_PHYS_BANKS-1; 77 - break; 78 - } 79 - 80 - sp_banks[i].base_addr = (unsigned long) mlist->start_adr; 81 - sp_banks[i].num_bytes = mlist->num_bytes; 82 - } 83 - 84 - i++; 85 - sp_banks[i].base_addr = 0xdeadbeef; 86 - sp_banks[i].num_bytes = 0; 87 - 88 - /* Now mask all bank sizes on a page boundary, it is all we can 89 - * use anyways. 90 - */ 91 - for(i=0; sp_banks[i].num_bytes != 0; i++) 92 - sp_banks[i].num_bytes &= PAGE_MASK; 93 - 94 - return tally; 95 - } 96 - 97 - /* Traverse the memory lists in the prom to see how much physical we 98 - * have. 99 - */ 100 - unsigned long 101 - probe_memory(void) 102 - { 103 - int total; 104 - 105 - total = prom_probe_memory(); 106 - 107 - /* Oh man, much nicer, keep the dirt in promlib. */ 108 59 return total; 109 60 } 110 61
-7
arch/sparc/prom/init.c
··· 21 21 /* The root node of the prom device tree. */ 22 22 int prom_root_node; 23 23 24 - int prom_stdin, prom_stdout; 25 - 26 24 /* Pointer to the device tree operations structure. */ 27 25 struct linux_nodeops *prom_nodeops; 28 26 ··· 72 74 (((unsigned long) prom_nodeops) == -1)) 73 75 prom_halt(); 74 76 75 - if(prom_vers == PROM_V2 || prom_vers == PROM_V3) { 76 - prom_stdout = *romvec->pv_v2bootargs.fd_stdout; 77 - prom_stdin = *romvec->pv_v2bootargs.fd_stdin; 78 - } 79 - 80 77 prom_meminit(); 81 78 82 79 prom_ranges_init();
+64 -179
arch/sparc/prom/memory.c
··· 1 - /* $Id: memory.c,v 1.15 2000/01/29 01:09:12 anton Exp $ 2 - * memory.c: Prom routine for acquiring various bits of information 1 + /* memory.c: Prom routine for acquiring various bits of information 3 2 * about RAM on the machine, both virtual and physical. 4 3 * 5 - * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 + * Copyright (C) 1995, 2008 David S. Miller (davem@davemloft.net) 6 5 * Copyright (C) 1997 Michael A. Griffith (grif@acm.org) 7 6 */ 8 7 9 8 #include <linux/kernel.h> 9 + #include <linux/sort.h> 10 10 #include <linux/init.h> 11 11 12 12 #include <asm/openprom.h> 13 13 #include <asm/sun4prom.h> 14 14 #include <asm/oplib.h> 15 + #include <asm/page.h> 15 16 16 - /* This routine, for consistency, returns the ram parameters in the 17 - * V0 prom memory descriptor format. I choose this format because I 18 - * think it was the easiest to work with. I feel the religious 19 - * arguments now... ;) Also, I return the linked lists sorted to 20 - * prevent paging_init() upset stomach as I have not yet written 21 - * the pepto-bismol kernel module yet. 22 - */ 23 - 24 - struct linux_prom_registers prom_reg_memlist[64]; 25 - struct linux_prom_registers prom_reg_tmp[64]; 26 - 27 - struct linux_mlist_v0 prom_phys_total[64]; 28 - struct linux_mlist_v0 prom_prom_taken[64]; 29 - struct linux_mlist_v0 prom_phys_avail[64]; 30 - 31 - struct linux_mlist_v0 *prom_ptot_ptr = prom_phys_total; 32 - struct linux_mlist_v0 *prom_ptak_ptr = prom_prom_taken; 33 - struct linux_mlist_v0 *prom_pavl_ptr = prom_phys_avail; 34 - 35 - struct linux_mem_v0 prom_memlist; 36 - 37 - 38 - /* Internal Prom library routine to sort a linux_mlist_v0 memory 39 - * list. Used below in initialization. 40 - */ 41 - static void __init 42 - prom_sortmemlist(struct linux_mlist_v0 *thislist) 17 + static int __init prom_meminit_v0(void) 43 18 { 44 - int swapi = 0; 45 - int i, mitr, tmpsize; 46 - char *tmpaddr; 47 - char *lowest; 19 + struct linux_mlist_v0 *p; 20 + int index; 48 21 49 - for(i=0; thislist[i].theres_more; i++) { 50 - lowest = thislist[i].start_adr; 51 - for(mitr = i+1; thislist[mitr-1].theres_more; mitr++) 52 - if(thislist[mitr].start_adr < lowest) { 53 - lowest = thislist[mitr].start_adr; 54 - swapi = mitr; 55 - } 56 - if(lowest == thislist[i].start_adr) continue; 57 - tmpaddr = thislist[swapi].start_adr; 58 - tmpsize = thislist[swapi].num_bytes; 59 - for(mitr = swapi; mitr > i; mitr--) { 60 - thislist[mitr].start_adr = thislist[mitr-1].start_adr; 61 - thislist[mitr].num_bytes = thislist[mitr-1].num_bytes; 62 - } 63 - thislist[i].start_adr = tmpaddr; 64 - thislist[i].num_bytes = tmpsize; 22 + index = 0; 23 + for (p = *(romvec->pv_v0mem.v0_available); p; p = p->theres_more) { 24 + sp_banks[index].base_addr = (unsigned long) p->start_adr; 25 + sp_banks[index].num_bytes = p->num_bytes; 26 + index++; 65 27 } 66 28 67 - return; 29 + return index; 30 + } 31 + 32 + static int __init prom_meminit_v2(void) 33 + { 34 + struct linux_prom_registers reg[64]; 35 + int node, size, num_ents, i; 36 + 37 + node = prom_searchsiblings(prom_getchild(prom_root_node), "memory"); 38 + size = prom_getproperty(node, "available", (char *) reg, sizeof(reg)); 39 + num_ents = size / sizeof(struct linux_prom_registers); 40 + 41 + for (i = 0; i < num_ents; i++) { 42 + sp_banks[i].base_addr = reg[i].phys_addr; 43 + sp_banks[i].num_bytes = reg[i].reg_size; 44 + } 45 + 46 + return num_ents; 47 + } 48 + 49 + static int __init prom_meminit_sun4(void) 50 + { 51 + #ifdef CONFIG_SUN4 52 + sp_banks[0].base_addr = 0; 53 + sp_banks[0].num_bytes = *(sun4_romvec->memoryavail); 54 + #endif 55 + return 1; 56 + } 57 + 58 + static int sp_banks_cmp(const void *a, const void *b) 59 + { 60 + const struct sparc_phys_banks *x = a, *y = b; 61 + 62 + if (x->base_addr > y->base_addr) 63 + return 1; 64 + if (x->base_addr < y->base_addr) 65 + return -1; 66 + return 0; 68 67 } 69 68 70 69 /* Initialize the memory lists based upon the prom version. */ 71 70 void __init prom_meminit(void) 72 71 { 73 - int node = 0; 74 - unsigned int iter, num_regs; 75 - struct linux_mlist_v0 *mptr; /* ptr for traversal */ 72 + int i, num_ents = 0; 76 73 77 - switch(prom_vers) { 74 + switch (prom_vers) { 78 75 case PROM_V0: 79 - /* Nice, kind of easier to do in this case. */ 80 - /* First, the total physical descriptors. */ 81 - for(mptr = (*(romvec->pv_v0mem.v0_totphys)), iter=0; 82 - mptr; mptr=mptr->theres_more, iter++) { 83 - prom_phys_total[iter].start_adr = mptr->start_adr; 84 - prom_phys_total[iter].num_bytes = mptr->num_bytes; 85 - prom_phys_total[iter].theres_more = &prom_phys_total[iter+1]; 86 - } 87 - prom_phys_total[iter-1].theres_more = NULL; 88 - /* Second, the total prom taken descriptors. */ 89 - for(mptr = (*(romvec->pv_v0mem.v0_prommap)), iter=0; 90 - mptr; mptr=mptr->theres_more, iter++) { 91 - prom_prom_taken[iter].start_adr = mptr->start_adr; 92 - prom_prom_taken[iter].num_bytes = mptr->num_bytes; 93 - prom_prom_taken[iter].theres_more = &prom_prom_taken[iter+1]; 94 - } 95 - prom_prom_taken[iter-1].theres_more = NULL; 96 - /* Last, the available physical descriptors. */ 97 - for(mptr = (*(romvec->pv_v0mem.v0_available)), iter=0; 98 - mptr; mptr=mptr->theres_more, iter++) { 99 - prom_phys_avail[iter].start_adr = mptr->start_adr; 100 - prom_phys_avail[iter].num_bytes = mptr->num_bytes; 101 - prom_phys_avail[iter].theres_more = &prom_phys_avail[iter+1]; 102 - } 103 - prom_phys_avail[iter-1].theres_more = NULL; 104 - /* Sort all the lists. */ 105 - prom_sortmemlist(prom_phys_total); 106 - prom_sortmemlist(prom_prom_taken); 107 - prom_sortmemlist(prom_phys_avail); 76 + num_ents = prom_meminit_v0(); 108 77 break; 78 + 109 79 case PROM_V2: 110 80 case PROM_V3: 111 - /* Grrr, have to traverse the prom device tree ;( */ 112 - node = prom_getchild(prom_root_node); 113 - node = prom_searchsiblings(node, "memory"); 114 - num_regs = prom_getproperty(node, "available", 115 - (char *) prom_reg_memlist, 116 - sizeof(prom_reg_memlist)); 117 - num_regs = (num_regs/sizeof(struct linux_prom_registers)); 118 - for(iter=0; iter<num_regs; iter++) { 119 - prom_phys_avail[iter].start_adr = 120 - (char *) prom_reg_memlist[iter].phys_addr; 121 - prom_phys_avail[iter].num_bytes = 122 - (unsigned long) prom_reg_memlist[iter].reg_size; 123 - prom_phys_avail[iter].theres_more = 124 - &prom_phys_avail[iter+1]; 125 - } 126 - prom_phys_avail[iter-1].theres_more = NULL; 127 - 128 - num_regs = prom_getproperty(node, "reg", 129 - (char *) prom_reg_memlist, 130 - sizeof(prom_reg_memlist)); 131 - num_regs = (num_regs/sizeof(struct linux_prom_registers)); 132 - for(iter=0; iter<num_regs; iter++) { 133 - prom_phys_total[iter].start_adr = 134 - (char *) prom_reg_memlist[iter].phys_addr; 135 - prom_phys_total[iter].num_bytes = 136 - (unsigned long) prom_reg_memlist[iter].reg_size; 137 - prom_phys_total[iter].theres_more = 138 - &prom_phys_total[iter+1]; 139 - } 140 - prom_phys_total[iter-1].theres_more = NULL; 141 - 142 - node = prom_getchild(prom_root_node); 143 - node = prom_searchsiblings(node, "virtual-memory"); 144 - num_regs = prom_getproperty(node, "available", 145 - (char *) prom_reg_memlist, 146 - sizeof(prom_reg_memlist)); 147 - num_regs = (num_regs/sizeof(struct linux_prom_registers)); 148 - 149 - /* Convert available virtual areas to taken virtual 150 - * areas. First sort, then convert. 151 - */ 152 - for(iter=0; iter<num_regs; iter++) { 153 - prom_prom_taken[iter].start_adr = 154 - (char *) prom_reg_memlist[iter].phys_addr; 155 - prom_prom_taken[iter].num_bytes = 156 - (unsigned long) prom_reg_memlist[iter].reg_size; 157 - prom_prom_taken[iter].theres_more = 158 - &prom_prom_taken[iter+1]; 159 - } 160 - prom_prom_taken[iter-1].theres_more = NULL; 161 - 162 - prom_sortmemlist(prom_prom_taken); 163 - 164 - /* Finally, convert. */ 165 - for(iter=0; iter<num_regs; iter++) { 166 - prom_prom_taken[iter].start_adr = 167 - prom_prom_taken[iter].start_adr + 168 - prom_prom_taken[iter].num_bytes; 169 - prom_prom_taken[iter].num_bytes = 170 - prom_prom_taken[iter+1].start_adr - 171 - prom_prom_taken[iter].start_adr; 172 - } 173 - prom_prom_taken[iter-1].num_bytes = 174 - 0xffffffff - (unsigned long) prom_prom_taken[iter-1].start_adr; 175 - 176 - /* Sort the other two lists. */ 177 - prom_sortmemlist(prom_phys_total); 178 - prom_sortmemlist(prom_phys_avail); 81 + num_ents = prom_meminit_v2(); 179 82 break; 180 83 181 84 case PROM_SUN4: 182 - #ifdef CONFIG_SUN4 183 - /* how simple :) */ 184 - prom_phys_total[0].start_adr = NULL; 185 - prom_phys_total[0].num_bytes = *(sun4_romvec->memorysize); 186 - prom_phys_total[0].theres_more = NULL; 187 - prom_prom_taken[0].start_adr = NULL; 188 - prom_prom_taken[0].num_bytes = 0x0; 189 - prom_prom_taken[0].theres_more = NULL; 190 - prom_phys_avail[0].start_adr = NULL; 191 - prom_phys_avail[0].num_bytes = *(sun4_romvec->memoryavail); 192 - prom_phys_avail[0].theres_more = NULL; 193 - #endif 85 + num_ents = prom_meminit_sun4(); 194 86 break; 195 87 196 88 default: 197 89 break; 198 - }; 90 + } 91 + sort(sp_banks, num_ents, sizeof(struct sparc_phys_banks), 92 + sp_banks_cmp, NULL); 199 93 200 - /* Link all the lists into the top-level descriptor. */ 201 - prom_memlist.v0_totphys=&prom_ptot_ptr; 202 - prom_memlist.v0_prommap=&prom_ptak_ptr; 203 - prom_memlist.v0_available=&prom_pavl_ptr; 94 + /* Sentinel. */ 95 + sp_banks[num_ents].base_addr = 0xdeadbeef; 96 + sp_banks[num_ents].num_bytes = 0; 204 97 205 - return; 206 - } 207 - 208 - /* This returns a pointer to our libraries internal v0 format 209 - * memory descriptor. 210 - */ 211 - struct linux_mem_v0 * 212 - prom_meminfo(void) 213 - { 214 - return &prom_memlist; 98 + for (i = 0; i < num_ents; i++) 99 + sp_banks[i].num_bytes &= PAGE_MASK; 215 100 }
+31 -95
arch/sparc64/kernel/pci.c
··· 350 350 351 351 struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, 352 352 struct device_node *node, 353 - struct pci_bus *bus, int devfn, 354 - int host_controller) 353 + struct pci_bus *bus, int devfn) 355 354 { 356 355 struct dev_archdata *sd; 357 356 struct pci_dev *dev; ··· 389 390 dev->devfn = devfn; 390 391 dev->multifunction = 0; /* maybe a lie? */ 391 392 392 - if (host_controller) { 393 - if (tlb_type != hypervisor) { 394 - pci_read_config_word(dev, PCI_VENDOR_ID, 395 - &dev->vendor); 396 - pci_read_config_word(dev, PCI_DEVICE_ID, 397 - &dev->device); 398 - } else { 399 - dev->vendor = PCI_VENDOR_ID_SUN; 400 - dev->device = 0x80f0; 401 - } 402 - dev->cfg_size = 256; 403 - dev->class = PCI_CLASS_BRIDGE_HOST << 8; 404 - sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), 405 - 0x00, PCI_SLOT(devfn), PCI_FUNC(devfn)); 406 - } else { 407 - dev->vendor = of_getintprop_default(node, "vendor-id", 0xffff); 408 - dev->device = of_getintprop_default(node, "device-id", 0xffff); 409 - dev->subsystem_vendor = 410 - of_getintprop_default(node, "subsystem-vendor-id", 0); 411 - dev->subsystem_device = 412 - of_getintprop_default(node, "subsystem-id", 0); 393 + dev->vendor = of_getintprop_default(node, "vendor-id", 0xffff); 394 + dev->device = of_getintprop_default(node, "device-id", 0xffff); 395 + dev->subsystem_vendor = 396 + of_getintprop_default(node, "subsystem-vendor-id", 0); 397 + dev->subsystem_device = 398 + of_getintprop_default(node, "subsystem-id", 0); 413 399 414 - dev->cfg_size = pci_cfg_space_size(dev); 400 + dev->cfg_size = pci_cfg_space_size(dev); 415 401 416 - /* We can't actually use the firmware value, we have 417 - * to read what is in the register right now. One 418 - * reason is that in the case of IDE interfaces the 419 - * firmware can sample the value before the the IDE 420 - * interface is programmed into native mode. 421 - */ 422 - pci_read_config_dword(dev, PCI_CLASS_REVISION, &class); 423 - dev->class = class >> 8; 424 - dev->revision = class & 0xff; 402 + /* We can't actually use the firmware value, we have 403 + * to read what is in the register right now. One 404 + * reason is that in the case of IDE interfaces the 405 + * firmware can sample the value before the the IDE 406 + * interface is programmed into native mode. 407 + */ 408 + pci_read_config_dword(dev, PCI_CLASS_REVISION, &class); 409 + dev->class = class >> 8; 410 + dev->revision = class & 0xff; 425 411 426 - sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), 427 - dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); 428 - } 412 + sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), 413 + dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); 414 + 429 415 if (ofpci_verbose) 430 416 printk(" class: 0x%x device name: %s\n", 431 417 dev->class, pci_name(dev)); ··· 425 441 dev->current_state = 4; /* unknown power state */ 426 442 dev->error_state = pci_channel_io_normal; 427 443 428 - if (host_controller) { 444 + if (!strcmp(type, "pci") || !strcmp(type, "pciex")) { 445 + /* a PCI-PCI bridge */ 429 446 dev->hdr_type = PCI_HEADER_TYPE_BRIDGE; 430 447 dev->rom_base_reg = PCI_ROM_ADDRESS1; 431 - dev->irq = PCI_IRQ_NONE; 448 + } else if (!strcmp(type, "cardbus")) { 449 + dev->hdr_type = PCI_HEADER_TYPE_CARDBUS; 432 450 } else { 433 - if (!strcmp(type, "pci") || !strcmp(type, "pciex")) { 434 - /* a PCI-PCI bridge */ 435 - dev->hdr_type = PCI_HEADER_TYPE_BRIDGE; 436 - dev->rom_base_reg = PCI_ROM_ADDRESS1; 437 - } else if (!strcmp(type, "cardbus")) { 438 - dev->hdr_type = PCI_HEADER_TYPE_CARDBUS; 439 - } else { 440 - dev->hdr_type = PCI_HEADER_TYPE_NORMAL; 441 - dev->rom_base_reg = PCI_ROM_ADDRESS; 451 + dev->hdr_type = PCI_HEADER_TYPE_NORMAL; 452 + dev->rom_base_reg = PCI_ROM_ADDRESS; 442 453 443 - dev->irq = sd->op->irqs[0]; 444 - if (dev->irq == 0xffffffff) 445 - dev->irq = PCI_IRQ_NONE; 446 - } 454 + dev->irq = sd->op->irqs[0]; 455 + if (dev->irq == 0xffffffff) 456 + dev->irq = PCI_IRQ_NONE; 447 457 } 458 + 448 459 pci_parse_of_addrs(sd->op, node, dev); 449 460 450 461 if (ofpci_verbose) ··· 728 749 prev_devfn = devfn; 729 750 730 751 /* create a new pci_dev for this device */ 731 - dev = of_create_pci_dev(pbm, child, bus, devfn, 0); 752 + dev = of_create_pci_dev(pbm, child, bus, devfn); 732 753 if (!dev) 733 754 continue; 734 755 if (ofpci_verbose) ··· 775 796 pci_bus_register_of_sysfs(child_bus); 776 797 } 777 798 778 - int pci_host_bridge_read_pci_cfg(struct pci_bus *bus_dev, 779 - unsigned int devfn, 780 - int where, int size, 781 - u32 *value) 782 - { 783 - static u8 fake_pci_config[] = { 784 - 0x8e, 0x10, /* Vendor: 0x108e (Sun) */ 785 - 0xf0, 0x80, /* Device: 0x80f0 (Fire) */ 786 - 0x46, 0x01, /* Command: 0x0146 (SERR, PARITY, MASTER, MEM) */ 787 - 0xa0, 0x22, /* Status: 0x02a0 (DEVSEL_MED, FB2B, 66MHZ) */ 788 - 0x00, 0x00, 0x00, 0x06, /* Class: 0x06000000 host bridge */ 789 - 0x00, /* Cacheline: 0x00 */ 790 - 0x40, /* Latency: 0x40 */ 791 - 0x00, /* Header-Type: 0x00 normal */ 792 - }; 793 - 794 - *value = 0; 795 - if (where >= 0 && where < sizeof(fake_pci_config) && 796 - (where + size) >= 0 && 797 - (where + size) < sizeof(fake_pci_config) && 798 - size <= sizeof(u32)) { 799 - while (size--) { 800 - *value <<= 8; 801 - *value |= fake_pci_config[where + size]; 802 - } 803 - } 804 - 805 - return PCIBIOS_SUCCESSFUL; 806 - } 807 - 808 - int pci_host_bridge_write_pci_cfg(struct pci_bus *bus_dev, 809 - unsigned int devfn, 810 - int where, int size, 811 - u32 value) 812 - { 813 - return PCIBIOS_SUCCESSFUL; 814 - } 815 - 816 799 struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm) 817 800 { 818 801 struct device_node *node = pbm->prom_node; 819 - struct pci_dev *host_pdev; 820 802 struct pci_bus *bus; 821 803 822 804 printk("PCI: Scanning PBM %s\n", node->full_name); ··· 794 854 795 855 bus->resource[0] = &pbm->io_space; 796 856 bus->resource[1] = &pbm->mem_space; 797 - 798 - /* Create the dummy host bridge and link it in. */ 799 - host_pdev = of_create_pci_dev(pbm, node, bus, 0x00, 1); 800 - bus->self = host_pdev; 801 857 802 858 pci_of_scan_bus(pbm, node, bus); 803 859 pci_bus_add_devices(bus);
-6
arch/sparc64/kernel/pci_common.c
··· 264 264 unsigned int func = PCI_FUNC(devfn); 265 265 unsigned long ret; 266 266 267 - if (!bus && devfn == 0x00) 268 - return pci_host_bridge_read_pci_cfg(bus_dev, devfn, where, 269 - size, value); 270 267 if (config_out_of_range(pbm, bus, devfn, where)) { 271 268 ret = ~0UL; 272 269 } else { ··· 297 300 unsigned int func = PCI_FUNC(devfn); 298 301 unsigned long ret; 299 302 300 - if (!bus && devfn == 0x00) 301 - return pci_host_bridge_write_pci_cfg(bus_dev, devfn, where, 302 - size, value); 303 303 if (config_out_of_range(pbm, bus, devfn, where)) { 304 304 /* Do nothing. */ 305 305 } else {
-9
arch/sparc64/kernel/pci_impl.h
··· 167 167 extern struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm); 168 168 extern void pci_determine_mem_io_space(struct pci_pbm_info *pbm); 169 169 170 - extern int pci_host_bridge_read_pci_cfg(struct pci_bus *bus_dev, 171 - unsigned int devfn, 172 - int where, int size, 173 - u32 *value); 174 - extern int pci_host_bridge_write_pci_cfg(struct pci_bus *bus_dev, 175 - unsigned int devfn, 176 - int where, int size, 177 - u32 value); 178 - 179 170 /* Error reporting support. */ 180 171 extern void pci_scan_for_target_abort(struct pci_pbm_info *, struct pci_bus *); 181 172 extern void pci_scan_for_master_abort(struct pci_pbm_info *, struct pci_bus *);
-6
arch/sparc64/kernel/process.c
··· 591 591 if (clone_flags & CLONE_SETTLS) 592 592 t->kregs->u_regs[UREG_G7] = regs->u_regs[UREG_I3]; 593 593 594 - /* We do not want to accidently trigger system call restart 595 - * handling in the new thread. Therefore, clear out the trap 596 - * type, which will make pt_regs_regs_is_syscall() return false. 597 - */ 598 - pt_regs_clear_trap_type(t->kregs); 599 - 600 594 return 0; 601 595 } 602 596
+5 -1
arch/sparc64/kernel/signal.c
··· 332 332 regs->tpc = tpc; 333 333 regs->tnpc = tnpc; 334 334 335 + /* Prevent syscall restart. */ 336 + pt_regs_clear_trap_type(regs); 337 + 335 338 sigdelsetmask(&set, ~_BLOCKABLE); 336 339 spin_lock_irq(&current->sighand->siglock); 337 340 current->blocked = set; ··· 518 515 siginfo_t info; 519 516 int signr; 520 517 521 - if (pt_regs_is_syscall(regs)) { 518 + if (pt_regs_is_syscall(regs) && 519 + (regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY))) { 522 520 pt_regs_clear_trap_type(regs); 523 521 cookie.restart_syscall = 1; 524 522 } else
+6
arch/sparc64/kernel/signal32.c
··· 268 268 regs->tstate &= ~(TSTATE_ICC|TSTATE_XCC); 269 269 regs->tstate |= psr_to_tstate_icc(psr); 270 270 271 + /* Prevent syscall restart. */ 272 + pt_regs_clear_trap_type(regs); 273 + 271 274 err |= __get_user(fpu_save, &sf->fpu_save); 272 275 if (fpu_save) 273 276 err |= restore_fpu_state32(regs, &sf->fpu_state); ··· 353 350 /* User can only change condition codes in %tstate. */ 354 351 regs->tstate &= ~(TSTATE_ICC|TSTATE_XCC); 355 352 regs->tstate |= psr_to_tstate_icc(psr); 353 + 354 + /* Prevent syscall restart. */ 355 + pt_regs_clear_trap_type(regs); 356 356 357 357 err |= __get_user(fpu_save, &sf->fpu_save); 358 358 if (fpu_save)
+1 -1
drivers/serial/sunhv.c
··· 392 392 393 393 static struct uart_driver sunhv_reg = { 394 394 .owner = THIS_MODULE, 395 - .driver_name = "serial", 395 + .driver_name = "sunhv", 396 396 .dev_name = "ttyS", 397 397 .major = TTY_MAJOR, 398 398 };
+1 -1
drivers/serial/sunsab.c
··· 826 826 827 827 static struct uart_driver sunsab_reg = { 828 828 .owner = THIS_MODULE, 829 - .driver_name = "serial", 829 + .driver_name = "sunsab", 830 830 .dev_name = "ttyS", 831 831 .major = TTY_MAJOR, 832 832 };
+1 -1
drivers/serial/sunsu.c
··· 1173 1173 1174 1174 static struct uart_driver sunsu_reg = { 1175 1175 .owner = THIS_MODULE, 1176 - .driver_name = "serial", 1176 + .driver_name = "sunsu", 1177 1177 .dev_name = "ttyS", 1178 1178 .major = TTY_MAJOR, 1179 1179 };
+1 -1
drivers/serial/sunzilog.c
··· 1023 1023 1024 1024 static struct uart_driver sunzilog_reg = { 1025 1025 .owner = THIS_MODULE, 1026 - .driver_name = "ttyS", 1026 + .driver_name = "sunzilog", 1027 1027 .dev_name = "ttyS", 1028 1028 .major = TTY_MAJOR, 1029 1029 };
-17
include/asm-sparc/oplib.h
··· 34 34 */ 35 35 extern int prom_root_node; 36 36 37 - /* PROM stdin and stdout */ 38 - extern int prom_stdin, prom_stdout; 39 - 40 37 /* Pointer to prom structure containing the device tree traversal 41 38 * and usage utility functions. Only prom-lib should use these, 42 39 * users use the interface defined by the library only! ··· 80 83 */ 81 84 extern void prom_seek(int device_handle, unsigned int seek_hival, 82 85 unsigned int seek_lowval); 83 - 84 - /* Machine memory configuration routine. */ 85 - 86 - /* This function returns a V0 format memory descriptor table, it has three 87 - * entries. One for the total amount of physical ram on the machine, one 88 - * for the amount of physical ram available, and one describing the virtual 89 - * areas which are allocated by the prom. So, in a sense the physical 90 - * available is a calculation of the total physical minus the physical mapped 91 - * by the prom with virtual mappings. 92 - * 93 - * These lists are returned pre-sorted, this should make your life easier 94 - * since the prom itself is way too lazy to do such nice things. 95 - */ 96 - extern struct linux_mem_v0 *prom_meminfo(void); 97 86 98 87 /* Miscellaneous routines, don't really fit in any category per se. */ 99 88
+2 -3
include/asm-sparc/page.h
··· 38 38 39 39 /* The following structure is used to hold the physical 40 40 * memory configuration of the machine. This is filled in 41 - * probe_memory() and is later used by mem_init() to set up 42 - * mem_map[]. We statically allocate SPARC_PHYS_BANKS of 41 + * prom_meminit() and is later used by mem_init() to set up 42 + * mem_map[]. We statically allocate SPARC_PHYS_BANKS+1 of 43 43 * these structs, this is arbitrary. The entry after the 44 44 * last valid one has num_bytes==0. 45 45 */ 46 - 47 46 struct sparc_phys_banks { 48 47 unsigned long base_addr; 49 48 unsigned long num_bytes;