10 Aug, 2015

1 commit

  • Migrate sparc drivers to the new 'set-state' interface provided by
    clockevents core, the earlier 'set-mode' interface is marked obsolete
    now.

    This also enables us to implement callbacks for new states of clockevent
    devices, for example: ONESHOT_STOPPED.

    We weren't doing anything which switching to few clockevent modes and so
    their callbacks aren't implemented.

    Cc: "David S. Miller"
    Cc: sparclinux@vger.kernel.org
    Signed-off-by: Viresh Kumar
    Signed-off-by: Daniel Lezcano

    Viresh Kumar
     

15 Jul, 2013

1 commit

  • The __cpuinit type of throwaway sections might have made sense
    some time ago when RAM was more constrained, but now the savings
    do not offset the cost and complications. For example, the fix in
    commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
    is a good example of the nasty type of bugs that can be created
    with improper use of the various __init prefixes.

    After a discussion on LKML[1] it was decided that cpuinit should go
    the way of devinit and be phased out. Once all the users are gone,
    we can then finally remove the macros themselves from linux/init.h.

    Note that some harmless section mismatch warnings may result, since
    notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
    are flagged as __cpuinit -- so if we remove the __cpuinit from
    arch specific callers, we will also get section mismatch warnings.
    As an intermediate step, we intend to turn the linux/init.h cpuinit
    content into no-ops as early as possible, since that will get rid
    of these warnings. In any case, they are temporary and harmless.

    This removes all the arch/sparc uses of the __cpuinit macros from
    C files and removes __CPUINIT from assembly files. Note that even
    though arch/sparc/kernel/trampoline_64.S has instances of ".previous"
    in it, they are all paired off against explicit ".section" directives,
    and not implicitly paired with __CPUINIT (unlike mips and arm were).

    [1] https://lkml.org/lkml/2013/5/20/589

    Cc: "David S. Miller"
    Cc: sparclinux@vger.kernel.org
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

21 Feb, 2013

1 commit

  • Introduce a common smp_callin() function to call
    from trampoline_32.S.
    Add platform specific functions to handle the
    platform details.

    This is in preparation for a patch that will
    unify the smp boot stuff for all architectures.
    sparc32 was significantly different to warrant
    this patch in preparation.

    Signed-off-by: Sam Ravnborg
    Acked-by: David S. Miller
    Cc: "Srivatsa S. Bhat"
    Acked-by: Srivatsa S. Bhat
    Signed-off-by: David S. Miller

    Sam Ravnborg
     

22 May, 2012

1 commit

  • Pull smp hotplug cleanups from Thomas Gleixner:
    "This series is merily a cleanup of code copied around in arch/* and
    not changing any of the real cpu hotplug horrors yet. I wish I'd had
    something more substantial for 3.5, but I underestimated the lurking
    horror..."

    Fix up trivial conflicts in arch/{arm,sparc,x86}/Kconfig and
    arch/sparc/include/asm/thread_info_32.h

    * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (79 commits)
    um: Remove leftover declaration of alloc_task_struct_node()
    task_allocator: Use config switches instead of magic defines
    sparc: Use common threadinfo allocator
    score: Use common threadinfo allocator
    sh-use-common-threadinfo-allocator
    mn10300: Use common threadinfo allocator
    powerpc: Use common threadinfo allocator
    mips: Use common threadinfo allocator
    hexagon: Use common threadinfo allocator
    m32r: Use common threadinfo allocator
    frv: Use common threadinfo allocator
    cris: Use common threadinfo allocator
    x86: Use common threadinfo allocator
    c6x: Use common threadinfo allocator
    fork: Provide kmemcache based thread_info allocator
    tile: Use common threadinfo allocator
    fork: Provide weak arch_release_[task_struct|thread_info] functions
    fork: Move thread info gfp flags to header
    fork: Remove the weak insanity
    sh: Remove cpu_idle_wait()
    ...

    Linus Torvalds
     

