/* * SPU local store allocation routines * * Copyright 2007 Benjamin Herrenschmidt, IBM Corp. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #undef DEBUG #include <linux/kernel.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/vmalloc.h> #include <asm/spu.h> #include <asm/spu_csa.h> #include <asm/mmu.h> #include "spufs.h"
int spu_alloc_lscsa(struct spu_state *csa) { struct spu_lscsa *lscsa; unsigned char *p; lscsa = vzalloc(sizeof(struct spu_lscsa)); if (!lscsa) return -ENOMEM; csa->lscsa = lscsa; /* Set LS pages reserved to allow for user-space mapping. */ for (p = lscsa->ls; p < lscsa->ls + LS_SIZE; p += PAGE_SIZE) SetPageReserved(vmalloc_to_page(p)); return 0; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 76 | 97.44% | 1 | 33.33% |
Jesper Juhl | 1 | 1.28% | 1 | 33.33% |
Michael Ellerman | 1 | 1.28% | 1 | 33.33% |
Total | 78 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 63 | 98.44% | 1 | 50.00% |
Michael Ellerman | 1 | 1.56% | 1 | 50.00% |
Total | 64 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 161 | 94.71% | 1 | 20.00% |
Jeremy Kerr | 3 | 1.76% | 1 | 20.00% |
Tejun Heo | 3 | 1.76% | 1 | 20.00% |
Michael Ellerman | 2 | 1.18% | 1 | 20.00% |
Jesper Juhl | 1 | 0.59% | 1 | 20.00% |
Total | 170 | 100.00% | 5 | 100.00% |