提交 add09d61 编写于 作者: S Sebastian Ott 提交者: Martin Schwidefsky

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: NGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 bf4ec24f
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define _ASM_S390_CLP_H #define _ASM_S390_CLP_H
/* CLP common request & response block size */ /* CLP common request & response block size */
#define CLP_BLK_SIZE (PAGE_SIZE * 2) #define CLP_BLK_SIZE PAGE_SIZE
struct clp_req_hdr { struct clp_req_hdr {
u16 len; u16 len;
......
...@@ -37,8 +37,7 @@ static inline u8 clp_instr(void *data) ...@@ -37,8 +37,7 @@ static inline u8 clp_instr(void *data)
static void *clp_alloc_block(void) static void *clp_alloc_block(void)
{ {
struct page *page = alloc_pages(GFP_KERNEL, get_order(CLP_BLK_SIZE)); return (void *) __get_free_pages(GFP_KERNEL, get_order(CLP_BLK_SIZE));
return (page) ? page_address(page) : NULL;
} }
static void clp_free_block(void *ptr) static void clp_free_block(void *ptr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册