| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/drivers/net/ethernet/ibm/ehea/ehea_qmr.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 9 | 10 | * Christoph Raisch <raisch@de.ibm.com> |
|---|
| 10 | 11 | * Jan-Bernd Themann <themann@de.ibm.com> |
|---|
| 11 | 12 | * Thomas Klein <tklein@de.ibm.com> |
|---|
| 12 | | - * |
|---|
| 13 | | - * |
|---|
| 14 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 15 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 16 | | - * the Free Software Foundation; either version 2, or (at your option) |
|---|
| 17 | | - * any later version. |
|---|
| 18 | | - * |
|---|
| 19 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 20 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 21 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 22 | | - * GNU General Public License for more details. |
|---|
| 23 | | - * |
|---|
| 24 | | - * You should have received a copy of the GNU General Public License |
|---|
| 25 | | - * along with this program; if not, write to the Free Software |
|---|
| 26 | | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|---|
| 27 | 13 | */ |
|---|
| 28 | 14 | |
|---|
| 29 | 15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
|---|
| .. | .. |
|---|
| 123 | 109 | int nr_of_cqe, u64 eq_handle, u32 cq_token) |
|---|
| 124 | 110 | { |
|---|
| 125 | 111 | struct ehea_cq *cq; |
|---|
| 126 | | - struct h_epa epa; |
|---|
| 127 | | - u64 *cq_handle_ref, hret, rpage; |
|---|
| 128 | | - u32 act_nr_of_entries, act_pages, counter; |
|---|
| 112 | + u64 hret, rpage; |
|---|
| 113 | + u32 counter; |
|---|
| 129 | 114 | int ret; |
|---|
| 130 | 115 | void *vpage; |
|---|
| 131 | 116 | |
|---|
| .. | .. |
|---|
| 138 | 123 | cq->attr.eq_handle = eq_handle; |
|---|
| 139 | 124 | |
|---|
| 140 | 125 | cq->adapter = adapter; |
|---|
| 141 | | - |
|---|
| 142 | | - cq_handle_ref = &cq->fw_handle; |
|---|
| 143 | | - act_nr_of_entries = 0; |
|---|
| 144 | | - act_pages = 0; |
|---|
| 145 | 126 | |
|---|
| 146 | 127 | hret = ehea_h_alloc_resource_cq(adapter->handle, &cq->attr, |
|---|
| 147 | 128 | &cq->fw_handle, &cq->epas); |
|---|
| .. | .. |
|---|
| 190 | 171 | } |
|---|
| 191 | 172 | |
|---|
| 192 | 173 | hw_qeit_reset(&cq->hw_queue); |
|---|
| 193 | | - epa = cq->epas.kernel; |
|---|
| 194 | 174 | ehea_reset_cq_ep(cq); |
|---|
| 195 | 175 | ehea_reset_cq_n1(cq); |
|---|
| 196 | 176 | |
|---|
| .. | .. |
|---|
| 690 | 670 | |
|---|
| 691 | 671 | static int ehea_is_hugepage(unsigned long pfn) |
|---|
| 692 | 672 | { |
|---|
| 693 | | - int page_order; |
|---|
| 694 | | - |
|---|
| 695 | 673 | if (pfn & EHEA_HUGEPAGE_PFN_MASK) |
|---|
| 696 | 674 | return 0; |
|---|
| 697 | 675 | |
|---|
| 698 | | - page_order = compound_order(pfn_to_page(pfn)); |
|---|
| 699 | | - if (page_order + PAGE_SHIFT != EHEA_HUGEPAGESHIFT) |
|---|
| 676 | + if (page_shift(pfn_to_page(pfn)) != EHEA_HUGEPAGESHIFT) |
|---|
| 700 | 677 | return 0; |
|---|
| 701 | 678 | |
|---|
| 702 | 679 | return 1; |
|---|