10 Jun, 2020

1 commit

  • Patch series "mm: consolidate definitions of page table accessors", v2.

    The low level page table accessors (pXY_index(), pXY_offset()) are
    duplicated across all architectures and sometimes more than once. For
    instance, we have 31 definition of pgd_offset() for 25 supported
    architectures.

    Most of these definitions are actually identical and typically it boils
    down to, e.g.

    static inline unsigned long pmd_index(unsigned long address)
    {
    return (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1);
    }

    static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address)
    {
    return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address);
    }

    These definitions can be shared among 90% of the arches provided
    XYZ_SHIFT, PTRS_PER_XYZ and xyz_page_vaddr() are defined.

    For architectures that really need a custom version there is always
    possibility to override the generic version with the usual ifdefs magic.

    These patches introduce include/linux/pgtable.h that replaces
    include/asm-generic/pgtable.h and add the definitions of the page table
    accessors to the new header.

    This patch (of 12):

    The linux/mm.h header includes to allow inlining of the
    functions involving page table manipulations, e.g. pte_alloc() and
    pmd_alloc(). So, there is no point to explicitly include
    in the files that include .

    The include statements in such cases are remove with a simple loop:

    for f in $(git grep -l "include ") ; do
    sed -i -e '/include / d' $f
    done

    Signed-off-by: Mike Rapoport
    Signed-off-by: Andrew Morton
    Cc: Arnd Bergmann
    Cc: Borislav Petkov
    Cc: Brian Cain
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Ungerer
    Cc: Guan Xuetao
    Cc: Guo Ren
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: Ingo Molnar
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Matthew Wilcox
    Cc: Matt Turner
    Cc: Max Filippov
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Mike Rapoport
    Cc: Nick Hu
    Cc: Paul Walmsley
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Stafford Horne
    Cc: Thomas Bogendoerfer
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vincent Chen
    Cc: Vineet Gupta
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Link: http://lkml.kernel.org/r/20200514170327.31389-1-rppt@kernel.org
    Link: http://lkml.kernel.org/r/20200514170327.31389-2-rppt@kernel.org
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

21 May, 2019

1 commit


25 Mar, 2019

4 commits

  • Reading the timer counter races with timer overflow (and the
    corresponding interrupt). This is resolved by reading the overflow
    register and taking this value into account. The interrupt handler
    must clear the overflow register when it eventually executes.

    Suggested-by: Thomas Gleixner
    Signed-off-by: Finn Thain
    Signed-off-by: Geert Uytterhoeven

    Finn Thain
     
  • Add a platform clocksource by adapting the existing arch_gettimeoffset
    implementation.

    Signed-off-by: Finn Thain
    Acked-by: Linus Walleij
    Signed-off-by: Geert Uytterhoeven

    Finn Thain
     
  • The functions that implement arch_gettimeoffset are re-used by
    new clocksource drivers in subsequent patches.

    Signed-off-by: Finn Thain
    Acked-by: Linus Walleij
    Signed-off-by: Geert Uytterhoeven

    Finn Thain
     
  • Some platforms execute their timer handler with the interrupt priority
    level set below 6. That means the handler could be interrupted by another
    driver and this could lead to re-entry of the timer core.

    Avoid this by use of local_irq_save/restore for timer interrupt dispatch.
    This provides mutual exclusion around the timer interrupt flag access
    which is needed later in this series for the clocksource conversion.

    Reported-by: Thomas Gleixner
    Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1811131407120.2697@nanos.tec.linutronix.de
    Signed-off-by: Finn Thain
    Signed-off-by: Geert Uytterhoeven

    Finn Thain
     

29 Jul, 2018

1 commit

  • Commit 397ac99c6cef ("m68k: remove dead timer code") removed set_rtc_mmss()
    because it was unused in 2012. However, this was itself the only user of the
    mach_set_clock_mmss() callback and the many implementations of that callback,
    which are equally unused.

    This removes all of those as well.

    Signed-off-by: Arnd Bergmann
    Acked-by: Greg Ungerer
    Signed-off-by: Geert Uytterhoeven

    Arnd Bergmann
     

22 May, 2018

