Commit 632c6868 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] explicitly define PRD_ENTRIES to 256

From: William Lee Irwin III <wli@holomorphy.com>

PRD_ENTRIES is specified to be precisely 256; on platforms where
PAGE_SIZE varies from 4KB the calculation in the current expression
defining it is inaccurate, which may cause crashes. This patch changes
it to the constant literal 256.
parent af59721c
...@@ -224,7 +224,7 @@ typedef unsigned char byte; /* used everywhere */ ...@@ -224,7 +224,7 @@ typedef unsigned char byte; /* used everywhere */
* allowing each to have about 256 entries (8 bytes each) from this. * allowing each to have about 256 entries (8 bytes each) from this.
*/ */
#define PRD_BYTES 8 #define PRD_BYTES 8
#define PRD_ENTRIES (PAGE_SIZE / (2 * PRD_BYTES)) #define PRD_ENTRIES 256
/* /*
* Some more useful definitions * Some more useful definitions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment