23 Oct, 2008

1 commit

  • I'm trying to move the powerpc math-emu code to use the include/math-emu bits.

    In doing so I've been using TestFloat to see how good or bad we are
    doing. For the most part the current math-emu code that PPC uses has
    a number of issues that the code in include/math-emu seems to solve
    (plus bugs we've had for ever that no one every realized).

    Anyways, I've come across a case that we are flagging underflow and
    inexact because we think we have a denormalized result from a double
    precision divide:

    000.FFFFFFFFFFFFF / 3FE.FFFFFFFFFFFFE
    soft: 001.0000000000000 ..... syst: 001.0000000000000 ...ux

    What it looks like is the results out of FP_DIV_D are:

    D:
    sign: 0
    mantissa: 01000000 00000000
    exp: -1023 (0)

    The problem seems like we aren't normalizing the result and bumping the exp.

    Now that I'm digging into this a bit I'm thinking my issue has to do with
    the fix DaveM put in place from back in Aug 2007 (commit
    405849610fd96b4f34cd1875c4c033228fea6c0f):

    [MATH-EMU]: Fix underflow exception reporting.

    2) we ended up rounding back up to normal (this is the case where
    we set the exponent to 1 and set the fraction to zero), this
    should set inexact too
    ...

    Another example, "0x0.0000000000001p-1022 / 16.0", should signal both
    inexact and underflow. The cpu implementations and ieee1754
    literature is very clear about this. This is case #2 above.

    Here is the distilled glibc test case from Jakub Jelinek which prompted that
    commit:

    --------------------
    #include
    #include
    #include

    volatile double d = DBL_MIN;
    volatile double e = 0x0.0000000000001p-1022;
    volatile double f = 16.0;
    int
    main (void)
    {
    printf ("%x\n", fetestexcept (FE_UNDERFLOW));
    d /= f;
    printf ("%x\n", fetestexcept (FE_UNDERFLOW));
    e /= f;
    printf ("%x\n", fetestexcept (FE_UNDERFLOW));
    return 0;
    }
    --------------------

    It looks like the case I have we are exact before rounding, but think it
    looks like the rounding case since it appears as if "overflow is set".

    000.FFFFFFFFFFFFF / 3FE.FFFFFFFFFFFFE = 001.0000000000000

    I think the following adds the check for my case and still works for the
    issue your commit was trying to resolve.

    Signed-off-by: David S. Miller

    Kumar Gala
     

21 Oct, 2008