15 May, 2012

3 commits


14 May, 2012

1 commit

  • This eliminated most of the remaining users of btfixup.

    There are some complications because of the special cases we
    have for sun4d, leon, and some flavors of viking.

    It was found that there are no cases where a flush_page_for_dma
    method was not hooked up to something, so the "noflush" iommu
    methods were removed.

    Add some documentation to the viking_sun4d_smp_ops to describe exactly
    the hardware bug which causes us to need special TLB flushing on
    sun4d.

    Signed-off-by: David S. Miller

    David S. Miller
     

26 Apr, 2012

1 commit


16 Apr, 2012

1 commit

  • The kernel uses l14 timers as clockevents. l10 timer is used
    as clocksource if platform master_l10_counter isn't constantly
    zero. The clocksource is continuous, so it's possible to use
    high resolution timers. l10 timer is also used as clockevent
    on UP configurations.

    This realization is for sun4m, sun4d, sun4c, microsparc-IIep
    and LEON platforms. The appropriate LEON changes was made by
    Konrad Eisele.

    In case of sun4m's oneshot mode, profile irq is zeroed in
    smp4m_percpu_timer_interrupt(). It is maybe
    needless (double, triple etc overflow does nothing).

    sun4d is able to have oneshot mode too, but I haven't
    any way to test it. So code of its percpu timer handler
    is made as much equal to the current code as possible.

    The patch is tested on sun4m box in SMP mode by me,
    and tested by Konrad on leon in up mode (leon smp
    is broken atm - due to other reasons).

    Signed-off-by: Tkhai Kirill
    Tested-by: Konrad Eisele [leon up]
    [sam: revised patch to provide generic support for leon]
    Signed-off-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Tkhai Kirill
     

31 Mar, 2012

1 commit


17 May, 2011

2 commits

  • Adapt new API. Almost change is trivial, most important change are to
    remove following like =operator.

    cpumask_t cpu_mask = *mm_cpumask(mm);
    cpus_allowed = current->cpus_allowed;

    Because cpumask_var_t is =operator unsafe. These usage might prevent
    kernel core improvement.

    No functional change.

    Signed-off-by: KOSAKI Motohiro
    Signed-off-by: David S. Miller

    KOSAKI Motohiro
     
  • Implement the three IPIs (resched, single and cpu-mask) generation
    and interrupt handler catch. The sun4m has 15 soft-IRQs and three
    of them is used with this patch, the three IPIs was previously
    implemented with the cross-call IRQ15 which does not work with
    locking routines such as spinlocks because IRQ15 is NMI, it may
    cause deadlock.

    The IRQ trap handler code assumes (in the same spritit as the old
    it seems) that hard interrupts will be generated until handled
    (level), when a IRQ happens the IRQ pending register is checked
    for pending soft-IRQs. When both hard and soft IRQ happens at the
    same time only soft-IRQs are handled.

    The old code implemented a soft-IRQ traphandler at IRQ14 which
    called smp_reschedule_irq which in turn called set_need_resched.
    It seems to be an old relic and is replaced with the interrupt
    traphander exit code RESTORE_ALL, it calls schedule() when
    appropriate.

    Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     

22 Apr, 2011

1 commit

  • We did a cpu_probe() call each time a CPU got online - which
    only effect was to save latest CPU/FPU info for use by show_cpuinfo().
    Use same setup as for sparc64 where we probe for this info during startup,
    and only once.

    This allowed us to annotate a few functions __init which again
    fixed the following section mismatch warnings:

    WARNING: vmlinux.o(.text+0x65f0): Section mismatch in reference from the function set_cpu_and_fpu() to the (unknown reference) .init.rodata:(unknown)
    WARNING: vmlinux.o(.text+0x65f8): Section mismatch in reference from the function set_cpu_and_fpu() to the (unknown reference) .init.rodata:(unknown)
    WARNING: vmlinux.o(.text+0x664c): Section mismatch in reference from the function set_cpu_and_fpu() to the variable .init.rodata:manufacturer_info
    WARNING: vmlinux.o(.text+0x6650): Section mismatch in reference from the function set_cpu_and_fpu() to the variable .init.rodata:manufacturer_info

    Signed-off-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Sam Ravnborg
     

