08 Dec, 2018

1 commit

  • commit b7cc40c32a8bfa6f2581a71747f6a7d491fe43ba upstream.

    Change the default defconfig (used with 'make defconfig') to the ARCv2
    nsim_hs_defconfig, and also switch the default Kconfig ISA selection to
    ARCv2.

    This allows several default defconfigs (e.g. make defconfig, make
    allnoconfig, make tinyconfig) to all work with ARCv2 by default.

    Note since we change default architecture from ARCompact to ARCv2
    it's required to explicitly mention architecture type in ARCompact
    defconfigs otherwise ARCv2 will be implied and binaries will be
    generated for ARCv2.

    Cc: # 4.4.x
    Signed-off-by: Kevin Hilman
    Signed-off-by: Alexey Brodkin
    Signed-off-by: Vineet Gupta
    Signed-off-by: Greg Kroah-Hartman

    Kevin Hilman
     

05 Sep, 2018

1 commit

  • [ Upstream commit eb2777397fd83a4a7eaa26984d09d3babb845d2a ]

    As for today we don't setup SMP_CACHE_BYTES and cache_line_size for
    ARC, so they are set to L1_CACHE_BYTES by default. L1 line length
    (L1_CACHE_BYTES) might be easily smaller than L2 line (which is
    usually the case BTW). This breaks code.

    For example this breaks ethernet infrastructure on HSDK/AXS103 boards
    with IOC disabled, involving manual cache flushes
    Functions which alloc and manage sk_buff packet data area rely on
    SMP_CACHE_BYTES define. In the result we can share last L2 cache
    line in sk_buff linear packet data area between DMA buffer and
    some useful data in other structure. So we can lose this data when
    we invalidate DMA buffer.

    sk_buff linear packet data area
    |
    |
    | skb->end skb->tail
    V | |
    V V
    ----------------------------------------------.
    packet data | |
    ----------------------------------------------.

    ---------------------.--------------------------------------------------.
    SLC line | SLC (L2 cache) line (128B) |
    ---------------------.--------------------------------------------------.
    ^ ^
    | |
    These cache lines will be invalidated when we invalidate skb
    linear packet data area before DMA transaction starting.

    This leads to issues painful to debug as it reproduces only if
    (sk_buff->end - sk_buff->tail) < SLC_LINE_SIZE and
    if we have some useful data right after sk_buff->end.

    Fix that by hardcode SMP_CACHE_BYTES to max line length we may have.

    Signed-off-by: Eugeniy Paltsev
    Signed-off-by: Vineet Gupta

    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Eugeniy Paltsev
     

25 Jul, 2018

1 commit

  • commit af1fc5baa724c63ce1733dfcf855bad5ef6078e3 upstream.

    This manifsted as strace segfaulting on HSDK because gcc was targetting
    the accumulator registers as GPRs, which kernek was not saving/restoring
    by default.

    Cc: stable@vger.kernel.org #4.14+
    Signed-off-by: Vineet Gupta
    Signed-off-by: Greg Kroah-Hartman

    Vineet Gupta
     

30 May, 2018

1 commit

  • [ Upstream commit 827cc2fa024dd6517d62de7a44c7b42f32af371b ]

    'default N' should be 'default n', though they happen to have the same
    effect here, due to undefined symbols (N in this case) evaluating to n
    in a tristate sense.

    Remove the default from ARC_EMUL_UNALIGNED instead of changing it. bool
    and tristate symbols implicitly default to n.

    Discovered with the
    https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ulfalizer_Kconfiglib_blob_master_examples_list-5Fundefined.py&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=c14YS-cH-kdhTOW89KozFhBtBJgs1zXscZojEZQ0THs&m=WxxD8ozR7QQUVzNCBksiznaisBGO_crN7PBOvAoju8s&s=1LmxsNqxwT-7wcInVpZ6Z1J27duZKSoyKxHIJclXU_M&e=
    script.

    Signed-off-by: Ulf Magnusson
    Signed-off-by: Vineet Gupta
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Ulf Magnusson
     

04 Oct, 2017

1 commit


02 Sep, 2017