25 commits

  • powerpc doesn't use the generic WARN_ON infrastructure. The newly
    introduced WARN() as a result didn't print the message, this patch adds
    the printk for this specific case.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
    parisc: convert to generic compat_sys_ptrace
    parisc: add rtc platform driver
    parisc: initialize unwinder much earlier
    parisc: add new syscalls
    parisc: hijack jump to start_kernel
    parisc: add pdc_coproc_cfg_unlocked and set_firmware_width_unlocked
    parisc: move include/asm-parisc to arch/parisc/include/asm
    parisc: move pdc_result to real2.S
    parisc: unify CCIO_COLLECT_STATS implementation
    parisc: add arch/parisc/kernel/.gitignore
    parisc: ropes.h - fix ->
    parisc: parisc-agp - fix ->

    Resolve remove/rename conflict: include/asm-parisc/a.out.h is no longer
    relevant.

    Linus Torvalds
     
  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (41 commits)
    PCI: fix pci_ioremap_bar() on s390
    PCI: fix AER capability check
    PCI: use pci_find_ext_capability everywhere
    PCI: remove #ifdef DEBUG around dev_dbg call
    PCI hotplug: fix get_##name return value problem
    PCI: document the pcie_aspm kernel parameter
    PCI: introduce an pci_ioremap(pdev, barnr) function
    powerpc/PCI: Add legacy PCI access via sysfs
    PCI: Add ability to mmap legacy_io on some platforms
    PCI: probing debug message uniformization
    PCI: support PCIe ARI capability
    PCI: centralize the capabilities code in probe.c
    PCI: centralize the capabilities code in pci-sysfs.c
    PCI: fix 64-vbit prefetchable memory resource BARs
    PCI: replace cfg space size (256/4096) by macros.
    PCI: use resource_size() everywhere.
    PCI: use same arg names in PCI_VDEVICE comment
    PCI hotplug: rpaphp: make debug var unique
    PCI: use %pF instead of print_fn_descriptor_symbol() in quirks.c
    PCI: fix hotplug get_##name return value problem
    ...

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

    * 'tracing-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (131 commits)
    tracing/fastboot: improve help text
    tracing/stacktrace: improve help text
    tracing/fastboot: fix initcalls disposition in bootgraph.pl
    tracing/fastboot: fix bootgraph.pl initcall name regexp
    tracing/fastboot: fix issues and improve output of bootgraph.pl
    tracepoints: synchronize unregister static inline
    tracepoints: tracepoint_synchronize_unregister()
    ftrace: make ftrace_test_p6nop disassembler-friendly
    markers: fix synchronize marker unregister static inline
    tracing/fastboot: add better resolution to initcall debug/tracing
    trace: add build-time check to avoid overrunning hex buffer
    ftrace: fix hex output mode of ftrace
    tracing/fastboot: fix initcalls disposition in bootgraph.pl
    tracing/fastboot: fix printk format typo in boot tracer
    ftrace: return an error when setting a nonexistent tracer
    ftrace: make some tracers reentrant
    ring-buffer: make reentrant
    ring-buffer: move page indexes into page headers
    tracing/fastboot: only trace non-module initcalls
    ftrace: move pc counter in irqtrace
    ...

    Manually fix conflicts:
    - init/main.c: initcall tracing
    - kernel/module.c: verbose level vs tracepoints
    - scripts/bootgraph.pl: fallout from cherry-picking commits.

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

    This merges branches irq/genirq, irq/sparseirq-v4, timers/hpet-percpu
    and x86/uv.

    The sparseirq branch is just preliminary groundwork: no sparse IRQs are
    actually implemented by this tree anymore - just the new APIs are added
    while keeping the old way intact as well (the new APIs map 1:1 to
    irq_desc[]). The 'real' sparse IRQ support will then be a relatively
    small patch ontop of this - with a v2.6.29 merge target.

    * 'genirq-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (178 commits)
    genirq: improve include files
    intr_remapping: fix typo
    io_apic: make irq_mis_count available on 64-bit too
    genirq: fix name space collisions of nr_irqs in arch/*
    genirq: fix name space collision of nr_irqs in autoprobe.c
    genirq: use iterators for irq_desc loops
    proc: fixup irq iterator
    genirq: add reverse iterator for irq_desc
    x86: move ack_bad_irq() to irq.c
    x86: unify show_interrupts() and proc helpers
    x86: cleanup show_interrupts
    genirq: cleanup the sparseirq modifications
    genirq: remove artifacts from sparseirq removal
    genirq: revert dynarray
    genirq: remove irq_to_desc_alloc
    genirq: remove sparse irq code
    genirq: use inline function for irq_to_desc
    genirq: consolidate nr_irqs and for_each_irq_desc()
    x86: remove sparse irq from Kconfig
    genirq: define nr_irqs for architectures with GENERIC_HARDIRQS=n
    ...

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

    * 'v28-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (36 commits)
    fix documentation of sysrq-q really
    Fix documentation of sysrq-q
    timer_list: add base address to clock base
    timer_list: print cpu number of clockevents device
    timer_list: print real timer address
    NOHZ: restart tick device from irq_enter()
    NOHZ: split tick_nohz_restart_sched_tick()
    NOHZ: unify the nohz function calls in irq_enter()
    timers: fix itimer/many thread hang, fix
    timers: fix itimer/many thread hang, v3
    ntp: improve adjtimex frequency rounding
    timekeeping: fix rounding problem during clock update
    ntp: let update_persistent_clock() sleep
    hrtimer: reorder struct hrtimer to save 8 bytes on 64bit builds
    posix-timers: lock_timer: make it readable
    posix-timers: lock_timer: kill the bogus ->it_id check
    posix-timers: kill ->it_sigev_signo and ->it_sigev_value
    posix-timers: sys_timer_create: cleanup the error handling
    posix-timers: move the initialization of timer->sigq from send to create path
    posix-timers: sys_timer_create: simplify and s/tasklist/rcu/
    ...

    Fix trivial conflicts due to sysrq-q description clahes in
    Documentation/sysrq.txt and drivers/char/sysrq.c

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (36 commits)
    ide: re-add TRM290 fix lost during ide_build_dmatable() cleanup
    scc_pata: kill unused variables
    sgiioc4: kill duplicate ioremap()
    sgiioc4: kill useless address checks
    delkin_cb: add PM support
    ide: remove broken hpt34x driver
    ide-floppy: remove idefloppy_floppy_t typedef
    sgiioc4: remove maskproc() method
    hpt366: cleanup maskproc() method
    ide: mask interrupt in ide_config_drive_speed()
    hpt366: fix compile warning
    ide: remove unused macros from
    ide: remove M68K_IDE_SWAPW define from
    ide: remove dead
    ide: fix support for IDE PCI controllers using MMIO on frv
    ide-cd: remove stale comment
    ide-cd: small drive type print fix
    ide-cd: debug log enhancements
    ide: add generic ATA/ATAPI disk driver
    ide: allow device drivers to specify per-device type /proc settings
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
    fuse: implement nonseekable open
    fuse: add include protectors
    fuse: config description improvement
    fuse: add missing fuse_request_free
    fuse: fix SEEK_END incorrectness

    Linus Torvalds
     
  • s390 doesn't have ioremap_*, so protect the definition of the new
    pci_ioremap_bar function with CONFIG_HAS_IOMEM to avoid build breakage.

    Acked-by: Arjan van de Ven
    Signed-off-by: Heiko Carstens
    Signed-off-by: Jesse Barnes

    Heiko Carstens
     
  • The 'use pci_find_ext_capability everywhere' cleanup brought a new bug,
    which makes the AER stop working. Fix it by actually using find_ext_cap
    instead of just find_cap. Drop the unused config space size define while
    we're at it.

    Signed-off-by: Yu Zhao
    Signed-off-by: Jesse Barnes

    Yu Zhao
     
  • Remove some open coded (and buggy) versions of pci_find_ext_capability
    in favor of the real routine in the PCI core.

    Tested-by: Tomasz Czernecki
    Acked-by: Andrew Vasquez
    Reviewed-by: Matthew Wilcox
    Signed-off-by: Jesse Barnes

    Jesse Barnes
     
  • A common thing in many PCI drivers is to ioremap() an entire bar. This
    is a slightly fragile thing right now, needing both an address and a
    size, and many driver writers do.. various things there.

    This patch introduces an pci_ioremap() function taking just a PCI device
    struct and the bar number as arguments, and figures this all out itself,
    in one place. In addition, we can add various sanity checks to this
    function (the patch already checks to make sure that the bar in question
    really is a MEM bar; few to no drivers do that sort of thing).

    Hopefully with this type of API we get less chance of mistakes in
    drivers with ioremap() operations.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Jesse Barnes

    Arjan van de Ven
     
  • This patch adds support for PCI Express Alternative Routing-ID
    Interpretation (ARI) capability.

    The ARI capability extends the Function Number field of the PCI Express
    Endpoint by reusing the Device Number which is otherwise hardwired to 0.
    With ARI, an Endpoint can have up to 256 functions.

    Signed-off-by: Yu Zhao
    Signed-off-by: Jesse Barnes

    Yu Zhao
     
  • This cleanup makes the argument names in PCI_VDEVICE comment consistent
    with those used in its definition.

    Signed-off-by: Yu Zhao
    Signed-off-by: Jesse Barnes

    Zhao, Yu
     
  • This patch updates the Intel Ibex Peak (PCH) LPC and SMBus Controller
    DeviceIDs.

    The LPC Controller ID is set by Firmware within the range of
    0x3b00-3b1f. This range is included in pci_ids.h using min and max
    values, and irq.c now has code to handle the range (in lieu of 32
    additions to a SWITCH statement).

    The SMBus Controller ID is a fixed-value and will not change.

    Signed-off-by: Seth Heasley
    Acked-by: Jean Delvare
    Signed-off-by: Jesse Barnes

    Seth Heasley
     
  • We are using 28bit pci (bus/dev/fn + 12 bits) as irq number, so the
    cache for irq number should be 32 bit too.

    Signed-off-by: Yinghai Lu
    Cc: Andrew Vasquez
    Signed-off-by: Jesse Barnes

    Yinghai Lu
     
  • Many device drivers use the following sequence of statements to enable
    the device to wake up the system while being in the D3_hot or D3_cold
    low power state:

    pci_enable_wake(pdev, PCI_D3hot, 1);
    pci_enable_wake(pdev, PCI_D3cold, 1);

    However, the second call is not necessary if the first one succeeds (the
    ordering of the statements above doesn't matter here) and it may even be
    harmful, because we are not supposed to enable PME# after the wake-up
    power has been enabled for the device.

    To allow drivers to overcome this problem, introduce function
    pci_wake_from_d3() that will enable the device to wake up the system
    from any of D3_hot and D3_cold as long as the wake-up from at least one
    of them is supported.

    Acked-by: Pavel Machek
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     
  • The driver flag dynids.use_driver_data is almost consistently not set,
    and causes more problems than it solves. It was initially intended as a
    flag to indicate whether a driver's usage of driver_data had been
    carefully inspected and was ready for values from userspace. That audit
    was never done, so most drivers just get a 0 for driver_data when new
    IDs are added from userspace via sysfs. So remove the flag, allowing
    drivers to see the data directly (a followon patch validates the passed
    driver_data value against what the drivers expect).

    Acked-by: Greg Kroah-Hartman
    Acked-by: Jean Delvare
    Signed-off-by: Milton Miller
    Signed-off-by: Jesse Barnes

    Milton Miller
     
  • * git://git.infradead.org/battery-2.6:
    bq27x00_battery: use unaligned access helper
    power_supply: fix dependency of tosa_battery
    power_supply: Support for Texas Instruments BQ27200 battery managers
    power_supply: Add function to return system-wide power state
    pda_power: Check and handle return value of set_irq_wake

    Linus Torvalds
     
  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: (26 commits)
    9p: add more conservative locking
    9p: fix oops in protocol stat parsing error path.
    9p: fix device file handling
    9p: Improve debug support
    9p: eliminate depricated conv functions
    9p: rework client code to use new protocol support functions
    9p: remove unnecessary tag field from p9_req_t structure
    9p: remove 9p fcall debug prints
    9p: add new protocol support code
    9p: encapsulate version function
    9p: move dirread to fs layer
    9p: adjust 9p vfs write operation
    9p: move readn meta-function from client to fs layer
    9p: consolidate read/write functions
    9p: drop broken unused error path from p9_conn_create()
    9p: make rpc code common and rework flush code
    9p: use the rcall structure passed in the request in trans_fd read_work
    9p: apply common request code to trans_fd
    9p: apply common tagpool handling to trans_fd
    9p: move request management to client code
    ...

    Linus Torvalds
     
  • * git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
    NFS: use correct fs type for v4 submounts and referrals
    Make nfs_file_cred more robust.
    NFS: Enable NFSv4 callback server to listen on AF_INET6 sockets

    Linus Torvalds
     
  • * 'for-next' of git://git.o-hand.com/linux-mfd:
    mfd: further unbork the ucb1400 ac97_bus dependencies
    mfd: ucb1400 needs GPIO
    mfd: ucb1400 sound driver uses/depends on AC97_BUS:
    mfd: Don't use NO_IRQ in WM8350
    mfd: update TMIO drivers to use the clock API
    mfd: twl4030-core irq simplification
    mfd: add base support for Dialog DA9030/DA9034 PMICs
    mfd: TWL4030 core driver
    mfd: support tmiofb cell on tc6393xb
    mfd: add OHCI cell to tc6393xb
    mfd: Fix htc-egpio compile warning
    mfd: do tcb6393xb state restore on resume only if requested
    mfd: provide and use setup hook for tc6393xb
    mfd: update sm501 debugging/low information messages
    mfd: reduce stack usage in mfd-core.c

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (112 commits)
    sh: Move SH-4 CPU headers down one more level.
    sh: Only build in gpio.o when CONFIG_GENERIC_GPIO is selected.
    sh: Migrate common board headers to mach-common/.
    sh: Move the CPU definition headers from asm/ to cpu/.
    serial: sh-sci: Add support SCIF of SH7723
    video: add sh_mobile_lcdc platform flags
    video: remove unused sh_mobile_lcdc platform data
    sh: remove consistent alloc cruft
    sh: add dynamic crash base address support
    sh: reduce Migo-R smc91x overruns
    sh: Fix up some merge damage.
    Fix debugfs_create_file's error checking method for arch/sh/mm/
    Fix debugfs_create_dir's error checking method for arch/sh/kernel/
    sh: ap325rxa: Add support RTC RX-8564LC in AP325RXA board
    sh: Use sh7720 GPIO on magicpanelr2 board
    sh: Add sh7720 pinmux code
    sh: Use sh7203 GPIO on rsk7203 board
    sh: Add sh7203 pinmux code
    sh: Use sh7723 GPIO on AP325RXA board
    sh: Add sh7723 pinmux code
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    netfilter: replace old NF_ARP calls with NFPROTO_ARP
    netfilter: fix compilation error with NAT=n
    netfilter: xt_recent: use proc_create_data()
    netfilter: snmp nat leaks memory in case of failure
    netfilter: xt_iprange: fix range inversion match
    netfilter: netns: use NFPROTO_NUMPROTO instead of NUMPROTO for tables array
    netfilter: ctnetlink: remove obsolete NAT dependency from Kconfig
    pkt_sched: sch_generic: Fix oops in sch_teql
    dccp: Port redirection support for DCCP
    tcp: Fix IPv6 fallout from 'Port redirection support for TCP'
    netdev: change name dropping error codes
    ipvs: Update CONFIG_IP_VS_IPV6 description and help text

    Linus Torvalds
     
  • * git://git.infradead.org/mtd-2.6: (69 commits)
    Revert "[MTD] m25p80.c code cleanup"
    [MTD] [NAND] GPIO driver depends on ARM... for now.
    [MTD] [NAND] sh_flctl: fix compile error
    [MTD] [NOR] AT49BV6416 has swapped erase regions
    [MTD] [NAND] GPIO NAND flash driver
    [MTD] cmdlineparts documentation change - explain where mtd-id comes from
    [MTD] cfi_cmdset_0002.c: Add Macronix CFI V1.0 TopBottom detection
    [MTD] [NAND] Fix compilation warnings in drivers/mtd/nand/cs553x_nand.c
    [JFFS2] Write buffer offset adjustment for NOR-ECC (Sibley) flash
    [MTD] mtdoops: Fix a bug where block may not be erased
    [MTD] mtdoops: Add a magic number to logged kernel oops
    [MTD] mtdoops: Fix an off by one error
    [JFFS2] Correct parameter names of jffs2_compress() in comments
    [MTD] [NAND] sh_flctl: add support for Renesas SuperH FLCTL
    [MTD] [NAND] Bug on atmel_nand HW ECC : OOB info not correctly written
    [MTD] [MAPS] Remove unused variable after ROM API cleanup.
    [MTD] m25p80.c extended jedec support (v2)
    [MTD] remove unused mtd parameter in of_mtd_parse_partitions()
    [MTD] [NAND] remove dead Kconfig associated with !CONFIG_PPC_MERGE
    [MTD] [NAND] driver extension to support NAND on TQM85xx modules
    ...

    Linus Torvalds
     

20 Oct, 2008

14 commits

  • Tejun's commit 7b595756ec1f49e0049a9e01a1298d53a7faaa15 made sysfs
    attribute->owner unnecessary. But the field was left in the structure to
    ease the merge. It's been over a year since that change and it is now
    time to start killing attribute->owner along with its users - one arch at
    a time!

    This patch is attempt #1 to get rid of attribute->owner only for
    CONFIG_X86_64 or CONFIG_X86_32 . We will deal with other arches later on
    as and when possible - avr32 will be the next since that is something I
    can test. Compile (make allyesconfig / make allmodconfig / custom config)
    and boot tested.

    akpm: the idea is that we put the declaration of sttribute.owner inside
    `#ifndef CONFIG_X86'. But that proved to be too ambitious for now because
    new usages kept on turning up in subsystem trees.

    [akpm: remove the ifdef for now]
    Signed-off-by: Parag Warudkar
    Cc: Greg KH
    Cc: Ingo Molnar
    Cc: Tejun Heo
    Cc: Len Brown
    Cc: Jens Axboe
    Cc: Jean Delvare
    Cc: Roland Dreier
    Cc: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Parag Warudkar
     
  • - the macros are gone
    - there's no more code in this file,
    LGPL + GPL = GPL,
    and the code that was moved to lib/bcd.c is anyway trivial

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Remove the following obsolete macros:

    - BCD2BIN
    - BIN2BCD
    - BCD_TO_BIN
    - BIN_TO_BCD

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Change various rtc related code to use the new bcd2bin/bin2bcd functions
    instead of the obsolete BCD_TO_BIN/BIN_TO_BCD/BCD2BIN/BIN2BCD macros.

    Signed-off-by: Adrian Bunk
    Acked-by: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • This patch makes the needlessly global anon_vma_cachep static.

    Signed-off-by: Adrian Bunk
    Reviewed-by: KOSAKI Motohiro
    Acked-by: Rik van Riel
    Acked-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • This is needed during the transition to the new byteorder headers as the
    swabb.h functionality will be provided from asm/byteorder.h in the new
    version. To avoid breakage on arches still using the old implementation,
    provide swabb.h from asm/byteorder.h as well.

    Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     
  • This makes the new implementation of the byteorder helpers match the old
    in how it degraded when an arch-defined version was not available:

    1) swab()
    - look for arch defined
    - if not, use generic c version

    2) swabp()
    - look for arch-defined
    - if not, deref pointer and use swab()

    3) swabs()
    - look for arch defined
    - if not, use swabp

    Signed-off-by: Harvey Harrison
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     
  • Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     
  • The usage of elfcorehdr_addr has changed recently such that being set to
    ELFCORE_ADDR_MAX is used by is_kdump_kernel() to indicate if the code is
    executing in a kernel executed as a crash kernel.

    However, arch/ia64/kernel/setup.c:reserve_elfcorehdr will rest
    elfcorehdr_addr to ELFCORE_ADDR_MAX on error, which means any subsequent
    calls to is_kdump_kernel() will return 0, even though they should return
    1.

    Ok, at this point in time there are no subsequent calls, but I think its
    fair to say that there is ample scope for error or at the very least
    confusion.

    This patch add an extra state, ELFCORE_ADDR_ERR, which indicates that
    elfcorehdr_addr was passed on the command line, and thus execution is
    taking place in a crashdump kernel, but vmcore can't be used for some
    reason. This is tested for using is_vmcore_usable() and set using
    vmcore_unusable(). A subsequent patch makes use of this new code.

    To summarise, the states that elfcorehdr_addr can now be in are as follows:

    ELFCORE_ADDR_MAX: not a crashdump kernel
    ELFCORE_ADDR_ERR: crashdump kernel but vmcore is unusable
    any other value: crash dump kernel and vmcore is usable

    Signed-off-by: Simon Horman
    Cc: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Simon Horman
     
  • o elfcorehdr_addr is used by not only the code under CONFIG_PROC_VMCORE
    but also by the code which is not inside CONFIG_PROC_VMCORE. For
    example, is_kdump_kernel() is used by powerpc code to determine if
    kernel is booting after a panic then use previous kernel's TCE table.
    So even if CONFIG_PROC_VMCORE is not set in second kernel, one should be
    able to correctly determine that we are booting after a panic and setup
    calgary iommu accordingly.

    o So remove the assumption that elfcorehdr_addr is under
    CONFIG_PROC_VMCORE.

    o Move definition of elfcorehdr_addr to arch dependent crash files.
    (Unfortunately crash dump does not have an arch independent file
    otherwise that would have been the best place).

    o kexec.c is not the right place as one can Have CRASH_DUMP enabled in
    second kernel without KEXEC being enabled.

    o I don't see sh setup code parsing the command line for
    elfcorehdr_addr. I am wondering how does vmcore interface work on sh.
    Anyway, I am atleast defining elfcoredhr_addr so that compilation is not
    broken on sh.

    Signed-off-by: Vivek Goyal
    Acked-by: "Eric W. Biederman"
    Acked-by: Simon Horman
    Acked-by: Paul Mundt
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     
  • This adds a kconfig option to change the /proc/PID/coredump_filter default.
    Fedora has been carrying a trivial patch to change the hard-wired value for
    this default, since Fedora 8. The default default can't change safely
    because there are old GDB versions out there (all before 6.7) that are
    confused by the core dump files created by the MMF_DUMP_ELF_HEADERS setting.

    Signed-off-by: Roland McGrath
    Cc: Michael Kerrisk
    Cc: Oleg Nesterov
    Cc: Alan Cox
    Cc: Andi Kleen
    Cc: KOSAKI Motohiro
    Cc: Kawai Hidehiro
    Cc: Ingo Molnar
    Cc: David Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • ptrace_untrace() can now become static.

    Signed-off-by: Adrian Bunk
    Cc: Oleg Nesterov
    Cc: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • bitmap_scnprintf_len() is not used now, so we remove it.

    Otherwise we have to maintain it and make its return
    value always equal to bitmap_scnprintf()'s return value.

    Signed-off-by: Lai Jiangshan
    Cc: Alexey Dobriyan
    Cc: Paul Menage
    Cc: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lai Jiangshan
     
  • seq_cpumask_list(), seq_nodemask_list() are very like seq_cpumask(),
    seq_nodemask(), but they print human readable string.

    Signed-off-by: Lai Jiangshan
    Cc: Alexey Dobriyan
    Cc: Paul Menage
    Cc: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lai Jiangshan