sb_zbpci.c (218909) | sb_zbpci.c (254025) |
---|---|
1/*- 2 * Copyright (c) 2009 Neelkanth Natu 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 39 unchanged lines hidden (view full) --- 48#include <machine/resource.h> 49#include <machine/bus.h> 50 51#include "pcib_if.h" 52 53#include "sb_bus_space.h" 54#include "sb_scd.h" 55 | 1/*- 2 * Copyright (c) 2009 Neelkanth Natu 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 39 unchanged lines hidden (view full) --- 48#include <machine/resource.h> 49#include <machine/bus.h> 50 51#include "pcib_if.h" 52 53#include "sb_bus_space.h" 54#include "sb_scd.h" 55 |
56__FBSDID("$FreeBSD: head/sys/mips/sibyte/sb_zbpci.c 218909 2011-02-21 09:01:34Z brucec $"); | 56__FBSDID("$FreeBSD: head/sys/mips/sibyte/sb_zbpci.c 254025 2013-08-07 06:21:20Z jeff $"); |
57 58static struct { 59 vm_offset_t vaddr; 60 vm_paddr_t paddr; 61} zbpci_config_space[MAXCPU]; 62 63static const vm_paddr_t CFG_PADDR_BASE = 0xFE000000; 64static const u_long PCI_IOSPACE_ADDR = 0xFC000000; --- 67 unchanged lines hidden (view full) --- 132 PCI_MATCH_BIT_LANES_SIZE, 0); 133 if (res == NULL) 134 panic("Cannot allocate resource for pci match bit lanes."); 135#endif /* _BYTE_ORDER ==_BIG_ENDIAN */ 136 137 /* 138 * Allocate KVA for accessing PCI config space. 139 */ | 57 58static struct { 59 vm_offset_t vaddr; 60 vm_paddr_t paddr; 61} zbpci_config_space[MAXCPU]; 62 63static const vm_paddr_t CFG_PADDR_BASE = 0xFE000000; 64static const u_long PCI_IOSPACE_ADDR = 0xFC000000; --- 67 unchanged lines hidden (view full) --- 132 PCI_MATCH_BIT_LANES_SIZE, 0); 133 if (res == NULL) 134 panic("Cannot allocate resource for pci match bit lanes."); 135#endif /* _BYTE_ORDER ==_BIG_ENDIAN */ 136 137 /* 138 * Allocate KVA for accessing PCI config space. 139 */ |
140 va = kmem_alloc_nofault(kernel_map, PAGE_SIZE * mp_ncpus); | 140 va = kva_alloc(PAGE_SIZE * mp_ncpus); |
141 if (va == 0) { 142 device_printf(dev, "Cannot allocate virtual addresses for " 143 "config space access.\n"); 144 return (ENOMEM); 145 } 146 147 for (n = 0; n < mp_ncpus; ++n) 148 zbpci_config_space[n].vaddr = va + n * PAGE_SIZE; --- 395 unchanged lines hidden --- | 141 if (va == 0) { 142 device_printf(dev, "Cannot allocate virtual addresses for " 143 "config space access.\n"); 144 return (ENOMEM); 145 } 146 147 for (n = 0; n < mp_ncpus; ++n) 148 zbpci_config_space[n].vaddr = va + n * PAGE_SIZE; --- 395 unchanged lines hidden --- |