2 commits

  • This initial port adds support of ARC HS Development Kit board with some
    basic features such serial port, USB, SD/MMC and Ethernet.

    Essentially we run Linux kernel on all 4 cores (i.e. utilize SMP) and
    heavily use IO Coherency for speeding-up DMA-aware peripherals.

    Note as opposed to other ARC boards we link Linux kernel to
    0x9000_0000 intentionally because cores 1 and 3 configured with DCCM
    situated at our more usual link base 0x8000_0000. We still can use
    memory region starting at 0x8000_0000 as we reallocate DCCM in our
    platform code.

    Note that PAE remapping for DMA clients does not work due to an RTL bug,
    so CREG_PAE register must be programmed to all zeroes, otherwise it will
    cause problems with DMA to/from peripherals even if PAE40 is not used.

    Acked-by: Rob Herring
    Signed-off-by: Alexey Brodkin
    Signed-off-by: Eugeniy Paltsev
    Signed-off-by: Vineet Gupta

    Alexey Brodkin
     
  • [Needed for HSDK]

    Currently the first page of system (hence RAM base) is assumed to be
    @ CONFIG_LINUX_LINK_BASE, where kernel itself is linked.

    However is case of HSDK platform, for reasons explained in that patch,
    this is not true. kernel needs to be linked @ 0x9000_0000 while DDR
    is still wired at 0x8000_0000. To properly account for this 256M of RAM,
    we need to introduce a new option and base page frame accountiing off of
    it.

    Signed-off-by: Eugeniy Paltsev
    Signed-off-by: Vineet Gupta
    [vgupta: renamed CONFIG_KERNEL_RAM_BASE_ADDRESS => CONFIG_LINUX_RAM_BASE
    : simplified changelog]

    Eugeniy Paltsev
     

04 Aug, 2017

1 commit


06 May, 2017

1 commit

  • This reverts commit 7cab91b87dd8eeee5911ec34be8bb0288ebba18b.

    Now when we have a real hardware platform with PAE40 enabled
    (here I mean axs103 with firmware v1.2) and 1 Gb of DDR mapped to
    0x1_a000_0000-0x1_ffff_ffff we're really targeting memory above 4Gb
    when PAE40 is enabled. This in its turn requires HIGHMEM to be enabled
    otherwise user won't see any difference with enabling PAE in
    kernel configuration as only lowmem will be used anyways.

    Signed-off-by: Alexey Brodkin
    Signed-off-by: Vineet Gupta

    Alexey Brodkin
     

21 Apr, 2017

1 commit

  • Accumulator is present in configs with FPU and/or DSP MPY (mpy > 6)

    Instead of doing this in pt_regs (and thus every kernel entry/exit),
    this could have been done in context switch (and for user task only) as
    currently kernel doesn't clobber these registers for its own accord.
    However we will soon start using 64-bit multiply instructions for kernel
    which can clobber these. Also gcc folks also plan to start using these
    as GPRs, hence better to always save/restore them

    Signed-off-by: Vineet Gupta

    Vineet Gupta
     

07 Feb, 2017

2 commits

  • A typical SMP system expects cache coherency. Initial NPS platform
    support was slated to be SMP w/o cache coherency.

    However it seems the platform now selects that option, so there is no
    point in keeping it around.

    Signed-off-by: Vineet Gupta

    Vineet Gupta
     
  • Currently Kconfig knob ARC_NUMBER_OF_INTERRUPTS is used as indicator of
    hard irq count. But it is flawed that it doesn't affect
    - NR_IRQS : for number of virtual interrupts
    - NR_CPU_IRQS : for number of hardware interrupts

    Moreover the actual hardware irq count might still not be same as
    ARC_NUMBER_OF_INTERRUPTS. So use the information availble in the
    Build Configuration Registers and get rid of the Kconfig option.

    We still need "some" build time info about irq count to set up
    sufficient number of vector table entries. This is done with a
    sufficiently large NR_CPU_IRQS which will eventually be used soley for
    that purpose (subsequent patches will remove its usage elsewhere)

    So to summarize what this patch does:

    * NR_CPU_IRQS defines a maximum number of hardware interrupts.
    * Remove ARC_NUMBER_OF_INTERRUPTS option and create interrupts
    table for all possible hardware interrupts.
    * Increase a maximum number of virtual IRQs to 512. ARCv2 can
    support 240 interrupts in the core interrupts controllers
    and 128 interrupts in IDU. Thus 512 virtual IRQs must be
    enough for most configurations of boards.

    This patch leads to NR_CPU_IRQS in 2 places, to reduce the overall
    churn. The next patch will remove the 2nd definition anyways.

    Signed-off-by: Yuriy Kolerov
    Signed-off-by: Vineet Gupta
    [vgupta: reworked the changelog a bit]

    Yuriy Kolerov
     

19 Jan, 2017

1 commit

  • commit d65283f7b695b5 added mod->arch.secstr under
    CONFIG_ARC_DW2_UNWIND, but used it unconditionally which broke builds
    when the option was disabled. Fix that by adjusting the #ifdef guard.

    And while at it add a missing guard (for unwinder) in module.c as well

    Reported-by: Waldemar Brodkorb
    Cc: stable@vger.kernel.org #4.9
    Fixes: d65283f7b695b5 ("ARC: module: elide loop to save reference to .eh_frame")
    Tested-by: Anton Kolesov
    Reviewed-by: Alexey Brodkin
    [abrodkin: provided fixlet to Kconfig per failure in allnoconfig build]
    Signed-off-by: Vineet Gupta

    Vineet Gupta
     

