Changeset 7f7d642 in mainline for kernel/arch/ppc32/src/ppc32.c


Ignore:
Timestamp:
2018-08-31T10:52:51Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
516e780
Parents:
6bf5b8c
git-author:
Jakub Jermar <jakub@…> (2018-08-31 10:52:43)
git-committer:
Jakub Jermar <jakub@…> (2018-08-31 10:52:51)
Message:

Let km_map() handle the unaligned addresses

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/ppc32.c

    r6bf5b8c r7f7d642  
    237237#ifdef CONFIG_MAC_KBD
    238238                uintptr_t pa = assigned_address[0].addr + 0x16000;
    239                 uintptr_t aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE);
    240                 size_t offset = pa - aligned_addr;
    241239                size_t size = 2 * PAGE_SIZE;
    242240
    243                 cuda_t *cuda = (cuda_t *) (km_map(aligned_addr, offset + size,
    244                     KM_NATURAL_ALIGNMENT,
    245                     PAGE_WRITE | PAGE_NOT_CACHEABLE) + offset);
     241                cuda_t *cuda = (cuda_t *) km_map(pa, size, KM_NATURAL_ALIGNMENT,
     242                    PAGE_WRITE | PAGE_NOT_CACHEABLE);
    246243
    247244                /* Initialize I/O controller */
Note: See TracChangeset for help on using the changeset viewer.