commit
a3d7dfe8a3
@ -1,6 +1,6 @@ |
||||
{ |
||||
"commit": "3c1ad4d78a1d5fc29c5e169f5ba9f82bc580d2f0", |
||||
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/3c1ad4d78a1d5fc29c5e169f5ba9f82bc580d2f0.tar.gz", |
||||
"sha256": "0cd24ibv0i2zq0vvawafm0hqjgv70flmna84g320h5jy3lc0qrv4", |
||||
"msg": "Update from Hackage at 2022-08-20T06:29:36Z" |
||||
"commit": "0fd2081c5296d9891054f8c742545d3871d76485", |
||||
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/0fd2081c5296d9891054f8c742545d3871d76485.tar.gz", |
||||
"sha256": "1bxxlks9bjf9lmshlg8777j6h7gb5mpd9lxj97nkqh32gnlj8m38", |
||||
"msg": "Update from Hackage at 2022-08-28T23:15:42Z" |
||||
} |
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,129 @@ |
||||
diff --git a/hevm.cabal b/hevm.cabal
|
||||
index cf36961e..3b31f595 100644
|
||||
--- a/hevm.cabal
|
||||
+++ b/hevm.cabal
|
||||
@@ -71,6 +71,10 @@ library
|
||||
-Wall -Wno-deprecations
|
||||
extra-libraries:
|
||||
secp256k1, ff
|
||||
+ if os(darwin)
|
||||
+ extra-libraries: c++
|
||||
+ else
|
||||
+ extra-libraries: stdc++
|
||||
c-sources:
|
||||
ethjet/tinykeccak.c, ethjet/ethjet.c
|
||||
cxx-sources:
|
||||
@@ -88,7 +92,7 @@ library
|
||||
transformers >= 0.5.6 && < 0.6,
|
||||
tree-view >= 0.5 && < 0.6,
|
||||
abstract-par >= 0.3.3 && < 0.4,
|
||||
- aeson >= 1.5.6 && < 1.6,
|
||||
+ aeson >= 2.0 && < 2.1,
|
||||
bytestring >= 0.10.8 && < 0.11,
|
||||
scientific >= 0.3.6 && < 0.4,
|
||||
binary >= 0.8.6 && < 0.9,
|
||||
@@ -97,7 +101,7 @@ library
|
||||
vector >= 0.12.1 && < 0.13,
|
||||
ansi-wl-pprint >= 0.6.9 && < 0.7,
|
||||
base16-bytestring >= 1.0.0 && < 2.0,
|
||||
- brick >= 0.58 && < 0.63,
|
||||
+ brick >= 0.58 && < 0.69,
|
||||
megaparsec >= 9.0.0 && < 10.0,
|
||||
mtl >= 2.2.2 && < 2.3,
|
||||
directory >= 1.3.3 && < 1.4,
|
||||
@@ -105,13 +109,13 @@ library
|
||||
vty >= 5.25.1 && < 5.34,
|
||||
cereal >= 0.5.8 && < 0.6,
|
||||
cryptonite >= 0.27 && <= 0.29,
|
||||
- memory >= 0.14.18 && < 0.16,
|
||||
+ memory >= 0.14.18 && < 0.20,
|
||||
data-dword >= 0.3.1 && < 0.4,
|
||||
fgl >= 5.7.0 && < 5.8,
|
||||
free >= 5.1.3 && < 5.2,
|
||||
haskeline >= 0.8.0 && < 0.9,
|
||||
process >= 1.6.5 && < 1.7,
|
||||
- lens >= 4.17.1 && < 4.20,
|
||||
+ lens >= 4.17.1 && < 5.1,
|
||||
lens-aeson >= 1.0.2 && < 1.2,
|
||||
monad-par >= 0.3.5 && < 0.4,
|
||||
multiset >= 0.3.4 && < 0.4,
|
||||
@@ -124,7 +128,6 @@ library
|
||||
sbv >= 8.9,
|
||||
semver-range >= 0.2.7 && < 0.3,
|
||||
temporary >= 1.3 && < 1.4,
|
||||
- text-format >= 0.3.2 && < 0.4,
|
||||
witherable >= 0.3.5 && < 0.5,
|
||||
wreq >= 0.5.3 && < 0.6,
|
||||
regex-tdfa >= 1.2.3 && < 1.4,
|
||||
@@ -190,7 +193,6 @@ executable hevm
|
||||
sbv,
|
||||
temporary,
|
||||
text,
|
||||
- text-format,
|
||||
unordered-containers,
|
||||
vector,
|
||||
vty
|
||||
diff --git a/src/EVM/Solidity.hs b/src/EVM/Solidity.hs
|
||||
index b7d0f36b..4e9d6892 100644
|
||||
--- a/src/EVM/Solidity.hs
|
||||
+++ b/src/EVM/Solidity.hs
|
||||
@@ -70,6 +70,7 @@ import Control.Monad
|
||||
import Control.Lens hiding (Indexed, (.=))
|
||||
import qualified Data.String.Here as Here
|
||||
import Data.Aeson hiding (json)
|
||||
+import qualified Data.Aeson.KeyMap as KeyMap
|
||||
import Data.Aeson.Types
|
||||
import Data.Aeson.Lens
|
||||
import Data.Scientific
|
||||
@@ -714,8 +715,8 @@ astIdMap = foldMap f
|
||||
f :: Value -> Map Int Value
|
||||
f (Array x) = foldMap f x
|
||||
f v@(Object x) =
|
||||
- let t = foldMap f (HMap.elems x)
|
||||
- in case HMap.lookup "id" x of
|
||||
+ let t = foldMap f (KeyMap.elems x)
|
||||
+ in case KeyMap.lookup "id" x of
|
||||
Nothing -> t
|
||||
Just (Number i) -> t <> Map.singleton (round i) v
|
||||
Just _ -> t
|
||||
diff --git a/src/EVM/SymExec.hs b/src/EVM/SymExec.hs
|
||||
index 5bbf1c03..b828098e 100644
|
||||
--- a/src/EVM/SymExec.hs
|
||||
+++ b/src/EVM/SymExec.hs
|
||||
@@ -40,8 +40,8 @@ type EquivalenceResult = ProofResult ([VM], [VM]) VM ()
|
||||
|
||||
-- | Convenience functions for generating large symbolic byte strings
|
||||
sbytes32, sbytes128, sbytes256, sbytes512, sbytes1024 :: Query ([SWord 8])
|
||||
-sbytes32 = toBytes <$> freshVar_ @ (WordN 256)
|
||||
-sbytes128 = toBytes <$> freshVar_ @ (WordN 1024)
|
||||
+sbytes32 = toBytes <$> freshVar_ @(WordN 256)
|
||||
+sbytes128 = toBytes <$> freshVar_ @(WordN 1024)
|
||||
sbytes256 = liftA2 (++) sbytes128 sbytes128
|
||||
sbytes512 = liftA2 (++) sbytes256 sbytes256
|
||||
sbytes1024 = liftA2 (++) sbytes512 sbytes512
|
||||
diff --git a/src/EVM/Types.hs b/src/EVM/Types.hs
|
||||
index fdd2368d..1dc29e83 100644
|
||||
--- a/src/EVM/Types.hs
|
||||
+++ b/src/EVM/Types.hs
|
||||
@@ -434,17 +434,17 @@ readN s = fromIntegral (read s :: Integer)
|
||||
readNull :: Read a => a -> String -> a
|
||||
readNull x = fromMaybe x . Text.Read.readMaybe
|
||||
|
||||
-wordField :: JSON.Object -> Text -> JSON.Parser W256
|
||||
+wordField :: JSON.Object -> Key -> JSON.Parser W256
|
||||
wordField x f = ((readNull 0) . Text.unpack)
|
||||
<$> (x .: f)
|
||||
|
||||
-addrField :: JSON.Object -> Text -> JSON.Parser Addr
|
||||
+addrField :: JSON.Object -> Key -> JSON.Parser Addr
|
||||
addrField x f = (read . Text.unpack) <$> (x .: f)
|
||||
|
||||
-addrFieldMaybe :: JSON.Object -> Text -> JSON.Parser (Maybe Addr)
|
||||
+addrFieldMaybe :: JSON.Object -> Key -> JSON.Parser (Maybe Addr)
|
||||
addrFieldMaybe x f = (Text.Read.readMaybe . Text.unpack) <$> (x .: f)
|
||||
|
||||
-dataField :: JSON.Object -> Text -> JSON.Parser ByteString
|
||||
+dataField :: JSON.Object -> Key -> JSON.Parser ByteString
|
||||
dataField x f = hexText <$> (x .: f)
|
||||
|
||||
toWord512 :: W256 -> Word512
|
@ -0,0 +1,27 @@ |
||||
{ lib, stdenv, fetchurl }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "json2tsv"; |
||||
version = "1.0"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://codemadness.org/releases/json2tsv/json2tsv-${version}.tar.gz"; |
||||
hash = "sha256-BOamDWszYDqKGdKOlAOLY7F9ScZaBJXNdhz38iYW3ps="; |
||||
}; |
||||
|
||||
postPatch = '' |
||||
substituteInPlace jaq --replace "json2tsv" "$out/bin/json2tsv" |
||||
''; |
||||
|
||||
makeFlags = [ "RANLIB:=$(RANLIB)" ]; |
||||
|
||||
installFlags = [ "PREFIX=$(out)" ]; |
||||
|
||||
meta = with lib; { |
||||
description = "JSON to TSV converter"; |
||||
homepage = "https://codemadness.org/json2tsv.html"; |
||||
license = licenses.isc; |
||||
maintainers = with maintainers; [ sikmir ]; |
||||
platforms = platforms.unix; |
||||
}; |
||||
} |
@ -1,19 +0,0 @@ |
||||
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
|
||||
index 88632df..ba6cfa9 100644
|
||||
--- a/scripts/genksyms/genksyms.c
|
||||
+++ b/scripts/genksyms/genksyms.c
|
||||
@@ -233,11 +233,11 @@ static struct symbol *__add_symbol(const char *name, enum symbol_type type,
|
||||
free_list(last_enum_expr, NULL);
|
||||
last_enum_expr = NULL;
|
||||
enum_counter = 0;
|
||||
- if (!name)
|
||||
- /* Anonymous enum definition, nothing more to do */
|
||||
- return NULL;
|
||||
}
|
||||
|
||||
+ if (!name)
|
||||
+ return NULL;
|
||||
+
|
||||
h = crc32(name) % HASH_BUCKETS;
|
||||
for (sym = symtab[h]; sym; sym = sym->hash_next) {
|
||||
if (map_to_ns(sym->type) == map_to_ns(type) &&
|
@ -1,283 +0,0 @@ |
||||
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
|
||||
index dd10cf78f2d3..8f006638452b 100644
|
||||
--- a/drivers/nvme/host/pci.c
|
||||
+++ b/drivers/nvme/host/pci.c
|
||||
@@ -28,8 +28,8 @@
|
||||
#include "trace.h"
|
||||
#include "nvme.h"
|
||||
|
||||
-#define SQ_SIZE(depth) (depth * sizeof(struct nvme_command))
|
||||
-#define CQ_SIZE(depth) (depth * sizeof(struct nvme_completion))
|
||||
+#define SQ_SIZE(q) ((q)->q_depth * sizeof(struct nvme_command))
|
||||
+#define CQ_SIZE(q) ((q)->q_depth * sizeof(struct nvme_completion))
|
||||
|
||||
#define SGES_PER_PAGE (PAGE_SIZE / sizeof(struct nvme_sgl_desc))
|
||||
|
||||
@@ -1344,16 +1344,16 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
|
||||
|
||||
static void nvme_free_queue(struct nvme_queue *nvmeq)
|
||||
{
|
||||
- dma_free_coherent(nvmeq->dev->dev, CQ_SIZE(nvmeq->q_depth),
|
||||
+ dma_free_coherent(nvmeq->dev->dev, CQ_SIZE(nvmeq),
|
||||
(void *)nvmeq->cqes, nvmeq->cq_dma_addr);
|
||||
if (!nvmeq->sq_cmds)
|
||||
return;
|
||||
|
||||
if (test_and_clear_bit(NVMEQ_SQ_CMB, &nvmeq->flags)) {
|
||||
pci_free_p2pmem(to_pci_dev(nvmeq->dev->dev),
|
||||
- nvmeq->sq_cmds, SQ_SIZE(nvmeq->q_depth));
|
||||
+ nvmeq->sq_cmds, SQ_SIZE(nvmeq));
|
||||
} else {
|
||||
- dma_free_coherent(nvmeq->dev->dev, SQ_SIZE(nvmeq->q_depth),
|
||||
+ dma_free_coherent(nvmeq->dev->dev, SQ_SIZE(nvmeq),
|
||||
nvmeq->sq_cmds, nvmeq->sq_dma_addr);
|
||||
}
|
||||
}
|
||||
@@ -1433,12 +1433,12 @@ static int nvme_cmb_qdepth(struct nvme_dev *dev, int nr_io_queues,
|
||||
}
|
||||
|
||||
static int nvme_alloc_sq_cmds(struct nvme_dev *dev, struct nvme_queue *nvmeq,
|
||||
- int qid, int depth)
|
||||
+ int qid)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
|
||||
if (qid && dev->cmb_use_sqes && (dev->cmbsz & NVME_CMBSZ_SQS)) {
|
||||
- nvmeq->sq_cmds = pci_alloc_p2pmem(pdev, SQ_SIZE(depth));
|
||||
+ nvmeq->sq_cmds = pci_alloc_p2pmem(pdev, SQ_SIZE(nvmeq));
|
||||
if (nvmeq->sq_cmds) {
|
||||
nvmeq->sq_dma_addr = pci_p2pmem_virt_to_bus(pdev,
|
||||
nvmeq->sq_cmds);
|
||||
@@ -1447,11 +1447,11 @@ static int nvme_alloc_sq_cmds(struct nvme_dev *dev, struct nvme_queue *nvmeq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
- pci_free_p2pmem(pdev, nvmeq->sq_cmds, SQ_SIZE(depth));
|
||||
+ pci_free_p2pmem(pdev, nvmeq->sq_cmds, SQ_SIZE(nvmeq));
|
||||
}
|
||||
}
|
||||
|
||||
- nvmeq->sq_cmds = dma_alloc_coherent(dev->dev, SQ_SIZE(depth),
|
||||
+ nvmeq->sq_cmds = dma_alloc_coherent(dev->dev, SQ_SIZE(nvmeq),
|
||||
&nvmeq->sq_dma_addr, GFP_KERNEL);
|
||||
if (!nvmeq->sq_cmds)
|
||||
return -ENOMEM;
|
||||
@@ -1465,12 +1465,13 @@ static int nvme_alloc_queue(struct nvme_dev *dev, int qid, int depth)
|
||||
if (dev->ctrl.queue_count > qid)
|
||||
return 0;
|
||||
|
||||
- nvmeq->cqes = dma_alloc_coherent(dev->dev, CQ_SIZE(depth),
|
||||
+ nvmeq->q_depth = depth;
|
||||
+ nvmeq->cqes = dma_alloc_coherent(dev->dev, CQ_SIZE(nvmeq),
|
||||
&nvmeq->cq_dma_addr, GFP_KERNEL);
|
||||
if (!nvmeq->cqes)
|
||||
goto free_nvmeq;
|
||||
|
||||
- if (nvme_alloc_sq_cmds(dev, nvmeq, qid, depth))
|
||||
+ if (nvme_alloc_sq_cmds(dev, nvmeq, qid))
|
||||
goto free_cqdma;
|
||||
|
||||
nvmeq->dev = dev;
|
||||
@@ -1479,15 +1480,14 @@ static int nvme_alloc_queue(struct nvme_dev *dev, int qid, int depth)
|
||||
nvmeq->cq_head = 0;
|
||||
nvmeq->cq_phase = 1;
|
||||
nvmeq->q_db = &dev->dbs[qid * 2 * dev->db_stride];
|
||||
- nvmeq->q_depth = depth;
|
||||
nvmeq->qid = qid;
|
||||
dev->ctrl.queue_count++;
|
||||
|
||||
return 0;
|
||||
|
||||
free_cqdma:
|
||||
- dma_free_coherent(dev->dev, CQ_SIZE(depth), (void *)nvmeq->cqes,
|
||||
- nvmeq->cq_dma_addr);
|
||||
+ dma_free_coherent(dev->dev, CQ_SIZE(nvmeq), (void *)nvmeq->cqes,
|
||||
+ nvmeq->cq_dma_addr);
|
||||
free_nvmeq:
|
||||
return -ENOMEM;
|
||||
}
|
||||
@@ -1515,7 +1515,7 @@ static void nvme_init_queue(struct nvme_queue *nvmeq, u16 qid)
|
||||
nvmeq->cq_head = 0;
|
||||
nvmeq->cq_phase = 1;
|
||||
nvmeq->q_db = &dev->dbs[qid * 2 * dev->db_stride];
|
||||
- memset((void *)nvmeq->cqes, 0, CQ_SIZE(nvmeq->q_depth));
|
||||
+ memset((void *)nvmeq->cqes, 0, CQ_SIZE(nvmeq));
|
||||
nvme_dbbuf_init(dev, nvmeq, qid);
|
||||
dev->online_queues++;
|
||||
wmb(); /* ensure the first interrupt sees the initialization */
|
||||
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
|
||||
index cc09b81fc7f4..716ebe87a2b8 100644
|
||||
--- a/drivers/nvme/host/core.c
|
||||
+++ b/drivers/nvme/host/core.c
|
||||
@@ -1986,6 +1986,7 @@ int nvme_enable_ctrl(struct nvme_ctrl *ctrl, u64 cap)
|
||||
ctrl->ctrl_config = NVME_CC_CSS_NVM;
|
||||
ctrl->ctrl_config |= (page_shift - 12) << NVME_CC_MPS_SHIFT;
|
||||
ctrl->ctrl_config |= NVME_CC_AMS_RR | NVME_CC_SHN_NONE;
|
||||
+ /* Use default IOSQES. We'll update it later if needed */
|
||||
ctrl->ctrl_config |= NVME_CC_IOSQES | NVME_CC_IOCQES;
|
||||
ctrl->ctrl_config |= NVME_CC_ENABLE;
|
||||
|
||||
@@ -2698,6 +2699,30 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
|
||||
ctrl->hmmin = le32_to_cpu(id->hmmin);
|
||||
ctrl->hmminds = le32_to_cpu(id->hmminds);
|
||||
ctrl->hmmaxd = le16_to_cpu(id->hmmaxd);
|
||||
+
|
||||
+ /* Grab required IO queue size */
|
||||
+ ctrl->iosqes = id->sqes & 0xf;
|
||||
+ if (ctrl->iosqes < NVME_NVM_IOSQES) {
|
||||
+ dev_err(ctrl->device,
|
||||
+ "unsupported required IO queue size %d\n", ctrl->iosqes);
|
||||
+ ret = -EINVAL;
|
||||
+ goto out_free;
|
||||
+ }
|
||||
+ /*
|
||||
+ * If our IO queue size isn't the default, update the setting
|
||||
+ * in CC:IOSQES.
|
||||
+ */
|
||||
+ if (ctrl->iosqes != NVME_NVM_IOSQES) {
|
||||
+ ctrl->ctrl_config &= ~(0xfu << NVME_CC_IOSQES_SHIFT);
|
||||
+ ctrl->ctrl_config |= ctrl->iosqes << NVME_CC_IOSQES_SHIFT;
|
||||
+ ret = ctrl->ops->reg_write32(ctrl, NVME_REG_CC,
|
||||
+ ctrl->ctrl_config);
|
||||
+ if (ret) {
|
||||
+ dev_err(ctrl->device,
|
||||
+ "error updating CC register\n");
|
||||
+ goto out_free;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
ret = nvme_mpath_init(ctrl, id);
|
||||
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
|
||||
index 716a876119c8..34ef35fcd8a5 100644
|
||||
--- a/drivers/nvme/host/nvme.h
|
||||
+++ b/drivers/nvme/host/nvme.h
|
||||
@@ -244,6 +244,7 @@ struct nvme_ctrl {
|
||||
u32 hmmin;
|
||||
u32 hmminds;
|
||||
u16 hmmaxd;
|
||||
+ u8 iosqes;
|
||||
|
||||
/* Fabrics only */
|
||||
u16 sqsize;
|
||||
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
|
||||
index 8f006638452b..54b35ea4af88 100644
|
||||
--- a/drivers/nvme/host/pci.c
|
||||
+++ b/drivers/nvme/host/pci.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "trace.h"
|
||||
#include "nvme.h"
|
||||
|
||||
-#define SQ_SIZE(q) ((q)->q_depth * sizeof(struct nvme_command))
|
||||
+#define SQ_SIZE(q) ((q)->q_depth << (q)->sqes)
|
||||
#define CQ_SIZE(q) ((q)->q_depth * sizeof(struct nvme_completion))
|
||||
|
||||
#define SGES_PER_PAGE (PAGE_SIZE / sizeof(struct nvme_sgl_desc))
|
||||
@@ -162,7 +162,7 @@ static inline struct nvme_dev *to_nvme_dev(struct nvme_ctrl *ctrl)
|
||||
struct nvme_queue {
|
||||
struct nvme_dev *dev;
|
||||
spinlock_t sq_lock;
|
||||
- struct nvme_command *sq_cmds;
|
||||
+ void *sq_cmds;
|
||||
/* only used for poll queues: */
|
||||
spinlock_t cq_poll_lock ____cacheline_aligned_in_smp;
|
||||
volatile struct nvme_completion *cqes;
|
||||
@@ -178,6 +178,7 @@ struct nvme_queue {
|
||||
u16 last_cq_head;
|
||||
u16 qid;
|
||||
u8 cq_phase;
|
||||
+ u8 sqes;
|
||||
unsigned long flags;
|
||||
#define NVMEQ_ENABLED 0
|
||||
#define NVMEQ_SQ_CMB 1
|
||||
@@ -488,7 +489,8 @@ static void nvme_submit_cmd(struct nvme_queue *nvmeq, struct nvme_command *cmd,
|
||||
bool write_sq)
|
||||
{
|
||||
spin_lock(&nvmeq->sq_lock);
|
||||
- memcpy(&nvmeq->sq_cmds[nvmeq->sq_tail], cmd, sizeof(*cmd));
|
||||
+ memcpy(nvmeq->sq_cmds + (nvmeq->sq_tail << nvmeq->sqes),
|
||||
+ cmd, sizeof(*cmd));
|
||||
if (++nvmeq->sq_tail == nvmeq->q_depth)
|
||||
nvmeq->sq_tail = 0;
|
||||
nvme_write_sq_db(nvmeq, write_sq);
|
||||
@@ -1465,6 +1467,7 @@ static int nvme_alloc_queue(struct nvme_dev *dev, int qid, int depth)
|
||||
if (dev->ctrl.queue_count > qid)
|
||||
return 0;
|
||||
|
||||
+ nvmeq->sqes = qid ? dev->ctrl.iosqes : NVME_NVM_ADMSQES;
|
||||
nvmeq->q_depth = depth;
|
||||
nvmeq->cqes = dma_alloc_coherent(dev->dev, CQ_SIZE(nvmeq),
|
||||
&nvmeq->cq_dma_addr, GFP_KERNEL);
|
||||
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
|
||||
index 01aa6a6c241d..7af18965fb57 100644
|
||||
--- a/include/linux/nvme.h
|
||||
+++ b/include/linux/nvme.h
|
||||
@@ -141,6 +141,7 @@ enum {
|
||||
* (In bytes and specified as a power of two (2^n)).
|
||||
*/
|
||||
#define NVME_NVM_IOSQES 6
|
||||
+#define NVME_NVM_ADMSQES 6
|
||||
#define NVME_NVM_IOCQES 4
|
||||
|
||||
enum {
|
||||
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
|
||||
index 716ebe87a2b8..480ea24d8cf4 100644
|
||||
--- a/drivers/nvme/host/core.c
|
||||
+++ b/drivers/nvme/host/core.c
|
||||
@@ -2701,7 +2701,10 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
|
||||
ctrl->hmmaxd = le16_to_cpu(id->hmmaxd);
|
||||
|
||||
/* Grab required IO queue size */
|
||||
- ctrl->iosqes = id->sqes & 0xf;
|
||||
+ if (ctrl->quirks & NVME_QUIRK_128_BYTES_SQES)
|
||||
+ ctrl->iosqes = 7;
|
||||
+ else
|
||||
+ ctrl->iosqes = id->sqes & 0xf;
|
||||
if (ctrl->iosqes < NVME_NVM_IOSQES) {
|
||||
dev_err(ctrl->device,
|
||||
"unsupported required IO queue size %d\n", ctrl->iosqes);
|
||||
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
|
||||
index 34ef35fcd8a5..b2a78d08b984 100644
|
||||
--- a/drivers/nvme/host/nvme.h
|
||||
+++ b/drivers/nvme/host/nvme.h
|
||||
@@ -92,6 +92,16 @@ enum nvme_quirks {
|
||||
* Broken Write Zeroes.
|
||||
*/
|
||||
NVME_QUIRK_DISABLE_WRITE_ZEROES = (1 << 9),
|
||||
+
|
||||
+ /*
|
||||
+ * Use only one interrupt vector for all queues
|
||||
+ */
|
||||
+ NVME_QUIRK_SINGLE_VECTOR = (1 << 10),
|
||||
+
|
||||
+ /*
|
||||
+ * Use non-standard 128 bytes SQEs.
|
||||
+ */
|
||||
+ NVME_QUIRK_128_BYTES_SQES = (1 << 11),
|
||||
};
|
||||
|
||||
/*
|
||||
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
|
||||
index 54b35ea4af88..ab2358137419 100644
|
||||
--- a/drivers/nvme/host/pci.c
|
||||
+++ b/drivers/nvme/host/pci.c
|
||||
@@ -2080,6 +2080,9 @@ static int nvme_setup_irqs(struct nvme_dev *dev, unsigned int nr_io_queues)
|
||||
dev->io_queues[HCTX_TYPE_DEFAULT] = 1;
|
||||
dev->io_queues[HCTX_TYPE_READ] = 0;
|
||||
|
||||
+ if (dev->ctrl.quirks & NVME_QUIRK_SINGLE_VECTOR)
|
||||
+ irq_queues = 1;
|
||||
+
|
||||
return pci_alloc_irq_vectors_affinity(pdev, 1, irq_queues,
|
||||
PCI_IRQ_ALL_TYPES | PCI_IRQ_AFFINITY, &affd);
|
||||
}
|
||||
@@ -3037,6 +3040,9 @@ static const struct pci_device_id nvme_id_table[] = {
|
||||
{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
|
||||
+ { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2005),
|
||||
+ .driver_data = NVME_QUIRK_SINGLE_VECTOR |
|
||||
+ NVME_QUIRK_128_BYTES_SQES },
|
||||
{ 0, }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, nvme_id_table);
|
@ -1,85 +0,0 @@ |
||||
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
|
||||
--- a/fs/9p/vfs_inode.c
|
||||
+++ b/fs/9p/vfs_inode.c
|
||||
@@ -483,6 +483,9 @@ static int v9fs_test_inode(struct inode *inode, void *data)
|
||||
|
||||
if (v9inode->qid.type != st->qid.type)
|
||||
return 0;
|
||||
+
|
||||
+ if (v9inode->qid.path != st->qid.path)
|
||||
+ return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
|
||||
--- a/fs/9p/vfs_inode_dotl.c
|
||||
+++ b/fs/9p/vfs_inode_dotl.c
|
||||
@@ -87,6 +87,9 @@ static int v9fs_test_inode_dotl(struct inode *inode, void *data)
|
||||
|
||||
if (v9inode->qid.type != st->qid.type)
|
||||
return 0;
|
||||
+
|
||||
+ if (v9inode->qid.path != st->qid.path)
|
||||
+ return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
diff --git a/net/9p/client.c b/net/9p/client.c
|
||||
index 3ce672af1596..f1c8ad373f90 100644
|
||||
--- a/net/9p/client.c
|
||||
+++ b/net/9p/client.c
|
||||
@@ -749,8 +749,7 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
|
||||
}
|
||||
again:
|
||||
/* Wait for the response */
|
||||
- err = wait_event_interruptible(*req->wq,
|
||||
- req->status >= REQ_STATUS_RCVD);
|
||||
+ err = wait_event_killable(*req->wq, req->status >= REQ_STATUS_RCVD);
|
||||
|
||||
/*
|
||||
* Make sure our req is coherent with regard to updates in other
|
||||
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
|
||||
index f24b25c25106..f3a4efcf1456 100644
|
||||
--- a/net/9p/trans_virtio.c
|
||||
+++ b/net/9p/trans_virtio.c
|
||||
@@ -286,8 +286,8 @@ p9_virtio_request(struct p9_client *client, struct p9_req_t *req)
|
||||
if (err == -ENOSPC) {
|
||||
chan->ring_bufs_avail = 0;
|
||||
spin_unlock_irqrestore(&chan->lock, flags);
|
||||
- err = wait_event_interruptible(*chan->vc_wq,
|
||||
- chan->ring_bufs_avail);
|
||||
+ err = wait_event_killable(*chan->vc_wq,
|
||||
+ chan->ring_bufs_avail);
|
||||
if (err == -ERESTARTSYS)
|
||||
return err;
|
||||
|
||||
@@ -327,7 +327,7 @@ static int p9_get_mapped_pages(struct virtio_chan *chan,
|
||||
* Other zc request to finish here
|
||||
*/
|
||||
if (atomic_read(&vp_pinned) >= chan->p9_max_pages) {
|
||||
- err = wait_event_interruptible(vp_wq,
|
||||
+ err = wait_event_killable(vp_wq,
|
||||
(atomic_read(&vp_pinned) < chan->p9_max_pages));
|
||||
if (err == -ERESTARTSYS)
|
||||
return err;
|
||||
@@ -471,8 +471,8 @@ p9_virtio_zc_request(struct p9_client *client, struct p9_req_t *req,
|
||||
if (err == -ENOSPC) {
|
||||
chan->ring_bufs_avail = 0;
|
||||
spin_unlock_irqrestore(&chan->lock, flags);
|
||||
- err = wait_event_interruptible(*chan->vc_wq,
|
||||
- chan->ring_bufs_avail);
|
||||
+ err = wait_event_killable(*chan->vc_wq,
|
||||
+ chan->ring_bufs_avail);
|
||||
if (err == -ERESTARTSYS)
|
||||
goto err_out;
|
||||
|
||||
@@ -489,8 +489,7 @@ p9_virtio_zc_request(struct p9_client *client, struct p9_req_t *req,
|
||||
virtqueue_kick(chan->vq);
|
||||
spin_unlock_irqrestore(&chan->lock, flags);
|
||||
p9_debug(P9_DEBUG_TRANS, "virtio request kicked\n");
|
||||
- err = wait_event_interruptible(*req->wq,
|
||||
- req->status >= REQ_STATUS_RCVD);
|
||||
+ err = wait_event_killable(*req->wq, req->status >= REQ_STATUS_RCVD);
|
||||
/*
|
||||
* Non kernel buffers are pinned, unpin them
|
||||
*/
|
@ -0,0 +1,38 @@ |
||||
diff --git a/lib/Echidna/Config.hs b/lib/Echidna/Config.hs
|
||||
index f8d5777..3d761fe 100644
|
||||
--- a/lib/Echidna/Config.hs
|
||||
+++ b/lib/Echidna/Config.hs
|
||||
@@ -13,8 +13,8 @@ import Control.Monad.State (StateT(..), runStateT)
|
||||
import Control.Monad.Trans (lift)
|
||||
import Data.Bool (bool)
|
||||
import Data.Aeson
|
||||
+import Data.Aeson.KeyMap (keys)
|
||||
import Data.Has (Has(..))
|
||||
-import Data.HashMap.Strict (keys)
|
||||
import Data.HashSet (fromList, insert, difference)
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Data.Text (isPrefixOf)
|
||||
@@ -23,11 +23,13 @@ import EVM.Types (w256)
|
||||
|
||||
import qualified Control.Monad.Fail as M (MonadFail(..))
|
||||
import qualified Data.ByteString as BS
|
||||
+import qualified Data.Aeson.Key as Key
|
||||
+import qualified Data.HashSet as HS
|
||||
import qualified Data.List.NonEmpty as NE
|
||||
import qualified Data.Yaml as Y
|
||||
|
||||
import Echidna.Test
|
||||
-import Echidna.Types.Campaign
|
||||
+import Echidna.Types.Campaign
|
||||
import Echidna.Mutator.Corpus (defaultMutationConsts)
|
||||
import Echidna.Types.Config (EConfigWithUsage(..), EConfig(..))
|
||||
import Echidna.Types.Solidity
|
||||
@@ -52,7 +54,7 @@ instance FromJSON EConfigWithUsage where
|
||||
_ -> mempty
|
||||
(c, ks) <- runStateT (parser v') $ fromList []
|
||||
let found = fromList (keys v')
|
||||
- return $ EConfigWithUsage c (found `difference` ks) (ks `difference` found)
|
||||
+ return $ EConfigWithUsage c (HS.map Key.toText $ found `difference` ks) (HS.map Key.toText $ ks `difference` found)
|
||||
-- this parser runs in StateT and comes equipped with the following
|
||||
-- equivalent unary operators:
|
||||
-- x .:? k (Parser) <==> x ..:? k (StateT)
|
Loading…
Reference in new issue