19 Dec, 2016

1 commit


01 Dec, 2016

2 commits

  • This adds support for

    - CONFIG_ARC_TIMERS : legacy 32-bit TIMER0 and TIMER1 which count UP
    from @CNT to @LIMIT, before optionally triggering an interrupt.
    These are programmed using ARC auxiliary register interface.
    These are present in all ARC cores (ARC700 and ARC HS38)
    TIMER0 serves as clockevent for all ARC linux builds.
    TIMER1 is used for clocksource in arc700 builds.

    - CONFIG_ARC_TIMERS_64BIT: 64-bit counters, RTC and GFRC found in
    ARC HS38 cores. These are independnet IP blocks with different
    programming model respectively.

    Link: http://lkml.kernel.org/r/20161111231132.GA4186@mai
    Acked-by: Daniel Lezcano
    Signed-off-by: Vineet Gupta

    Vineet Gupta
     
  • The original distinction was done as they were developed at different
    times and primarily because they are specific to UP (RTC) and SMP (GFRC).

    But given that driver handles that at runtime, (i.e. not allowing
    RTC as clocksource in SMP), we can simplify things a bit.

    Signed-off-by: Vineet Gupta

    Vineet Gupta
     

29 Oct, 2016

1 commit


17 Oct, 2016

2 commits

  • Add support for lzma compressed uImage.

    Support for gzip was already available but could not be enabled because
    we were missing CONFIG_HAVE_KERNEL_GZIP in arch/arc/Kconfig.

    Signed-off-by: Daniel Mentz
    Cc: linux-snps-arc@lists.infradead.org
    Cc: Vineet Gupta
    Signed-off-by: Vineet Gupta

    Daniel Mentz
     
  • The IDU intc is technically part of MCIP (Multi-core IP) hence
    historically was only available in a SMP hardware build (and thus only
    in a SMP kernel build). Now that hardware restriction has been lifted,
    so a UP kernel needs to support it.

    This requires breaking mcip.c into parts which are strictly SMP
    (inter-core interrupts) and IDU which in reality is just another
    intc and thus has no bearing on SMP.

    This change allows IDU in UP builds and with a suitable device tree, we
    can have the cascaded intc system

    ARCv2 core intc ARCv2 IDU intc periperals

    Signed-off-by: Vineet Gupta

    Vineet Gupta
     

01 Oct, 2016

2 commits

  • Seem like values assigned as absolute number and not and
    shift value, i.e. should be 0 for one node (2^0) and 1 for
    couple of nodes (2^1)

    Signed-off-by: Noam Camus
    Signed-off-by: Vineet Gupta

    Noam Camus
     
  • ARCv2 ISA provides 64-bit exclusive load/stores so use them to implement
    the 64-bit atomics and elide the spinlock based generic 64-bit atomics

    boot tested with atomic64 self-test (and GOD bless the person who wrote
    them, I realized my inline assmebly is sloppy as hell)

    Cc: Peter Zijlstra
    Cc: Will Deacon
    Cc: linux-snps-arc@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Vineet Gupta

    Vineet Gupta
     

02 Jun, 2016

1 commit


31 May, 2016

2 commits


21 May, 2016

1 commit

  • The binary GCD algorithm is based on the following facts:
    1. If a and b are all evens, then gcd(a,b) = 2 * gcd(a/2, b/2)
    2. If a is even and b is odd, then gcd(a,b) = gcd(a/2, b)
    3. If a and b are all odds, then gcd(a,b) = gcd((a-b)/2, b) = gcd((a+b)/2, b)

    Even on x86 machines with reasonable division hardware, the binary
    algorithm runs about 25% faster (80% the execution time) than the
    division-based Euclidian algorithm.

    On platforms like Alpha and ARMv6 where division is a function call to
    emulation code, it's even more significant.

    There are two variants of the code here, depending on whether a fast
    __ffs (find least significant set bit) instruction is available. This
    allows the unpredictable branches in the bit-at-a-time shifting loop to
    be eliminated.

    If fast __ffs is not available, the "even/odd" GCD variant is used.

    I use the following code to benchmark:

    #include
    #include
    #include
    #include
    #include
    #include

    #define swap(a, b) \
    do { \
    a ^= b; \
    b ^= a; \
    a ^= b; \
    } while (0)

    unsigned long gcd0(unsigned long a, unsigned long b)
    {
    unsigned long r;

    if (a < b) {
    swap(a, b);
    }

    if (b == 0)
    return a;

    while ((r = a % b) != 0) {
    a = b;
    b = r;
    }

    return b;
    }

    unsigned long gcd1(unsigned long a, unsigned long b)
    {
    unsigned long r = a | b;

    if (!a || !b)
    return r;

    b >>= __builtin_ctzl(b);

    for (;;) {
    a >>= __builtin_ctzl(a);
    if (a == b)
    return a << __builtin_ctzl(r);

    if (a < b)
    swap(a, b);
    a -= b;
    }
    }

    unsigned long gcd2(unsigned long a, unsigned long b)
    {
    unsigned long r = a | b;

    if (!a || !b)
    return r;

    r &= -r;

    while (!(b & r))
    b >>= 1;

    for (;;) {
    while (!(a & r))
    a >>= 1;
    if (a == b)
    return a;

    if (a < b)
    swap(a, b);
    a -= b;
    a >>= 1;
    if (a & r)
    a += b;
    a >>= 1;
    }
    }

    unsigned long gcd3(unsigned long a, unsigned long b)
    {
    unsigned long r = a | b;

    if (!a || !b)
    return r;

    b >>= __builtin_ctzl(b);
    if (b == 1)
    return r & -r;

    for (;;) {
    a >>= __builtin_ctzl(a);
    if (a == 1)
    return r & -r;
    if (a == b)
    return a << __builtin_ctzl(r);

    if (a < b)
    swap(a, b);
    a -= b;
    }
    }

    unsigned long gcd4(unsigned long a, unsigned long b)
    {
    unsigned long r = a | b;

    if (!a || !b)
    return r;

    r &= -r;

    while (!(b & r))
    b >>= 1;
    if (b == r)
    return r;

    for (;;) {
    while (!(a & r))
    a >>= 1;
    if (a == r)
    return r;
    if (a == b)
    return a;

    if (a < b)
    swap(a, b);
    a -= b;
    a >>= 1;
    if (a & r)
    a += b;
    a >>= 1;
    }
    }

    static unsigned long (*gcd_func[])(unsigned long a, unsigned long b) = {
    gcd0, gcd1, gcd2, gcd3, gcd4,
    };

    #define TEST_ENTRIES (sizeof(gcd_func) / sizeof(gcd_func[0]))

    #if defined(__x86_64__)

    #define rdtscll(val) do { \
    unsigned long __a,__d; \
    __asm__ __volatile__("rdtsc" : "=a" (__a), "=d" (__d)); \
    (val) = ((unsigned long long)__a) | (((unsigned long long)__d)<= start)
    ret = end - start;
    else
    ret = ~0ULL - start + 1 + end;

    *res = gcd_res;
    return ret;
    }

    #else

    static inline struct timespec read_time(void)
    {
    struct timespec time;
    clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time);
    return time;
    }

    static inline unsigned long long diff_time(struct timespec start, struct timespec end)
    {
    struct timespec temp;

    if ((end.tv_nsec - start.tv_nsec) < 0) {
    temp.tv_sec = end.tv_sec - start.tv_sec - 1;
    temp.tv_nsec = 1000000000ULL + end.tv_nsec - start.tv_nsec;
    } else {
    temp.tv_sec = end.tv_sec - start.tv_sec;
    temp.tv_nsec = end.tv_nsec - start.tv_nsec;
    }

    return temp.tv_sec * 1000000000ULL + temp.tv_nsec;
    }

    static unsigned long long benchmark_gcd_func(unsigned long (*gcd)(unsigned long, unsigned long),
    unsigned long a, unsigned long b, unsigned long *res)
    {
    struct timespec start, end;
    unsigned long gcd_res;

    start = read_time();
    gcd_res = gcd(a, b);
    end = read_time();

    *res = gcd_res;
    return diff_time(start, end);
    }

    #endif

    static inline unsigned long get_rand()
    {
    if (sizeof(long) == 8)
    return (unsigned long)rand() << 32 | rand();
    else
    return rand();
    }

    int main(int argc, char **argv)
    {
    unsigned int seed = time(0);
    int loops = 100;
    int repeats = 1000;
    unsigned long (*res)[TEST_ENTRIES];
    unsigned long long elapsed[TEST_ENTRIES];
    int i, j, k;

    for (;;) {
    int opt = getopt(argc, argv, "n:r:s:");
    /* End condition always first */
    if (opt == -1)
    break;

    switch (opt) {
    case 'n':
    loops = atoi(optarg);
    break;
    case 'r':
    repeats = atoi(optarg);
    break;
    case 's':
    seed = strtoul(optarg, NULL, 10);
    break;
    default:
    /* You won't actually get here. */
    break;
    }
    }

    res = malloc(sizeof(unsigned long) * TEST_ENTRIES * loops);
    memset(elapsed, 0, sizeof(elapsed));

    srand(seed);
    for (j = 0; j < loops; j++) {
    unsigned long a = get_rand();
    /* Do we have args? */
    unsigned long b = argc > optind ? strtoul(argv[optind], NULL, 10) : get_rand();
    unsigned long long min_elapsed[TEST_ENTRIES];
    for (k = 0; k < repeats; k++) {
    for (i = 0; i < TEST_ENTRIES; i++) {
    unsigned long long tmp = benchmark_gcd_func(gcd_func[i], a, b, &res[j][i]);
    if (k == 0 || min_elapsed[i] > tmp)
    min_elapsed[i] = tmp;
    }
    }
    for (i = 0; i < TEST_ENTRIES; i++)
    elapsed[i] += min_elapsed[i];
    }

    for (i = 0; i < TEST_ENTRIES; i++)
    printf("gcd%d: elapsed %llu\n", i, elapsed[i]);

    k = 0;
    srand(seed);
    for (j = 0; j < loops; j++) {
    unsigned long a = get_rand();
    unsigned long b = argc > optind ? strtoul(argv[optind], NULL, 10) : get_rand();
    for (i = 1; i < TEST_ENTRIES; i++) {
    if (res[j][i] != res[j][0])
    break;
    }
    if (i < TEST_ENTRIES) {
    if (k == 0) {
    k = 1;
    fprintf(stderr, "Error:\n");
    }
    fprintf(stderr, "gcd(%lu, %lu): ", a, b);
    for (i = 0; i < TEST_ENTRIES; i++)
    fprintf(stderr, "%ld%s", res[j][i], i < TEST_ENTRIES - 1 ? ", " : "\n");
    }
    }

    if (k == 0)
    fprintf(stderr, "PASS\n");

    free(res);

    return 0;
    }

    Compiled with "-O2", on "VirtualBox 4.4.0-22-generic #38-Ubuntu x86_64" got:

    zhaoxiuzeng@zhaoxiuzeng-VirtualBox:~/develop$ ./gcd -r 500000 -n 10
    gcd0: elapsed 10174
    gcd1: elapsed 2120
    gcd2: elapsed 2902
    gcd3: elapsed 2039
    gcd4: elapsed 2812
    PASS
    zhaoxiuzeng@zhaoxiuzeng-VirtualBox:~/develop$ ./gcd -r 500000 -n 10
    gcd0: elapsed 9309
    gcd1: elapsed 2280
    gcd2: elapsed 2822
    gcd3: elapsed 2217
    gcd4: elapsed 2710
    PASS
    zhaoxiuzeng@zhaoxiuzeng-VirtualBox:~/develop$ ./gcd -r 500000 -n 10
    gcd0: elapsed 9589
    gcd1: elapsed 2098
    gcd2: elapsed 2815
    gcd3: elapsed 2030
    gcd4: elapsed 2718
    PASS
    zhaoxiuzeng@zhaoxiuzeng-VirtualBox:~/develop$ ./gcd -r 500000 -n 10
    gcd0: elapsed 9914
    gcd1: elapsed 2309
    gcd2: elapsed 2779
    gcd3: elapsed 2228
    gcd4: elapsed 2709
    PASS

    [akpm@linux-foundation.org: avoid #defining a CONFIG_ variable]
    Signed-off-by: Zhaoxiu Zeng
    Signed-off-by: George Spelvin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhaoxiu Zeng
     

09 May, 2016

4 commits

  • This commit should be left last since only now eznps platform
    is in state which one can actually use.
    Signed-off-by: Noam Camus

    Noam Camus
     
  • On ARC, lower 2G of address space is translated and used for
    - user vaddr space (region 0 to 5)
    - unused kernel-user gutter (region 6)
    - kernel vaddr space (region 7)

    where each region simply represents 256MB of address space.

    The kernel vaddr space of 256MB is used to implement vmalloc, modules
    So far this was enough, but not on EZChip system with 4K CPUs (given
    that per cpu mechanism uses vmalloc for allocating chunks)

    So allow VMALLOC_SIZE to be configurable by expanding down into the unused
    kernel-user gutter region which at default 256M was excessive anyways.

    Also use _BITUL() to fix a build error since PGDIR_SIZE cannot use "1UL"
    as called from assembly code in mm/tlbex.S

    Signed-off-by: Noam Camus
    [vgupta: rewrote changelog, debugged bootup crash due to int vs. hex]
    Acked-by: Vineet Gupta

    Noam Camus
     
  • The primary interrupt handler arch_do_IRQ() was passing hwirq as linux
    virq to core code. This was fragile and worked so far as we only had legacy/linear
    domains.

    This came out of a rant by Marc Zyngier.
    http://lists.infradead.org/pipermail/linux-snps-arc/2015-December/000298.html

    Cc: Marc Zyngier
    Cc: Thomas Gleixner
    Cc: Noam Camus
    Signed-off-by: Vineet Gupta

    Vineet Gupta
     
  • - call clocksource_probe()
    - This in turns needs of_clk_init() to be called earlier

    Cc: Daniel Lezcano
    Signed-off-by: Noam Camus
    [vgupta: broken off from a bigger patch]
    Signed-off-by: Vineet Gupta

    Noam Camus
     

05 May, 2016

1 commit

  • Initial HIGHMEM support on ARC was introduced for PAE40 where the low
    memory (0x8000_0000 based) and high memory (0x1_0000_0000) were
    physically contiguous. So CONFIG_FLATMEM sufficed (despite a peipheral
    hole in the middle, which wasted a bit of struct page memory, but things
    worked).

    However w/o PAE, highmem was not possible and we could only reach
    ~1.75GB of DDR. Now there is a use case to access ~4GB of DDR w/o PAE40
    The idea is to have low memory at canonical 0x8000_0000 and highmem
    at 0 so enire 4GB address space is available for physical addressing
    This needs additional platform/interconnect mapping to convert
    the non contiguous physical addresses into linear bus adresses.

    From Linux point of view, non contiguous divide means FLATMEM no
    longer works and DISCONTIGMEM is needed to track the pfns in the 2
    regions.

    This scheme would also work for PAE40, only better in that we don't
    waste struct page memory for the peripheral hole.

    The DT description will be something like

    memory {
    ...
    reg = ; /* 256MB: highmem */
    }

    Signed-off-by: Noam Camus
    Signed-off-by: Vineet Gupta

    Vineet Gupta
     

27 Apr, 2016

2 commits


07 Apr, 2016

1 commit

  • Commit 5f8fc43217a0 ("PCI: Include pci/pcie/Kconfig directly from
    pci/Kconfig") in linux-next changed drivers/pci/Kconfig to include
    drivers/pci/pcie/Kconfig itself, so that architectures do not need
    to source both files themselves. ARC just recently gained PCI support
    through commit 6b3fb77998dd ("ARC: Add PCI support"), but this change
    was based on the old behaviour of the Kconfig files. This makes
    Kconfig now spit out the following warnings:

    drivers/pci/pcie/Kconfig:61:warning: choice value used outside its choice group
    drivers/pci/pcie/Kconfig:67:warning: choice value used outside its choice group
    drivers/pci/pcie/Kconfig:74:warning: choice value used outside its choice group

    This change updates the Kconfig file for ARC, dropping the now
    unnecessary 'source' statement, which makes the warning disappear.

    Signed-off-by: Andreas Ziegler
    Signed-off-by: Vineet Gupta

    Andreas Ziegler
     

22 Mar, 2016

1 commit

  • Pull ARC architecture updates from Vineet Gupta:
    - Big Endian io accessors fix [Lada]
    - Spellos fixes [Adam]
    - Fix for DW GMAC breakage [Alexey]
    - Making DMA API 64-bit ready
    - Shutting up -Wmaybe-uninitialized noise for ARC
    - Other minor fixes here and there, comments update

    * tag 'arc-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: (21 commits)
    ARCv2: ioremap: Support dynamic peripheral address space
    ARC: dma: reintroduce platform specific dmaphys
    ARC: dma: ioremap: use phys_addr_t consistenctly in code paths
    ARC: dma: pass_phys() not sg_virt() to cache ops
    ARC: dma: non-coherent pages need V-P mapping if in HIGHMEM
    ARC: dma: Use struct page based page allocator helpers
    ARC: build: Turn off -Wmaybe-uninitialized for ARC gcc 4.8
    ARC: [plat-axs10x] add Ethernet PHY description in .dts
    arc: use of_platform_default_populate() to populate default bus
    ARC: thp: unbork !CONFIG_TRANSPARENT_HUGEPAGE build
    arc: [plat-nsimosci*] use ezchip network driver
    ARCv2: LLSC: software backoff is NOT needed starting HS2.1c
    ARC: mm: Use virt_to_pfn() for addr >> PAGE_SHIFT pattern
    ARC: [plat-nsim] document ranges
    ARC: build: Better way to detect ISA compatible toolchain
    ARCv2: Allow enabling PAE40 w/o HIGHMEM
    ARC: [BE] readl()/writel() to work in Big Endian CPU configuration
    ARC: [*defconfig] No need to specify CONFIG_CROSS_COMPILE
    ARC: [BE] Select correct CROSS_COMPILE prefix
    ARC: bitops: Remove non relevant comments
    ...

    Linus Torvalds
     

19 Mar, 2016

1 commit


17 Mar, 2016

1 commit

  • Pull PCI updates from Bjorn Helgaas:
    "PCI changes for v4.6:

    Enumeration:
    - Disable IO/MEM decoding for devices with non-compliant BARs (Bjorn Helgaas)
    - Mark Broadwell-EP Home Agent & PCU as having non-compliant BARs (Bjorn Helgaas

    Resource management:
    - Mark shadow copy of VGA ROM as IORESOURCE_PCI_FIXED (Bjorn Helgaas)
    - Don't assign or reassign immutable resources (Bjorn Helgaas)
    - Don't enable/disable ROM BAR if we're using a RAM shadow copy (Bjorn Helgaas)
    - Set ROM shadow location in arch code, not in PCI core (Bjorn Helgaas)
    - Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs (Bjorn Helgaas)
    - ia64: Use ioremap() instead of open-coded equivalent (Bjorn Helgaas)
    - ia64: Keep CPU physical (not virtual) addresses in shadow ROM resource (Bjorn Helgaas)
    - MIPS: Keep CPU physical (not virtual) addresses in shadow ROM resource (Bjorn Helgaas)
    - Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY (Bjorn Helgaas)
    - Don't leak memory if sysfs_create_bin_file() fails (Bjorn Helgaas)
    - rcar: Remove PCI_PROBE_ONLY handling (Lorenzo Pieralisi)
    - designware: Remove PCI_PROBE_ONLY handling (Lorenzo Pieralisi)

    Virtualization:
    - Wait for up to 1000ms after FLR reset (Alex Williamson)
    - Support SR-IOV on any function type (Kelly Zytaruk)
    - Add ACS quirk for all Cavium devices (Manish Jaggi)

    AER:
    - Rename pci_ops_aer to aer_inj_pci_ops (Bjorn Helgaas)
    - Restore pci_ops pointer while calling original pci_ops (David Daney)
    - Fix aer_inject error codes (Jean Delvare)
    - Use dev_warn() in aer_inject (Jean Delvare)
    - Log actual error causes in aer_inject (Jean Delvare)
    - Log aer_inject error injections (Jean Delvare)

    VPD:
    - Prevent VPD access for buggy devices (Babu Moger)
    - Move pci_read_vpd() and pci_write_vpd() close to other VPD code (Bjorn Helgaas)
    - Move pci_vpd_release() from header file to pci/access.c (Bjorn Helgaas)
    - Remove struct pci_vpd_ops.release function pointer (Bjorn Helgaas)
    - Rename VPD symbols to remove unnecessary "pci22" (Bjorn Helgaas)
    - Fold struct pci_vpd_pci22 into struct pci_vpd (Bjorn Helgaas)
    - Sleep rather than busy-wait for VPD access completion (Bjorn Helgaas)
    - Update VPD definitions (Hannes Reinecke)
    - Allow access to VPD attributes with size 0 (Hannes Reinecke)
    - Determine actual VPD size on first access (Hannes Reinecke)

    Generic host bridge driver:
    - Move structure definitions to separate header file (David Daney)
    - Add pci_host_common_probe(), based on gen_pci_probe() (David Daney)
    - Expose pci_host_common_probe() for use by other drivers (David Daney)

    Altera host bridge driver:
    - Fix altera_pcie_link_is_up() (Ley Foon Tan)

    Cavium ThunderX host bridge driver:
    - Add PCIe host driver for ThunderX processors (David Daney)
    - Add driver for ThunderX-pass{1,2} on-chip devices (David Daney)

    Freescale i.MX6 host bridge driver:
    - Add DT bindings to configure PHY Tx driver settings (Justin Waters)
    - Move imx6_pcie_reset_phy() near other PHY handling functions (Lucas Stach)
    - Move PHY reset into imx6_pcie_establish_link() (Lucas Stach)
    - Remove broken Gen2 workaround (Lucas Stach)
    - Move link up check into imx6_pcie_wait_for_link() (Lucas Stach)

    Freescale Layerscape host bridge driver:
    - Add "fsl,ls2085a-pcie" compatible ID (Yang Shi)

    Intel VMD host bridge driver:
    - Attach VMD resources to parent domain's resource tree (Jon Derrick)
    - Set bus resource start to 0 (Keith Busch)

    Microsoft Hyper-V host bridge driver:
    - Add fwnode_handle to x86 pci_sysdata (Jake Oshins)
    - Look up IRQ domain by fwnode_handle (Jake Oshins)
    - Add paravirtual PCI front-end for Microsoft Hyper-V VMs (Jake Oshins)

    NVIDIA Tegra host bridge driver:
    - Add pci_ops.{add,remove}_bus() callbacks (Thierry Reding)
    - Implement ->{add,remove}_bus() callbacks (Thierry Reding)
    - Remove unused struct tegra_pcie.num_ports field (Thierry Reding)
    - Track bus -> CPU mapping (Thierry Reding)
    - Remove misleading PHYS_OFFSET (Thierry Reding)

    Renesas R-Car host bridge driver:
    - Depend on ARCH_RENESAS, not ARCH_SHMOBILE (Simon Horman)

    Synopsys DesignWare host bridge driver:
    - ARC: Add PCI support (Joao Pinto)
    - Add generic dw_pcie_wait_for_link() (Joao Pinto)
    - Add default link up check if sub-driver doesn't override (Joao Pinto)
    - Add driver for prototyping kits based on ARC SDP (Joao Pinto)

    TI Keystone host bridge driver:
    - Defer probing if devm_phy_get() returns -EPROBE_DEFER (Shawn Lin)

    Xilinx AXI host bridge driver:
    - Use of_pci_get_host_bridge_resources() to parse DT (Bharat Kumar Gogada)
    - Remove dependency on ARM-specific struct hw_pci (Bharat Kumar Gogada)
    - Don't call pci_fixup_irqs() on Microblaze (Bharat Kumar Gogada)
    - Update Zynq binding with Microblaze node (Bharat Kumar Gogada)
    - microblaze: Support generic Xilinx AXI PCIe Host Bridge IP driver (Bharat Kumar Gogada)

    Xilinx NWL host bridge driver:
    - Add support for Xilinx NWL PCIe Host Controller (Bharat Kumar Gogada)

    Miscellaneous:
    - Check device_attach() return value always (Bjorn Helgaas)
    - Move pci_set_flags() from asm-generic/pci-bridge.h to linux/pci.h (Bjorn Helgaas)
    - Remove includes of empty asm-generic/pci-bridge.h (Bjorn Helgaas)
    - ARM64: Remove generated include of asm-generic/pci-bridge.h (Bjorn Helgaas)
    - Remove empty asm-generic/pci-bridge.h (Bjorn Helgaas)
    - Remove includes of asm/pci-bridge.h (Bjorn Helgaas)
    - Consolidate PCI DMA constants and interfaces in linux/pci-dma-compat.h (Bjorn Helgaas)
    - unicore32: Remove unused HAVE_ARCH_PCI_SET_DMA_MASK definition (Bjorn Helgaas)
    - Cleanup pci/pcie/Kconfig whitespace (Andreas Ziegler)
    - Include pci/hotplug Kconfig directly from pci/Kconfig (Bjorn Helgaas)
    - Include pci/pcie/Kconfig directly from pci/Kconfig (Bogicevic Sasa)
    - frv: Remove stray pci_{alloc,free}_consistent() declaration (Christoph Hellwig)
    - Move pci_dma_* helpers to common code (Christoph Hellwig)
    - Add PCI_CLASS_SERIAL_USB_DEVICE definition (Heikki Krogerus)
    - Add QEMU top-level IDs for (sub)vendor & device (Robin H. Johnson)
    - Fix broken URL for Dell biosdevname (Naga Venkata Sai Indubhaskar Jupudi)"

    * tag 'pci-v4.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (94 commits)
    PCI: Add PCI_CLASS_SERIAL_USB_DEVICE definition
    PCI: designware: Add driver for prototyping kits based on ARC SDP
    PCI: designware: Add default link up check if sub-driver doesn't override
    PCI: designware: Add generic dw_pcie_wait_for_link()
    PCI: Cleanup pci/pcie/Kconfig whitespace
    PCI: Simplify pci_create_attr() control flow
    PCI: Don't leak memory if sysfs_create_bin_file() fails
    PCI: Simplify sysfs ROM cleanup
    PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY
    MIPS: Loongson 3: Keep CPU physical (not virtual) addresses in shadow ROM resource
    MIPS: Loongson 3: Use temporary struct resource * to avoid repetition
    ia64/PCI: Keep CPU physical (not virtual) addresses in shadow ROM resource
    ia64/PCI: Use ioremap() instead of open-coded equivalent
    ia64/PCI: Use temporary struct resource * to avoid repetition
    PCI: Clean up pci_map_rom() whitespace
    PCI: Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs
    PCI: thunder: Add driver for ThunderX-pass{1,2} on-chip devices
    PCI: thunder: Add PCIe host driver for ThunderX processors
    PCI: generic: Expose pci_host_common_probe() for use by other drivers
    PCI: generic: Add pci_host_common_probe(), based on gen_pci_probe()
    ...

    Linus Torvalds
     

15 Mar, 2016

1 commit


12 Mar, 2016

1 commit


11 Mar, 2016

1 commit

  • Add PCI support to ARC and update drivers/pci Makefile enabling the ARC
    arch to use the generic PCI setup functions.

    [bhelgaas: fold in Joao's pci-dma-compat.h & pci-bridge.h build fix (I
    should have caught this myself, sorry]
    Signed-off-by: Joao Pinto
    Signed-off-by: Bjorn Helgaas
    Acked-by: Vineet Gupta

    Joao Pinto
     

24 Feb, 2016

1 commit