1 commit

  • This fixes a bug in read_persistent_clock() which causes the system
    clock to lag the Real Time Clock by one month. The problem was noticed
    on a Mac, but theoretically it must also affect Atari, BVME6000 and Q40.

    The tm_mon value in the struct rtc_time passed to mach_hwclk() is
    zero-based, and atari_mste_hwclk(), atari_tt_hwclk(), bvme6000_hwclk(),
    mac_hwclk() and q40_hwclk() all make this adjustment. Unfortunately,
    dn_dummy_hwclk(), mvme147_hwclk(), mvme16x_hwclk(), sun3_hwclk() and
    sun3x_hwclk() fail to decrement tm_mon. Also m68328_hwclk() assumes
    a one-based tm_mon.

    Bring these platforms into line and fix read_persistent_clock() so it
    works correctly on all m68k platforms.

    The datasheets for the RTC devices found on the affected platforms
    all confirm that the year is stored as a value in the range 0-99 and
    the month is stored as a value in the range 1-12. Please refer to the
    datasheets for MC146818 (Apollo), DS1643 (MVME), ICM7170 (Sun 3)
    and M48T02 (Sun 3x).

    Reported-by: Stan Johnson
    Signed-off-by: Finn Thain
    Reviewed-by: Arnd Bergmann
    Signed-off-by: Geert Uytterhoeven

    Finn Thain
     

12 Feb, 2017

1 commit


04 Jun, 2016

1 commit

  • The asm/rtc.h header is only used for the old gen_rtc driver
    that has been replaced by rtc-generic. According to Geert
    Uytterhoeven, nobody has used the old driver on m68k for
    a long time, so we can now just remove the header file
    and disallow the driver in Kconfig.

    All files that used to include asm/rtc.h are now changed so
    they include the headers that were used implicitly through
    asm/rtc.h.

    Signed-off-by: Arnd Bergmann
    Acked-by: Geert Uytterhoeven
    Tested-by: Geert Uytterhoeven
    Signed-off-by: Alexandre Belloni

    Arnd Bergmann
     

11 Jan, 2015

1 commit


26 Nov, 2013

3 commits


25 Dec, 2012

1 commit

  • remove m68k's mach_gettimeoffset function pointer, and instead directly
    set the arch_gettimeoffset function pointer. This requires multiplying
    all function results by 1000, since the removed m68k_gettimeoffset() did
    this. Also, s/unsigned long/u32/ just to make the function prototypes
    exactly match that of arch_gettimeoffset.

    Cc: Joshua Thompson
    Cc: Sam Creasey
    Acked-by: Geert Uytterhoeven
    Acked-by: Phil Blundell
    Signed-off-by: Stephen Warren

    Stephen Warren
     

29 Mar, 2012

1 commit


09 Nov, 2011

2 commits


31 Jan, 2011

1 commit

  • xtime_update() properly takes the xtime_lock

    Signed-off-by: Torben Hohn
    Cc: Sam Creasey
    Cc: Peter Zijlstra
    Cc: johnstul@us.ibm.com
    Cc: Roman Zippel
    Cc: hch@infradead.org
    Cc: yong.zhang0@gmail.com
    Cc: Geert Uytterhoeven
    Cc: Greg Ungerer
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Torben Hohn
     

13 Jan, 2009

2 commits


23 Oct, 2008

1 commit


20 Jul, 2007

1 commit


09 Oct, 2006

1 commit

  • Use the new typedef for interrupt handler function pointers rather than
    actually spelling out the full thing each time. This was scripted with the
    following small shell script:

    #!/bin/sh
    egrep -nHrl -e 'irqreturn_t[ ]*[(][*]' $* |
    while read i
    do
    echo $i
    perl -pi -e 's/irqreturn_t\s*[(]\s*[*]\s*([_a-zA-Z0-9]*)\s*[)]\s*[(]\s*int\s*,\s*void\s*[*]\s*[)]/irq_handler_t \1/g' $i || exit $?
    done

    Signed-Off-By: David Howells

    David Howells
     

08 Oct, 2006

1 commit

  • m68k_handle_int() split in two functions: __m68k_handle_int() takes
    pt_regs * and does set_irq_regs(); m68k_handle_int() doesn't get pt_regs
    *.

    Places where we used to call m68k_handle_int() recursively with the same
    pt_regs have simply lost the second argument, the rest is switched to
    __m68k_handle_int().

    The rest of patch is just dropping pt_regs * where needed.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

26 Jun, 2006

2 commits


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds