From: Wolfgang Denk Date: Mon, 22 Aug 2011 23:42:36 +0200 Subject: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer In-Reply-To: <1314043924-22130-1-git-send-email-robotboy@chromium.org> References: <1314043924-22130-1-git-send-email-robotboy@chromium.org> Message-ID: <20110822214236.217D611F9E74@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Anton Staaf, In message <1314043924-22130-1-git-send-email-robotboy@chromium.org> you wrote: > Currently, if a device read request is done that does not begin or end > on a sector boundary a stack allocated bounce buffer is used to perform > the read, and then just the part of the sector that is needed is copied > into the users buffer. This stack allocation can mean that the bounce > buffer will not be aligned to the dcache line size. This is a problem > when caches are enabled because unaligned cache invalidates are not > safe. > > This patch allocates a cache line size aligned sector sized bounce > buffer the first time that ext2fs_devread is called. ...and never frees ist, which is a bad thing. Please fix. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de NOTE: The Most Fundamental Particles in This Product Are Held Together by a "Gluing" Force About Which Little is Currently Known and Whose Adhesive Power Can Therefore Not Be Permanently Guaranteed.