01 Jul, 2011

2 commits

  • Add a NODE level to the generic cache events which is used to measure
    local vs remote memory accesses. Like all other cache events, an
    ACCESS is HIT+MISS, if there is no way to distinguish between reads
    and writes do reads only etc..

    The below needs filling out for !x86 (which I filled out with
    unsupported events).

    I'm fairly sure ARM can leave it like that since it doesn't strike me as
    an architecture that even has NUMA support. SH might have something since
    it does appear to have some NUMA bits.

    Sparc64, PowerPC and MIPS certainly want a good look there since they
    clearly are NUMA capable.

    Signed-off-by: Peter Zijlstra
    Cc: David Miller
    Cc: Anton Blanchard
    Cc: David Daney
    Cc: Deng-Cheng Zhu
    Cc: Paul Mundt
    Cc: Will Deacon
    Cc: Robert Richter
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1303508226.4865.8.camel@laptop
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • The nmi parameter indicated if we could do wakeups from the current
    context, if not, we would set some state and self-IPI and let the
    resulting interrupt do the wakeup.

    For the various event classes:

    - hardware: nmi=0; PMI is in fact an NMI or we run irq_work_run from
    the PMI-tail (ARM etc.)
    - tracepoint: nmi=0; since tracepoint could be from NMI context.
    - software: nmi=[0,1]; some, like the schedule thing cannot
    perform wakeups, and hence need 0.

    As one can see, there is very little nmi=1 usage, and the down-side of
    not using it is that on some platforms some software events can have a
    jiffy delay in wakeup (when arch_irq_work_raise isn't implemented).

    The up-side however is that we can remove the nmi parameter and save a
    bunch of conditionals in fast paths.

    Signed-off-by: Peter Zijlstra
    Cc: Michael Cree
    Cc: Will Deacon
    Cc: Deng-Cheng Zhu
    Cc: Anton Blanchard
    Cc: Eric B Munson
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: David S. Miller
    Cc: Frederic Weisbecker
    Cc: Jason Wessel
    Cc: Don Zickus
    Link: http://lkml.kernel.org/n/tip-agjev8eu666tvknpb3iaj0fg@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

28 Jun, 2011

1 commit

  • commit 21a3c96 uses node_start/end_pfn(nid) for detection start/end
    of nodes. But, it's not defined in linux/mmzone.h but defined in
    /arch/???/include/mmzone.h which is included only under
    CONFIG_NEED_MULTIPLE_NODES=y.

    Then, we see
    mm/page_cgroup.c: In function 'page_cgroup_init':
    mm/page_cgroup.c:308: error: implicit declaration of function 'node_start_pfn'
    mm/page_cgroup.c:309: error: implicit declaration of function 'node_end_pfn'

    So, fixiing page_cgroup.c is an idea...

    But node_start_pfn()/node_end_pfn() is a very generic macro and
    should be implemented in the same manner for all archs.
    (m32r has different implementation...)

    This patch removes definitions of node_start/end_pfn() in each archs
    and defines a unified one in linux/mmzone.h. It's not under
    CONFIG_NEED_MULTIPLE_NODES, now.

    A result of macro expansion is here (mm/page_cgroup.c)

    for !NUMA
    start_pfn = ((&contig_page_data)->node_start_pfn);
    end_pfn = ({ pg_data_t *__pgdat = (&contig_page_data); __pgdat->node_start_pfn + __pgdat->node_spanned_pages;});

    for NUMA (x86-64)
    start_pfn = ((node_data[nid])->node_start_pfn);
    end_pfn = ({ pg_data_t *__pgdat = (node_data[nid]); __pgdat->node_start_pfn + __pgdat->node_spanned_pages;});

    Changelog:
    - fixed to avoid using "nid" twice in node_end_pfn() macro.

    Reported-and-acked-by: Randy Dunlap
    Reported-and-tested-by: Ingo Molnar
    Acked-by: Mel Gorman
    Signed-off-by: KAMEZAWA Hiroyuki
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     

10 Jun, 2011

2 commits

  • During converting per-cpu ticker to genirq layer some
    IRQ initialization code was removed by commit
    2cf9530420e446bb61f665d02afeb81070106900 ("sparc32,leon:
    per-cpu ticker use genirq per-cpu handler").

    This patch reintroduces the code at the same place it was
    removed from. IRQ12 - IRQ14 will crash on LEON SMP without
    this patch because it will run the SUN4M IRQ trap handler.

    Reported-by: Jan Andersson
    Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     
  • Three new IPIs were introduced by commit
    ecbc42b70acbc6327adefe9635db93fcf62bf59d ("sparc32, sun4m:
    Implemented SMP IPIs support for SUN4M machines"), the
    old handler was already prepared for IPIs but handled only
    IRQ14 and IRQ13, this patch adds support for the new IPI at
    IRQ12.

    The IPI trap handler looks at the mask rather than the
    pending IRQ/IPI, this bug may have masked the problem
    above, introduced by the same commit.

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

    Daniel Hellstrom
     

08 Jun, 2011

4 commits

  • Semicolons are not necessary after switch/while/for/if braces
    so remove them.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • Some devices that can generate interrupts are connected directly to the
    CPU through the bootbus on sun4d. This patch allows IRQs to be allocated
    for such devices. The information used for allocating interrupts for
    sbus devices are present at the corresponding SBI node. For bootbus
    devices this information is present in the bootbus node.

    Signed-off-by: Kjetil Oftedal
    Signed-off-by: David S. Miller

    oftedal
     
  • During the introduction of genirq on sparc32 bugs were introduced in
    the interrupt handler for sun4d. The interrupts handler checks the status
    of the various sbus interfaces in the system and generates a virtual
    interrupt, based upon the location of the interrupt source. This lookup
    was broken by restructuring the code in such a way that index and shift
    operations were performed prior to comparing this against the values
    read from the interrupt controllers.

    This could cause the handler to loop eternally as the interrupt source
    could be skipped before any check was performed. Additionally
    sun4d_encode_irq performs shifting internally, so it should not be performed
    twice.

    In sun4d_unmask interrupts were not correctly acknowledged, as the
    corresponding bit it the interrupt mask was not actually cleared.

    Signed-off-by: Kjetil Oftedal
    Signed-off-by: David S. Miller

    oftedal
     
  • sun4d_build_device_irq was called without a valid platform_device when
    the system timer was initialized on sun4d systems. This caused a NULL
    pointer crash.

    Josip Rodin suggested that the current sun4d_build_device_irq should be
    split into two functions. So that the timer initialization could skip
    the slot and sbus interface detection code in sun4d_build_device_irq, as
    this does not make sence due to the timer interrupts not being generated
    from a device located on sbus.

    Signed-off-by: Kjetil Oftedal
    Signed-off-by: David S. Miller

    oftedal
     

03 Jun, 2011

5 commits

  • Reported-by: Stephen Rothwell
    Signed-off-by: David S. Miller

    David S. Miller
     
  • Config option GENERIC_HARDIRQS_NO_DEPRECATED was removed in commit
    78c89825649a9a5ed526c507603196f467d781a5 ("genirq: Remove the now obsolete
    config options and select statements"), but the select was accidentally
    reintroduced in commit 6baa9b20a68a88c2fd751cbe8d7652009379351b
    ("sparc32: genirq support")

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: David S. Miller

    Geert Uytterhoeven
     
  • The DMA region must be accessible in order for PCI peripheral
    drivers to work, the sparc32 has DMA in the normal memory
    zone which requires the GRPCI2 to PCI target BARs so that all
    kernel low mem (192MB) can be mapped 1:1 to PCI address
    space. The GRPCI2 has resizeable target BARs, by default the
    first is made 256MB and all other BARs are disabled.

    I/O space are always located on 0x1000-0x10000, but accessed
    through the GRPCI2 PCI I/O Window memory mapped to virtual
    address space.

    Configuration space is accessed through the 64KB GRPCI2 PCI
    CFG Window using LDA bypassing the MMU.

    The GRPCI2 has a single PCI Window for prefetchable and non-
    prefetchable address space, it is up to the AHB master
    requesting PCI data to determine access type. Memory space
    is mapped 1:1.

    The GRPCI2 core can be configured in 4 different IRQ modes,
    where PCI Interrupt, Error Interrupt and DMA Interrupt are
    shared on a single IRQ line or at most 5 IRQs are used. The
    GRPCI2 can mask/unmask PCI interrupts, Err and DMA in the control
    and check status bits which tells us which IRQ really happended.
    The GENIRQ layer is used to unmask/mask each individual IRQ
    source by creating virtual IRQs and implementing a IRQ chip.

    The optional DMA functionality of the GRPCI2 is not supported
    by this patch.

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

    Daniel Hellstrom
     
  • The LEON architecture does not have a BIOS or bootloader that
    initializes PCI for us, instead Linux generic PCI layer is used
    to set up resources and IRQ.

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

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

    Daniel Hellstrom
     

29 May, 2011

2 commits

  • * setns:
    ns: Wire up the setns system call

    Done as a merge to make it easier to fix up conflicts in arm due to
    addition of sendmmsg system call

    Linus Torvalds
     
  • 32bit and 64bit on x86 are tested and working. The rest I have looked
    at closely and I can't find any problems.

    setns is an easy system call to wire up. It just takes two ints so I
    don't expect any weird architecture porting problems.

    While doing this I have noticed that we have some architectures that are
    very slow to get new system calls. cris seems to be the slowest where
    the last system calls wired up were preadv and pwritev. avr32 is weird
    in that recvmmsg was wired up but never declared in unistd.h. frv is
    behind with perf_event_open being the last syscall wired up. On h8300
    the last system call wired up was epoll_wait. On m32r the last system
    call wired up was fallocate. mn10300 has recvmmsg as the last system
    call wired up. The rest seem to at least have syncfs wired up which was
    new in the 2.6.39.

    v2: Most of the architecture support added by Daniel Lezcano
    v3: ported to v2.6.36-rc4 by: Eric W. Biederman
    v4: Moved wiring up of the system call to another patch
    v5: ported to v2.6.39-rc6
    v6: rebased onto parisc-next and net-next to avoid syscall conflicts.
    v7: ported to Linus's latest post 2.6.39 tree.

    >  arch/blackfin/include/asm/unistd.h     |    3 ++-
    >  arch/blackfin/mach-common/entry.S      |    1 +
    Acked-by: Mike Frysinger

    Oh - ia64 wiring looks good.
    Acked-by: Tony Luck

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

27 May, 2011

1 commit

  • By the previous style change, CONFIG_GENERIC_FIND_NEXT_BIT,
    CONFIG_GENERIC_FIND_BIT_LE, and CONFIG_GENERIC_FIND_LAST_BIT are not used
    to test for existence of find bitops anymore.

    Signed-off-by: Akinobu Mita
    Acked-by: Greg Ungerer
    Cc: Arnd Bergmann
    Cc: Russell King
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

25 May, 2011

5 commits

  • Most arches define CONFIG_DEBUG_STACK_USAGE exactly the same way. Move it
    to lib/Kconfig.debug so each arch doesn't have to define it. This
    obviously makes the option generic, but that's fine because the config is
    already used in generic code.

    It's not obvious to me that sysrq-P actually does anything caution by
    keeping the most inclusive wording.

    Signed-off-by: Stephen Boyd
    Cc: Chris Metcalf
    Acked-by: David S. Miller
    Acked-by: Richard Weinberger
    Acked-by: Mike Frysinger
    Cc: Russell King
    Cc: Hirokazu Takata
    Acked-by: Ralf Baechle
    Cc: Paul Mackerras
    Acked-by: Benjamin Herrenschmidt
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • Fold all the mmu_gather rework patches into one for submission

    Signed-off-by: Peter Zijlstra
    Reported-by: Hugh Dickins
    Cc: Benjamin Herrenschmidt
    Cc: David Miller
    Cc: Martin Schwidefsky
    Cc: Russell King
    Cc: Paul Mundt
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Tony Luck
    Cc: KAMEZAWA Hiroyuki
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Nick Piggin
    Cc: Namhyung Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Rework the sparc mmu_gather usage to conform to the new world order :-)

    Sparc mmu_gather does two things:
    - tracks vaddrs to unhash
    - tracks pages to free

    Split these two things like powerpc has done and keep the vaddrs
    in per-cpu data structures and flush them on context switch.

    The remaining bits can then use the generic mmu_gather.

    Signed-off-by: Peter Zijlstra
    Acked-by: David Miller
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Russell King
    Cc: Paul Mundt
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Tony Luck
    Cc: KAMEZAWA Hiroyuki
    Cc: Hugh Dickins
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Nick Piggin
    Cc: Namhyung Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Architectures that implement their own show_mem() function did not pass
    the filter argument to show_free_areas() to appropriately avoid emitting
    the state of nodes that are disallowed in the current context. This patch
    now passes the filter argument to show_free_areas() so those nodes are now
    avoided.

    This patch also removes the show_free_areas() wrapper around
    __show_free_areas() and converts existing callers to pass an empty filter.

    ia64 emits additional information for each node, so skip_free_areas_zone()
    must be made global to filter disallowed nodes and it is converted to use
    a nid argument rather than a zone for this use case.

    Signed-off-by: David Rientjes
    Cc: Russell King
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Kyle McMartin
    Cc: Helge Deller
    Cc: James Bottomley
    Cc: "David S. Miller"
    Cc: Guan Xuetao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • * 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
    percpu: Unify input section names
    percpu: Avoid extra NOP in percpu_cmpxchg16b_double
    percpu: Cast away printk format warning
    percpu: Always align percpu output section to PAGE_SIZE

    Fix up fairly trivial conflict in arch/x86/include/asm/percpu.h as per Tejun

    Linus Torvalds
     

24 May, 2011

1 commit


23 May, 2011

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6: (28 commits)
    sparc32: fix build, fix missing cpu_relax declaration
    SCHED_TTWU_QUEUE is not longer needed since sparc32 now implements IPI
    sparc32,leon: Remove unnecessary page_address calls in LEON DMA API.
    sparc: convert old cpumask API into new one
    sparc32, sun4d: Implemented SMP IPIs support for SUN4D machines
    sparc32, sun4m: Implemented SMP IPIs support for SUN4M machines
    sparc32,leon: Implemented SMP IPIs for LEON CPU
    sparc32: implement SMP IPIs using the generic functions
    sparc32,leon: SMP power down implementation
    sparc32,leon: added some SMP comments
    sparc: add {read,write}*_be routines
    sparc32,leon: don't rely on bootloader to mask IRQs
    sparc32,leon: operate on boot-cpu IRQ controller registers
    sparc32: always define boot_cpu_id
    sparc32: removed unused code, implemented by generic code
    sparc32: avoid build warning at mm/percpu.c:1647
    sparc32: always register a PROM based early console
    sparc32: probe for cpu info only during startup
    sparc: consolidate show_cpuinfo in cpu.c
    sparc32,leon: implement genirq CPU affinity
    ...

    Linus Torvalds
     
  • Fix following sparc (32 bit) build error:

    CC arch/sparc/kernel/asm-offsets.s
    In file included from include/linux/seqlock.h:29:0,
    from include/linux/time.h:8,
    from include/linux/timex.h:56,
    from include/linux/sched.h:57,
    from arch/sparc/kernel/asm-offsets.c:13:
    include/linux/spinlock.h: In function 'spin_unlock_wait':
    include/linux/spinlock.h:360:2: error: implicit declaration of function 'cpu_relax'

    Most likely caused by commit e66eed651fd1 ("list: remove
    prefetching from regular list iterators") due to include
    changes.

    Signed-off-by: Sam Ravnborg
    Cc: Stephen Rothwell
    Signed-off-by: David S. Miller

    Sam Ravnborg
     

21 May, 2011

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1446 commits)
    macvlan: fix panic if lowerdev in a bond
    tg3: Add braces around 5906 workaround.
    tg3: Fix NETIF_F_LOOPBACK error
    macvlan: remove one synchronize_rcu() call
    networking: NET_CLS_ROUTE4 depends on INET
    irda: Fix error propagation in ircomm_lmp_connect_response()
    irda: Kill set but unused variable 'bytes' in irlan_check_command_param()
    irda: Kill set but unused variable 'clen' in ircomm_connect_indication()
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport()
    be2net: Kill set but unused variable 'req' in lancer_fw_download()
    irda: Kill set but unused vars 'saddr' and 'daddr' in irlan_provider_connect_indication()
    atl1c: atl1c_resume() is only used when CONFIG_PM_SLEEP is defined.
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer().
    rxrpc: Kill set but unused variable 'local' in rxrpc_UDP_error_handler()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_process_connection()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window()
    pkt_sched: Kill set but unused variable 'protocol' in tc_classify()
    isdn: capi: Use pr_debug() instead of ifdefs.
    tg3: Update version to 3.119
    tg3: Apply rx_discards fix to 5719/5720
    ...

    Fix up trivial conflicts in arch/x86/Kconfig and net/mac80211/agg-tx.c
    as per Davem.

    Linus Torvalds
     
  • Conflicts:
    arch/sparc/kernel/smp_32.c

    With merge conflict help from Daniel Hellstrom.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • David S. Miller
     

20 May, 2011

2 commits

  • …kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (60 commits)
    sched: Fix and optimise calculation of the weight-inverse
    sched: Avoid going ahead if ->cpus_allowed is not changed
    sched, rt: Update rq clock when unthrottling of an otherwise idle CPU
    sched: Remove unused parameters from sched_fork() and wake_up_new_task()
    sched: Shorten the construction of the span cpu mask of sched domain
    sched: Wrap the 'cfs_rq->nr_spread_over' field with CONFIG_SCHED_DEBUG
    sched: Remove unused 'this_best_prio arg' from balance_tasks()
    sched: Remove noop in alloc_rt_sched_group()
    sched: Get rid of lock_depth
    sched: Remove obsolete comment from scheduler_tick()
    sched: Fix sched_domain iterations vs. RCU
    sched: Next buddy hint on sleep and preempt path
    sched: Make set_*_buddy() work on non-task entities
    sched: Remove need_migrate_task()
    sched: Move the second half of ttwu() to the remote cpu
    sched: Restructure ttwu() some more
    sched: Rename ttwu_post_activation() to ttwu_do_wakeup()
    sched: Remove rq argument from ttwu_stat()
    sched: Remove rq->lock from the first half of ttwu()
    sched: Drop rq->lock from sched_exec()
    ...

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: Fix rt_rq runtime leakage bug

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (107 commits)
    perf stat: Add more cache-miss percentage printouts
    perf stat: Add -d -d and -d -d -d options to show more CPU events
    ftrace/kbuild: Add recordmcount files to force full build
    ftrace: Add self-tests for multiple function trace users
    ftrace: Modify ftrace_set_filter/notrace to take ops
    ftrace: Allow dynamically allocated function tracers
    ftrace: Implement separate user function filtering
    ftrace: Free hash with call_rcu_sched()
    ftrace: Have global_ops store the functions that are to be traced
    ftrace: Add ops parameter to ftrace_startup/shutdown functions
    ftrace: Add enabled_functions file
    ftrace: Use counters to enable functions to trace
    ftrace: Separate hash allocation and assignment
    ftrace: Create a global_ops to hold the filter and notrace hashes
    ftrace: Use hash instead for FTRACE_FL_FILTER
    ftrace: Replace FTRACE_FL_NOTRACE flag with a hash of ignored functions
    perf bench, x86: Add alternatives-asm.h wrapper
    x86, 64-bit: Fix copy_[to/from]_user() checks for the userspace address limit
    x86, mem: memset_64.S: Optimize memset by enhanced REP MOVSB/STOSB
    x86, mem: memmove_64.S: Optimize memmove by enhanced REP MOVSB/STOSB
    ...

    Linus Torvalds
     

19 May, 2011

1 commit

  • Commit b826291c, "drivercore/dt: add a match table pointer to struct
    device" added an of_match pointer to struct device to cache the
    of_match_table entry discovered at driver match time. This was unsafe
    because matching is not an atomic operation with probing a driver. If
    two or more drivers are attempted to be matched to a driver at the
    same time, then the cached matching entry pointer could get
    overwritten.

    This patch reverts the of_match cache pointer and reworks all users to
    call of_match_device() directly instead.

    Signed-off-by: Grant Likely

    Grant Likely
     

17 May, 2011

8 commits

  • The function mmu_inval_dma_area takes a virtual address as a parameter
    which is problematic in case the buffer is located in highmem and the
    mapping currently is unavailable.

    Since the function was only implemented for LEON this patch removes
    calls to it in non LEON code paths and renames it to dma_make_coherent
    which instead takes a physical address (which for now is unused since we
    flush the whole cache). This way it is possible to remove several unnecessary
    calls to page_address which will fail if the virtual mapping is unavailable.

    Signed-off-by: Kristoffer Glembo
    Acked-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Kristoffer Glembo
     
  • 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
     
  • The sun4d does not seem to have a distingstion between soft and hard
    IRQs. When generating IPIs the generated IRQ looks like a hard IRQ,
    this patch adds a "IPI check" in the sun4d irq trap handler at a
    predefined IRQ number (SUN4D_IPI_IRQ). Before generating an IPI
    a per-cpu memory structure is modified for the "IPI check" to
    successfully detect a IPI request to a specific processor, the check
    clears the IPI work requested.

    All three IPIs (resched, single and cpu-mask) use the same IRQ
    number.

    The IPI IRQ should preferrably be on a separate IRQ and definitly
    not shared with IRQ handlers requesting IRQ with IRQF_SHARED.

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

    Daniel Hellstrom
     
  • 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
     
  • This patch implements SMP IPIs on LEON using software generated
    IRQs to signal between CPUs.

    The IPI IRQ number is set by using the ipi_num property in the
    device tree, or defaults to 13. LEON SMP systems should reserve
    IRQ 13 (and IRQ 15) to Linux in order for the defaults to work.

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

    Daniel Hellstrom
     
  • The current sparc32 SMP IPI generation is implemented the
    cross call function. The cross call function uses IRQ15 the
    NMI, this is has the effect that IPIs will interrupt IRQ
    critical areas and hang the system. Typically on/after
    spin_lock_irqsave calls can be aborted.

    The cross call functionality must still exist to flush
    cache/TLBS.

    This patch provides CPU models a custom way to implement
    generation of IPIs on the generic code's request. The
    typical approach is to generate an IRQ for each IPI case.

    After this patch each sparc32 SMP CPU model needs to
    implement IPIs in order to function properly.

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

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

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

    Daniel Hellstrom
     

13 May, 2011

1 commit