aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-01-31 13:54:03 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-02-14 09:55:16 -0500
commitadd09d61fee72d7a346051332b6d99f18989504c (patch)
treecaece49a2cc56151048707b3f3eef5aa1baef8bb /arch/s390
parentbf4ec24ff8ab54d56c835eb61212a1e87270d7c8 (diff)
s390/pci: cleanup clp page allocation
Use the __get_free_pages wrapper in clp_alloc_block. Also change the allocation to use one page only. This page is used as CLP response block e.g. to list available pci functions. Using one page we can list > 250 pci functions at once and we have code to loop around this CLP command (if not all functions fit into to the CLP block) already in place. Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/clp.h2
-rw-r--r--arch/s390/pci/pci_clp.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/arch/s390/include/asm/clp.h b/arch/s390/include/asm/clp.h
index 6c3aecc245ff..a0e71a501f7c 100644
--- a/arch/s390/include/asm/clp.h
+++ b/arch/s390/include/asm/clp.h
@@ -2,7 +2,7 @@
2#define _ASM_S390_CLP_H 2#define _ASM_S390_CLP_H
3 3
4/* CLP common request & response block size */ 4/* CLP common request & response block size */
5#define CLP_BLK_SIZE (PAGE_SIZE * 2) 5#define CLP_BLK_SIZE PAGE_SIZE
6 6
7struct clp_req_hdr { 7struct clp_req_hdr {
8 u16 len; 8 u16 len;
diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c
index 702bd2693689..f339fe2feb15 100644
--- a/arch/s390/pci/pci_clp.c
+++ b/arch/s390/pci/pci_clp.c
@@ -37,8 +37,7 @@ static inline u8 clp_instr(void *data)
37 37
38static void *clp_alloc_block(void) 38static void *clp_alloc_block(void)
39{ 39{
40 struct page *page = alloc_pages(GFP_KERNEL, get_order(CLP_BLK_SIZE)); 40 return (void *) __get_free_pages(GFP_KERNEL, get_order(CLP_BLK_SIZE));
41 return (page) ? page_address(page) : NULL;
42} 41}
43 42
44static void clp_free_block(void *ptr) 43static void clp_free_block(void *ptr)