Skip to content

Commit

Permalink
s390/pci: cleanup clp page allocation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Feb 14, 2013
1 parent bf4ec24 commit add09d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/s390/include/asm/clp.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define _ASM_S390_CLP_H

/* CLP common request & response block size */
#define CLP_BLK_SIZE (PAGE_SIZE * 2)
#define CLP_BLK_SIZE PAGE_SIZE

struct clp_req_hdr {
u16 len;
Expand Down
3 changes: 1 addition & 2 deletions arch/s390/pci/pci_clp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit add09d6

Please sign in to comment.