git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
sparc64
/
kernel
/
pci_sun4v.c
diff --git
a/arch/sparc64/kernel/pci_sun4v.c
b/arch/sparc64/kernel/pci_sun4v.c
index
03ad4c0
..
6b04794
100644
(file)
--- a/
arch/sparc64/kernel/pci_sun4v.c
+++ b/
arch/sparc64/kernel/pci_sun4v.c
@@
-798,7
+798,7
@@
static struct pci_ops pci_sun4v_ops = {
static void pbm_scan_bus(struct pci_controller_info *p,
struct pci_pbm_info *pbm)
{
static void pbm_scan_bus(struct pci_controller_info *p,
struct pci_pbm_info *pbm)
{
- struct pcidev_cookie *cookie = k
m
alloc(sizeof(*cookie), GFP_KERNEL);
+ struct pcidev_cookie *cookie = k
z
alloc(sizeof(*cookie), GFP_KERNEL);
if (!cookie) {
prom_printf("%s: Critical allocation failure.\n", pbm->name);
if (!cookie) {
prom_printf("%s: Critical allocation failure.\n", pbm->name);
@@
-806,7
+806,6
@@
static void pbm_scan_bus(struct pci_controller_info *p,
}
/* All we care about is the PBM. */
}
/* All we care about is the PBM. */
- memset(cookie, 0, sizeof(*cookie));
cookie->pbm = pbm;
pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, p->pci_ops, pbm);
cookie->pbm = pbm;
pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, p->pci_ops, pbm);
@@
-1048,12
+1047,11
@@
static void pci_sun4v_iommu_init(struct pci_pbm_info *pbm)
/* Allocate and initialize the free area map. */
sz = num_tsb_entries / 8;
sz = (sz + 7UL) & ~7UL;
/* Allocate and initialize the free area map. */
sz = num_tsb_entries / 8;
sz = (sz + 7UL) & ~7UL;
- iommu->arena.map = k
m
alloc(sz, GFP_KERNEL);
+ iommu->arena.map = k
z
alloc(sz, GFP_KERNEL);
if (!iommu->arena.map) {
prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n");
prom_halt();
}
if (!iommu->arena.map) {
prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n");
prom_halt();
}
- memset(iommu->arena.map, 0, sz);
iommu->arena.limit = num_tsb_entries;
sz = probe_existing_entries(pbm, iommu);
iommu->arena.limit = num_tsb_entries;
sz = probe_existing_entries(pbm, iommu);
@@
-1164,24
+1162,20
@@
void sun4v_pci_init(struct device_node *dp, char *model_name)
per_cpu(pci_iommu_batch, i).pglist = (u64 *) page;
}
per_cpu(pci_iommu_batch, i).pglist = (u64 *) page;
}
- p = k
m
alloc(sizeof(struct pci_controller_info), GFP_ATOMIC);
+ p = k
z
alloc(sizeof(struct pci_controller_info), GFP_ATOMIC);
if (!p)
goto fatal_memory_error;
if (!p)
goto fatal_memory_error;
- memset(p, 0, sizeof(*p));
-
- iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC);
+ iommu = kzalloc(sizeof(struct pci_iommu), GFP_ATOMIC);
if (!iommu)
goto fatal_memory_error;
if (!iommu)
goto fatal_memory_error;
- memset(iommu, 0, sizeof(*iommu));
p->pbm_A.iommu = iommu;
p->pbm_A.iommu = iommu;
- iommu = k
m
alloc(sizeof(struct pci_iommu), GFP_ATOMIC);
+ iommu = k
z
alloc(sizeof(struct pci_iommu), GFP_ATOMIC);
if (!iommu)
goto fatal_memory_error;
if (!iommu)
goto fatal_memory_error;
- memset(iommu, 0, sizeof(*iommu));
p->pbm_B.iommu = iommu;
p->next = pci_controller_root;
p->pbm_B.iommu = iommu;
p->next = pci_controller_root;