20 Apr, 2011

1 commit

  • The conversion of sparc32 to genirq is based on original work done
    by David S. Miller.
    Daniel Hellstrom has helped in the conversion and implemented
    the shutdowm functionality.
    Marcel van Nies has tested this on Sparc Station 20

    Test status:
    sun4c - not tested
    sun4m,pci - not tested
    sun4m,sbus - tested (Sparc Classic, Sparc Station 5, Sparc Station 20)
    sun4d - not tested
    leon - tested on various combinations of leon boards,
    including SMP variants

    generic
    Introduce use of GENERIC_HARDIRQS and GENERIC_IRQ_SHOW
    Allocate 64 IRQs - which is enough even for SS2000
    Use a table of irq_bucket to maintain uses IRQs
    irq_bucket is also used to chain several irq's that
    must be called when the same intrrupt is asserted
    Use irq_link to link a interrupt source to the irq
    All plafforms must now supply their own build_device_irq method
    handler_irq rewriten to use generic irq support

    floppy
    Read FLOPPY_IRQ from platform device
    Use generic request_irq to register the floppy interrupt
    Rewrote sparc_floppy_irq to use the generic irq support

    pcic:
    Introduce irq_chip
    Store mask in chip_data for use in mask/unmask functions
    Add build_device_irq for pcic
    Use pcic_build_device_irq in pci_time_init
    allocate virtual irqs in pcic_fill_irq

    sun4c:
    Introduce irq_chip
    Store mask in chip_data for use in mask/unmask functions
    Add build_device_irq for sun4c
    Use sun4c_build_device_irq in sun4c_init_timers

    sun4m:
    Introduce irq_chip
    Introduce dedicated mask/unmask methods
    Introduce sun4m_handler_data that allow easy access to necessary
    data in the mask/unmask functions
    Add a helper method to enable profile_timer (used from smp)
    Added sun4m_build_device_irq
    Use sun4m_build_device_irq in sun4m_init_timers

    TODO:
    There is no replacement for smp_rotate that always scheduled
    next CPU as interrupt target upon an interrupt

    sun4d:
    Introduce irq_chip
    Introduce dedicated mask/unmask methods
    Introduce sun4d_handler_data that allow easy access to
    necessary data in mask/unmask fuctions
    Rewrote sun4d_handler_irq to use generic irq support

    TODO:
    The original implmentation of enable/disable had:

    if (irq < NR_IRQS)
    return;

    The new implmentation does not distingush between SBUS and cpu
    interrupts.
    I am no sure what is right here. I assume we need to do
    something for the cpu interrupts.

    I have not succeeded booting my sun4d box (with or without this patch)
    and my understanding of this platfrom is limited.
    So I would be a bit suprised if this works.

    leon:
    Introduce irq_chip
    Store mask in chip_data for use in mask/unmask functions
    Add build_device_irq for leon
    Use leon_build_device_irq in leon_init_timers

    Signed-off-by: Sam Ravnborg
    Acked-by: Daniel Hellstrom
    Tested-by: Daniel Hellstrom
    Tested-by: Marcel van Nies
    Cc: Thomas Gleixner
    Signed-off-by: David S. Miller

    Sam Ravnborg
     

17 Mar, 2011

1 commit

  • - drop filename in file header
    - drop unused includes
    - add description of sun4m interrupts (from davem)
    - add KERN_* to printk
    - fix spaces => tabs
    - add spaces after reserved words
    - drop all externs, they are now in header files

    This is partly based on a patch from: David Miller

    Signed-off-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Sam Ravnborg
     

19 Aug, 2009

1 commit

  • Normally, srmmu uses different trap table register values to allow
    determination of the cpu we're on. All of the trap tables have
    identical content, they just sit at different offsets from the first
    trap table, and the offset shifted down and masked out determines
    the cpu we are on.

    The code tries to free them up when they aren't actually used
    (don't have all 4 cpus, we're on sun4d, etc.) but that causes
    problems.

    For one thing it triggers false positives in the DMA debugging
    code. And fixing that up while preserving this relative offset
    thing isn't trivial.

    So just kill the freeing code, it costs us at most 3 pages, big
    deal...

    Signed-off-by: David S. Miller

    David S. Miller
     

16 Mar, 2009

2 commits


09 Jan, 2009

1 commit


01 Dec, 2008

1 commit

  • All noise since we don't have CPU hotplug there. However, they
    did expose something very odd-looking in there - poke_viking()
    does a bunch of identical btfixup each time it's called (i.e.
    for each CPU). That one is left alone for now; just the trivial
    misannotation fixes.

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

    Al Viro
     

13 Oct, 2008

1 commit

  • arch/sparc/kernel/sun4d_smp.c: In function ‘smp4d_callin’:
    arch/sparc/kernel/sun4d_smp.c:101: error: implicit declaration of function ‘notify_cpu_starting’
    arch/sparc/kernel/sun4m_smp.c: In function ‘smp4m_callin’:
    arch/sparc/kernel/sun4m_smp.c:74: error: implicit declaration of function ‘notify_cpu_starting’

    Signed-off-by: Robert Reif
    Signed-off-by: David S. Miller

    Robert Reif
     

12 Oct, 2008

1 commit


20 Sep, 2008

1 commit


09 Sep, 2008

1 commit

  • Right now, there is no notifier that is called on a new cpu, before the new
    cpu begins processing interrupts/softirqs.
    Various kernel function would need that notification, e.g. kvm works around
    by calling smp_call_function_single(), rcu polls cpu_online_map.

    The patch adds a CPU_STARTING notification. It also adds a helper function
    that sends the message to all cpu_chain handlers.

    Tested on x86-64.
    All other archs are untested. Especially on sparc, I'm not sure if I got
    it right.

    Signed-off-by: Manfred Spraul
    Signed-off-by: Ingo Molnar

    Manfred Spraul
     

28 Aug, 2008

1 commit


18 Jul, 2008

1 commit

  • This patch contains the following possible cleanups:
    - make the following needlessly global code static:
    - apc.c: apc_swift_idle()
    - ebus.c: ebus_blacklist_irq()
    - ebus.c: fill_ebus_child()
    - ebus.c: fill_ebus_device()
    - entry.S: syscall_is_too_hard
    - etra: tsetup_sun4c_stackchk
    - head.S: cputyp
    - head.S: prom_vector_p
    - idprom.c: Sun_Machines[]
    - ioport.c: _sparc_find_resource()
    - ioport.c: create_proc_read_entry()
    - irq.c: struct sparc_irq[]
    - rtrap.S: sun4c_rett_stackchk
    - setup.c: prom_sync_me()
    - setup.c: boot_flags
    - sun4c_irq.c: sun4c_sbint_to_irq()
    - sun4d_irq.c: sbus_tid[]
    - sun4d_irq.c: struct sbus_actions
    - sun4d_irq.c: sun4d_sbint_to_irq()
    - sun4m_irq.c: sun4m_sbint_to_irq()
    - sun4m_irq.c: sun4m_get_irqmask()
    - sun4m_irq.c: sun4m_timers
    - sun4m_smp.c: smp4m_cross_call()
    - sun4m_smp.c: smp4m_blackbox_id()
    - sun4m_smp.c: smp4m_blackbox_current()
    - time.c: sp_clock_typ
    - time.c: sbus_time_init()
    - traps.c: instruction_dump()
    - wof.S: spwin_sun4c_stackchk
    - wuf.S: sun4c_fwin_stackchk
    - #if 0 the following unused code:
    - process.c: sparc_backtrace_lock
    - process.c: __show_backtrace()
    - process.c: show_backtrace()
    - process.c: smp_show_backtrace_all_cpus()
    - remove the following unused code:
    - entry.S: __handle_exception
    - smp.c: smp_num_cpus
    - smp.c: smp_activated
    - smp.c: __cpu_number_map[]
    - smp.c: __cpu_logical_map[]
    - smp.c: bitops_spinlock
    - traps.c: trap_curbuf
    - traps.c: trapbuf[]
    - traps.c: linux_smp_still_initting
    - traps.c: thiscpus_tbr
    - traps.c: thiscpus_mid

    Signed-off-by: Adrian Bunk
    Signed-off-by: David S. Miller

    Adrian Bunk
     

