Skip to content
Snippets Groups Projects
  1. Jan 19, 2018
    • Eugeniy Paltsev's avatar
      ARC: Cache: Disable IOC by default · b0146f9e
      Eugeniy Paltsev authored
      
      We'd like to keep IOC HW at the same state as t is right after reset when we
      start Linux kernel so there will be no re-configuration of IOC on the go.
      
      The point is U-Boot doesn't benefit a lot from IOC as it doesn't do a
      lot of DMA operations especially on multiple cores simultaneously.
      
      At the same time re-configuration of IOC in run-time might become quite
      a tricky experience because we need to make sure there're no DMA
      trannsactions in flight otherwise unexpected consequencses might affect
      us much later and debugging those kinds of issues will be a real
      nightmare.
      
      That said let's make our life easier a little bit.
      
      Signed-off-by: default avatarEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
      Signed-off-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      b0146f9e
    • Eugeniy Paltsev's avatar
      ARC: ARCv2: Cache: Fixed operation without IOC · 41cada4d
      Eugeniy Paltsev authored
      Previous SLC management implementation is broken. Seems like it was
      never sufficiently tested probably because most of the time IOC was used
      instead (i.e. no manual cache operations were done).
      
      Now if we disable IOC in U-boot we'll get a lot of errors while using
      DMA-enabled peripherals.
      
      This time we fix it by substitution of broken per-line SLC operations
      region operations as it is done in the Linux kernel (we took it from
      v4.14 which is the latest stable as of today).
      
      Among other things this implementation might be a bit faster because
      instead of iteration over each and every cache line we're taking care
      about entire region in one go.
      
      Main changes:
       * Replaced __slc_line_op (per line operations) by __slc_rgn_op
         (region operations).
      
       * Reworked __slc_entire_op to get rid of __after_slc_op and
         __before_slc_op functions.
         Note flush fix (flush only instead of flush-n-inv when OP_FLUSH is
         used, see [1] for more details) is already incorporated here.
      
       * Added SLC invalidation to invalidate_icache_all().
      
       * Added (start >= end) check to invalidate_dcache_range() and
         flush_dcache_range() as some buggy drivers pass region start == end.
      
       * Added read-out of MMU BCR so we may know if PAE40 exists in HW and then
         act on a particular AUX regs accordingly.
      
      [1] http://lists.infradead.org/pipermail/linux-snps-arc/2018-January/003357.html
      
      
      
      Signed-off-by: default avatarEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
      Signed-off-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      41cada4d
  2. Jan 17, 2018
  3. Jan 16, 2018
  4. Jan 15, 2018
Loading