From add09d61fee72d7a346051332b6d99f18989504c Mon Sep 17 00:00:00 2001 From: Sebastian Ott Date: Thu, 31 Jan 2013 19:54:03 +0100 Subject: 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 Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky --- arch/s390/pci/pci_clp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch/s390/pci/pci_clp.c') 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) static void *clp_alloc_block(void) { - struct page *page = alloc_pages(GFP_KERNEL, get_order(CLP_BLK_SIZE)); - return (page) ? page_address(page) : NULL; + return (void *) __get_free_pages(GFP_KERNEL, get_order(CLP_BLK_SIZE)); } static void clp_free_block(void *ptr) -- cgit v1.2.3-59-g8ed1b