29 Apr, 2008

1 commit


07 Feb, 2008

1 commit

  • calibrate_delay() must be __cpuinit, not __{dev,}init.

    I've verified that this is correct for all users.

    While doing the latter, I also did the following cleanups:
    - remove pointless additional prototypes in C files
    - ensure all users #include

    This fixes the following section mismatches with CONFIG_HOTPLUG=n,
    CONFIG_HOTPLUG_CPU=y:

    WARNING: vmlinux.o(.text+0x1128d): Section mismatch: reference to .init.text.1:calibrate_delay (between 'check_cx686_slop' and 'set_cx86_reorder')
    WARNING: vmlinux.o(.text+0x25102): Section mismatch: reference to .init.text.1:calibrate_delay (between 'smp_callin' and 'cpu_coregroup_map')

    Signed-off-by: Adrian Bunk
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Cc: "Luck, Tony"
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: "David S. Miller"
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Christian Zankel
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

22 Jul, 2007

1 commit


09 May, 2007

1 commit


07 May, 2007

1 commit


09 Oct, 2006

1 commit


27 Aug, 2006

1 commit


20 Jun, 2006

1 commit


24 Mar, 2006

1 commit

  • Todo items:
    - IRQ_INPROGRESS flag - use sparc64 irq buckets, or generic irq_desc?
    - sun4d
    - re-indent large chunks of sun4m_smp.c
    - some places assume sequential cpu numbering (i.e. 0,1 instead of 0,2)

    Last I checked (with 2.6.14), random programs segfault with dual
    HyperSPARC. And with SuperSPARC II's, it seems stable but will
    eventually die from a write lock error (wrong lock owner or something).

    I haven't tried the HyperSPARC + highmem combination recently, so that
    may still be a problem.

    Signed-off-by: David S. Miller

    Bob Breuer
     

23 Mar, 2006

1 commit

  • When we stop allocating percpu memory for not-possible CPUs we must not touch
    the percpu data for not-possible CPUs at all. The correct way of doing this
    is to test cpu_possible() or to use for_each_cpu().

    This patch is a kernel-wide sweep of all instances of NR_CPUS. I found very
    few instances of this bug, if any. But the patch converts lots of open-coded
    test to use the preferred helper macros.

    Cc: Mikael Starvik
    Cc: David Howells
    Acked-by: Kyle McMartin
    Cc: Anton Blanchard
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: William Lee Irwin III
    Cc: Andi Kleen
    Cc: Christian Zankel
    Cc: Philippe Elie
    Cc: Nathan Scott
    Cc: Jens Axboe
    Cc: Eric Dumazet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

22 Mar, 2006

1 commit

  • set_page_count usage outside mm/ is limited to setting the refcount to 1.
    Remove set_page_count from outside mm/, and replace those users with
    init_page_count() and set_page_refcounted().

    This allows more debug checking, and tighter control on how code is allowed
    to play around with page->_count.

    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

13 Jan, 2006

1 commit


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