From patchwork Sat Sep 16 10:52:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 112789 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1615230qgf; Sat, 16 Sep 2017 03:54:38 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7MThEIrpGx+20nmnRE8vvnST3tKFeiH0hwHzH0OaoeIi6r15Buc4BfHeJWVSccaDCTITyT X-Received: by 10.223.184.251 with SMTP id c56mr20189580wrg.145.1505559278612; Sat, 16 Sep 2017 03:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505559278; cv=none; d=google.com; s=arc-20160816; b=qhwVJ1p60EiZ/glQZv0uhb5sMXh68JjkUQNmjP/enmsDAS8osUCKJl7TaQmDkLL/1q n/eObL/z9oAeDN74PR0kuNK+Cecd2dqLZhh1ZzVfVVVjsbDZ44/Ts0wt93g65ZkrIJkZ pxVbHJuSTBJmNUqSbQRd8OHVBrCb6Gk57821iE9D5gUk1Z9D1ja1J/VWQ5Mimqi97uN3 8PgeXdHzSu0bjCq0b0G6AA1R1W/bF5xCulfHc/yUkBcKqFe01Hre4ngpUiNufdfGsXBg CrMGIYcH5wV3r6v/nV6Q1bY7eoWa7CJRBl7GUdV8PilH+I0Epxkw6AASDLBeEXo6+eLf XaYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=e0XOuw0Wmls/mP4kuLPmzi04LAIT3/SsiicFZf4QdU8=; b=iTZuUE6kHXoaLM7nmsPPSxpNgdsGUAPfMcUd4+Ep1xNkxFYIHqsha89mYGvy2txvhb pLY7uK6UczkYzMI9mWpX1OBmzocsLK2lZbeaM+aDG4Iq6GQopZQ981lD2uleX73Zwage DNRNE5H7oEhyUPEleqOjuMbjzVCCBcJ3KkxDgnSTG1iC1D4ZB4MLxI4nA1eM2kln2P2s Zq3UIvMAChmUJUVc9VSYwXyILrBHBTkVhMnGNd8TwdX88eR+nuZWYIPbDDki1uJ7xOMC cSaSxolvlEqEs1gMFr4f8ivfdErByncSno3fOfr2Kucm6FYfNND6Nm8lFRKhj5Y700Kl AclQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id d1si2404703wrf.521.2017.09.16.03.54.38; Sat, 16 Sep 2017 03:54:38 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E27561B1B4; Sat, 16 Sep 2017 12:53:32 +0200 (CEST) Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0041.outbound.protection.outlook.com [104.47.32.41]) by dpdk.org (Postfix) with ESMTP id 32308325B for ; Sat, 16 Sep 2017 12:53:24 +0200 (CEST) Received: from BN3PR03CA0101.namprd03.prod.outlook.com (10.174.66.19) by DM5PR03MB2700.namprd03.prod.outlook.com (10.168.197.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Sat, 16 Sep 2017 10:53:22 +0000 Received: from BY2FFO11FD048.protection.gbl (2a01:111:f400:7c0c::113) by BN3PR03CA0101.outlook.office365.com (2603:10b6:400:4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.9 via Frontend Transport; Sat, 16 Sep 2017 10:53:22 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD048.mail.protection.outlook.com (10.1.15.176) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.13.11 via Frontend Transport; Sat, 16 Sep 2017 10:53:22 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v8GAr6us028328; Sat, 16 Sep 2017 03:53:20 -0700 From: Hemant Agrawal To: CC: , Date: Sat, 16 Sep 2017 16:22:21 +0530 Message-ID: <1505559161-29222-8-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505559161-29222-1-git-send-email-hemant.agrawal@nxp.com> References: <1504860327-18451-1-git-send-email-hemant.agrawal@nxp.com> <1505559161-29222-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131500328027160905; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39380400002)(39860400002)(346002)(376002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(16586007)(76176999)(50986999)(105606002)(2351001)(85426001)(4326008)(5003940100001)(104016004)(498600001)(47776003)(33646002)(50226002)(356003)(81166006)(81156014)(77096006)(110136004)(305945005)(2906002)(106466001)(8676002)(8936002)(68736007)(54906002)(5660300001)(189998001)(53936002)(86362001)(8656003)(48376002)(50466002)(97736004)(316002)(36756003)(2950100002)(6916009); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2700; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD048; 1:2mZnZ8BWmcHQdNRxfRdpsK8ttStDguS+HpvhRXwvSb9Lmhy23q8RVahSbTh/ttdhby8VXnDBIVCONAmXIrb2dX1er9ECsq/LgcK6BK/3xDnT1JcZ8T4Nd9+nfAFZGIXc MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 572e738f-56ff-4fcf-94f2-08d4fcf12649 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM5PR03MB2700; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2700; 3:p67O1ELNeuSp0VWaxM02L4EF/x0Zqb19Jll/37yeYuyZZuz3e2kb1wX8LOEjnynV6zR5FlSV138dBTWBlGN4pS3X1SYf8H1XKeLsskPP3e81lCzKFoaqsTUzpd2Ec8ryva/r5UuLlBZaFCTRICkUnob2+RLSlPDb3vdAMI183TWPf08W0iD6LR5VUTFXyzC2kgFREbSYMlEGJDYoqYgfKtK+k3dg2cQkmzRtANmdNvd0Ys/848FMVbjQ63b90BX7xuQZOxpS2Hdd7Xsl+BroYPGrl0wbF9YNI+mDfVIZpSwojK62RdbahTmnSJCICRqYb3BYBS36fW/4J7sDei+CpTbpIZnF5ngzhNHheyBbZ1k=; 25:XJpa3rXnNl8MMRqck+lfyZKozJ8pOLM5+GQPzpepGQd9LMlar8u0BGDL3KGaMpu6qzGmsibUJx4yA9T8HGaW5HfDC4FFGPs3tld0OYSuCWOIA1ULUrXrm5lrf9OTFrkGXqqcAr29hpSYHQgJnVYDNGzYRLth92KGF3N/m1rtlW5ERTeGfZ9+qKaAtzQwL90QlYsXLeErmu/nYAwOm5IPMQVlQE35n2JDGOE09DwTUsHgmcmwKrVBQdHyv3RJCXnfeZ/HQU95OA4ckB3Akbgg4PgKip8r7v1kywxVB93huZVaqNsIj+VqXk/4RSCOhCeqUr5fZiPphL+V1MVVXIFj4A== X-MS-TrafficTypeDiagnostic: DM5PR03MB2700: X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2700; 31:emaOiLFbuwDNgcV/qw1S/UV4Q+iWvtDC44oXUOJW/uyIp+1U/HZHq9Rcy3wgNyAqWqA3Y9jA9hwg0FD1Hwn/yByMFH6eFCREVHlbB+SyUxcK+9VQyGFpehuoFM7s1sgU1pj18mHyMUItYdkAhIzHEnaziQubfEFFGpTIEq8Pr0WNtA9qS1rwOq5/md+wFifHGOKbHuzyjfkmy80GY2fx3wvKYhnZ9X50tCf389UHmtU=; 4:wB50oPIF5mwcAVJQVbJmDIMNA1bmtsiWYS+LPgKQcgaY6o1CGMke9HVIakUoZA3siQnXM9k+i/RGpZfTvnwnqW83T1EShJz2SOXKAGBq1wWhs6OiNDAmr66knPInI4VIJ9eYltkQwzJ6WYmlPjoQglwh/SyT/aeB3oyivKAVAPvhlsSeBDecnFbj06HZFjXG6Q02wip0oR0/YR2HPBEJbBS0QJxRfMqUf7tej4OhK8BNQdIcVZIlQ12LD5PwrrOPbCtaiegSVhKO+ECZ+wpSICu1uibb6fv+JfpFzCg8WAg= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(6096035)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123559100)(20161123561025)(20161123563025)(20161123556025)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR03MB2700; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR03MB2700; X-Forefront-PRVS: 0432A04947 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2700; 23:FnafNBaeT7g5on568+UgJbzkgvOqtGRFVWRwj3ssk?= 7CO6aJpQogyyEXjef1zexALT5WhwObNy/Rh4fwwgQj7KNcMKqjOFvcs7RcCu7zjKnPRmvS1RYR9gEono9BV92eRdCTT59KmVkN+sifdQPWwwj3pEsK/ZkHlUabIDH6qDwPyuX8VzaegNWI9HyDX4wckkWdKaHAmVYnBGAKxkCzwUf+o8n6p8GfiykCCpCzMRgXsW+4eP4Qo5tdERDhd9qTXTjG9ZQXAgsVCu2wRDMHFXdNjmUIJ8ghFVpH6HbaBJ3uRnSpTXpQP7m3QY3o0y4gGvKc4WZoYSl7p/as43SQF7TfGEgQNZ96+45Rt01f2mxYSoc1KMKtFJ0Qf6b5oSu1++hdOohuzVbvyy4qas+d1+49M1Bc8rXGCBvSOg98VXMnt6GEZx13rYctLcl9hXfbXUwohUqwmeHMxlUnpi3jP5OpMTUaCQEv67UsprwQ3IzfWZCdKA78gx8WCgxAsAxE2fshmUOBgK/vYbvphbeZ1dBtp08G2BMG+fP4xQt8vEE2hdHj9uA3/QR/paexysQkeiMyC7IKjFA6JiFVFb6yOeJLAfryDP/b4Zs8/UcEzslAm1m7Q/iEPT4551U5h5m0lVLJ4xy+5ol252lYS0Dw8oEKQ7R44jTdPldhkNSAlOwB+2oeml92K/3i9kW4JEnXvWHxKWxwHe3MZVM61nPWIVaB5xVi20cUikITIWJg1gMjOpcea2S0OnFpg9Ni35OM+JVo1G00WPnoywN9zI1bciic1ukKFYIIuX3NQ9ErJ/D5nVuPnwZJW1QuutVC2g3ky89R4Q3CjQbppX81/B/+2ulDYEytb4WjIEruYKBZfdGwMgsUMBgTy38Srg8qE6QFbRtbHk+JK28xRQValIzeirCfFDF3pMN2+5hQxyshVXKbgH5uKNK3zh2gnffB7Fr4oTRxX6i/XOt2c5c8xVc4TiWEdApEbwa6Q+rjEzvkyysN21r2UndL6Ll6gAIY7/XdzDUQbi2fCkNx9hOv+1aBfyfqZbzVbXhkamNcfQ3sqyJ3uFdD4VZIToCjEFbeGIGNyewK0tjL8EEHS5IjURGATcK4etvPOPgtzTzS/b7hYxYpmt66mV5EgMXz1CO0HenyEHdv3MXx0260jMhp8LwcInw== X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2700; 6:SIe5jjrjQjSOISdA7y52qkYX7kC0qZm0CVDat03Hvi8BTUAwOIuWZ4VodsCy7i5CPkqFd7oa4yXGDCNraHSURbOyLQMfdul2gy5nMsnaj7nxvq8Ylr4H5S3jWtBA6lBPt+JtT0gFuu8aaYA2lSm87BQJvL+j3yzKtfPpduYj25+1VZfsIIsZ2XT0BtcrsAwLAeNprCqn+LwpKGYE8xv7nv1J2XPGKQZmZltxVW+Gdee5eoCWNge0zA4S/yUhgfBYsUWmAQKNhvTrBGPrElNH/u640GlJh2Zdgf1T6eIuVVI4y+NaKDf82pvmASGEAinJKfyKAI5NGE9I+FH8ZCWvxw==; 5:JzVZue0YmbQXoJVJaaHGcPHQifP0l28jkNHkDaOHJCHeMafv522OpFRcYx45cFWRABoMLafI3BAngCu55j6dtl3PA5ANJN/x926HatXWkTa3fsEgzO4INErtupmdy2mnbLSNLYRWDj//pCVyCQ4+crztHD21qpzg08Q0YaI3yls=; 24:fJ4Wrjyx+f0S/N31omtFe2fr08BlaBzcKJLSoq5QO+Ebj24vLXV5v8uvfJI9foBnWsyC/lityrmPh+tRPOxL258BuQ/Ds3K7m53we0Gaf6Y=; 7:kEELTmsdJHlD26BS4zxZE/wtql6Ze7XURvf9d7cj4eGW+yC6TyIn4/ossJZplXywDgZFZNsUKyGGUlHX1Da4Yg/X/w82tYU5+sZIwO1BYPqaxkkmsXM/g+SMHoOMGv12GG6u2XOvO4CHI9qslYpcDxm4RafLhzGoyuu2mwZ68PiamL1/mFNrT5shC1Lb+zus+isNwZIQyZTaLq6AiAEYHiTXFXKvP9/SOjyTXiEHWv4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Sep 2017 10:53:22.3884 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2700 Subject: [dpdk-dev] [PATCH v3 07/27] bus/fslmc: cleanup compat file X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Hemant Agrawal --- drivers/bus/fslmc/qbman/include/compat.h | 188 +------------------------------ drivers/bus/fslmc/qbman/qbman_private.h | 2 +- 2 files changed, 4 insertions(+), 186 deletions(-) -- 2.7.4 diff --git a/drivers/bus/fslmc/qbman/include/compat.h b/drivers/bus/fslmc/qbman/include/compat.h index 7b69fd1..8885d60 100644 --- a/drivers/bus/fslmc/qbman/include/compat.h +++ b/drivers/bus/fslmc/qbman/include/compat.h @@ -65,16 +65,9 @@ */ /* Required compiler attributes */ -#define __user #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #define ____cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES))) -#undef container_of -#define container_of(ptr, type, member) ({ \ - typeof(((type *)0)->member)(*__mptr) = (ptr); \ - (type *)((char *)__mptr - offsetof(type, member)); }) -#define __stringify_1(x) #x -#define __stringify(x) __stringify_1(x) #ifdef ARRAY_SIZE #undef ARRAY_SIZE @@ -88,17 +81,8 @@ typedef uint32_t u32; typedef uint64_t u64; typedef uint64_t dma_addr_t; typedef cpu_set_t cpumask_t; -typedef u32 compat_uptr_t; - -static inline void __user *compat_ptr(compat_uptr_t uptr) -{ - return (void __user *)(unsigned long)uptr; -} - -static inline compat_uptr_t ptr_to_compat(void __user *uptr) -{ - return (u32)(unsigned long)uptr; -} +typedef unsigned int gfp_t; +typedef uint32_t phandle; /* I/O operations */ static inline u32 in_be32(volatile void *__p) @@ -124,12 +108,11 @@ static inline void out_be32(volatile void *__p, u32 val) #define pr_warn(fmt, args...) prflush("WARN:" fmt, ##args) #define pr_info(fmt, args...) prflush(fmt, ##args) +#ifdef RTE_LIBRTE_DPAA2_DEBUG_BUS #ifdef pr_debug #undef pr_debug #endif #define pr_debug(fmt, args...) {} -#define might_sleep_if(c) {} -#define msleep(x) {} #define WARN_ON(c, str) \ do { \ static int warned_##__LINE__; \ @@ -147,103 +130,20 @@ do { \ #define ALIGN(x, a) (((x) + ((typeof(x))(a) - 1)) & ~((typeof(x))(a) - 1)) -/****************/ -/* Linked-lists */ -/****************/ - -struct list_head { - struct list_head *prev; - struct list_head *next; -}; - -#define LIST_HEAD(n) \ -struct list_head n = { \ - .prev = &n, \ - .next = &n \ -} - -#define INIT_LIST_HEAD(p) \ -do { \ - struct list_head *__p298 = (p); \ - __p298->next = __p298; \ - __p298->prev = __p298->next; \ -} while (0) -#define list_entry(node, type, member) \ - (type *)((void *)node - offsetof(type, member)) -#define list_empty(p) \ -({ \ - const struct list_head *__p298 = (p); \ - ((__p298->next == __p298) && (__p298->prev == __p298)); \ -}) -#define list_add(p, l) \ -do { \ - struct list_head *__p298 = (p); \ - struct list_head *__l298 = (l); \ - __p298->next = __l298->next; \ - __p298->prev = __l298; \ - __l298->next->prev = __p298; \ - __l298->next = __p298; \ -} while (0) -#define list_add_tail(p, l) \ -do { \ - struct list_head *__p298 = (p); \ - struct list_head *__l298 = (l); \ - __p298->prev = __l298->prev; \ - __p298->next = __l298; \ - __l298->prev->next = __p298; \ - __l298->prev = __p298; \ -} while (0) -#define list_for_each(i, l) \ - for (i = (l)->next; i != (l); i = i->next) -#define list_for_each_safe(i, j, l) \ - for (i = (l)->next, j = i->next; i != (l); \ - i = j, j = i->next) -#define list_for_each_entry(i, l, name) \ - for (i = list_entry((l)->next, typeof(*i), name); &i->name != (l); \ - i = list_entry(i->name.next, typeof(*i), name)) -#define list_for_each_entry_safe(i, j, l, name) \ - for (i = list_entry((l)->next, typeof(*i), name), \ - j = list_entry(i->name.next, typeof(*j), name); \ - &i->name != (l); \ - i = j, j = list_entry(j->name.next, typeof(*j), name)) -#define list_del(i) \ -do { \ - (i)->next->prev = (i)->prev; \ - (i)->prev->next = (i)->next; \ -} while (0) - /* Other miscellaneous interfaces our APIs depend on; */ - #define lower_32_bits(x) ((u32)(x)) #define upper_32_bits(x) ((u32)(((x) >> 16) >> 16)) /* Compiler/type stuff */ -typedef unsigned int gfp_t; -typedef uint32_t phandle; #define __iomem -#define EINTR 4 -#define ENODEV 19 #define GFP_KERNEL 0 #define __raw_readb(p) (*(const volatile unsigned char *)(p)) #define __raw_readl(p) (*(const volatile unsigned int *)(p)) #define __raw_writel(v, p) {*(volatile unsigned int *)(p) = (v); } -/* Completion stuff */ -#define DECLARE_COMPLETION(n) int n = 0 -#define complete(n) { *n = 1; } -#define wait_for_completion(n) \ -do { \ - while (!*n) { \ - bman_poll(); \ - qman_poll(); \ - } \ - *n = 0; \ -} while (0) - /* Allocator stuff */ #define kmalloc(sz, t) malloc(sz) -#define vmalloc(sz) malloc(sz) #define kfree(p) { if (p) free(p); } static inline void *kzalloc(size_t sz, gfp_t __foo __rte_unused) { @@ -269,88 +169,6 @@ static inline void free_page(unsigned long p) free((void *)p); } -/* Bitfield stuff. */ -#define BITS_PER_ULONG (sizeof(unsigned long) << 3) -#define SHIFT_PER_ULONG (((1 << 5) == BITS_PER_ULONG) ? 5 : 6) -#define BITS_MASK(idx) ((unsigned long)1 << ((idx) & (BITS_PER_ULONG - 1))) -#define BITS_IDX(idx) ((idx) >> SHIFT_PER_ULONG) -static inline unsigned long test_bits(unsigned long mask, - volatile unsigned long *p) -{ - return *p & mask; -} - -static inline int test_bit(int idx, volatile unsigned long *bits) -{ - return test_bits(BITS_MASK(idx), bits + BITS_IDX(idx)); -} - -static inline void set_bits(unsigned long mask, volatile unsigned long *p) -{ - *p |= mask; -} - -static inline void set_bit(int idx, volatile unsigned long *bits) -{ - set_bits(BITS_MASK(idx), bits + BITS_IDX(idx)); -} - -static inline void clear_bits(unsigned long mask, volatile unsigned long *p) -{ - *p &= ~mask; -} - -static inline void clear_bit(int idx, volatile unsigned long *bits) -{ - clear_bits(BITS_MASK(idx), bits + BITS_IDX(idx)); -} - -static inline unsigned long test_and_set_bits(unsigned long mask, - volatile unsigned long *p) -{ - unsigned long ret = test_bits(mask, p); - - set_bits(mask, p); - return ret; -} - -static inline int test_and_set_bit(int idx, volatile unsigned long *bits) -{ - int ret = test_bit(idx, bits); - - set_bit(idx, bits); - return ret; -} - -static inline int test_and_clear_bit(int idx, volatile unsigned long *bits) -{ - int ret = test_bit(idx, bits); - - clear_bit(idx, bits); - return ret; -} - -static inline int find_next_zero_bit(unsigned long *bits, int limit, int idx) -{ - while ((++idx < limit) && test_bit(idx, bits)) - ; - return idx; -} - -static inline int find_first_zero_bit(unsigned long *bits, int limit) -{ - int idx = 0; - - while (test_bit(idx, bits) && (++idx < limit)) - ; - return idx; -} - -static inline u64 div64_u64(u64 n, u64 d) -{ - return n / d; -} - #define atomic_t rte_atomic32_t #define atomic_read(v) rte_atomic32_read(v) #define atomic_set(v, i) rte_atomic32_set(v, i) diff --git a/drivers/bus/fslmc/qbman/qbman_private.h b/drivers/bus/fslmc/qbman/qbman_private.h index 4f48b47..32e5c5d 100644 --- a/drivers/bus/fslmc/qbman/qbman_private.h +++ b/drivers/bus/fslmc/qbman/qbman_private.h @@ -27,7 +27,7 @@ */ /* Perform extra checking */ -#define QBMAN_CHECKING +/*#define QBMAN_CHECKING*/ /* To maximise the amount of logic that is common between the Linux driver and * other targets (such as the embedded MC firmware), we pivot here between the