13 Sep, 2013

2 commits

  • After the last architecture switched to generic hard irqs the config
    options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
    for !CONFIG_GENERIC_HARDIRQS can be removed.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Unlike global OOM handling, memory cgroup code will invoke the OOM killer
    in any OOM situation because it has no way of telling faults occuring in
    kernel context - which could be handled more gracefully - from
    user-triggered faults.

    Pass a flag that identifies faults originating in user space from the
    architecture-specific fault handlers to generic code so that memcg OOM
    handling can be improved.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Michal Hocko
    Cc: David Rientjes
    Cc: KAMEZAWA Hiroyuki
    Cc: azurIt
    Cc: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

10 Sep, 2013

1 commit

  • Pull m68knommu fixes from Greg Ungerer:
    "Just a small collection of cleanups and fixes this time, no big
    changes. The most interresting are to make the m68k and m68knommu
    consistently use CONFIG_IOMAP, clean out some unused board config
    options and flush the cache on signal stack creation"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
    m68k: remove 16 unused boards in Kconfig.machine
    m68k: define 'VM_DATA_DEFAULT_FLAGS' no matter whether has 'NOMMU' or not
    m68knommu: user generic iomap to support ioread*/iowrite*
    m68k/coldfire: flush cache when creating the signal stack frame
    m68knommu: Mark functions only called from setup_arch() __init

    Linus Torvalds
     

05 Sep, 2013

2 commits

  • Pull PTR_RET() removal patches from Rusty Russell:
    "PTR_RET() is a weird name, and led to some confusing usage. We ended
    up with PTR_ERR_OR_ZERO(), and replacing or fixing all the usages.

    This has been sitting in linux-next for a whole cycle"

    [ There are still some PTR_RET users scattered about, with some of them
    possibly being new, but most of them existing in Rusty's tree too. We
    have that

    #define PTR_RET(p) PTR_ERR_OR_ZERO(p)

    thing in , so they continue to work for now - Linus ]

    * tag 'PTR_RET-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    GFS2: Replace PTR_RET with PTR_ERR_OR_ZERO
    Btrfs: volume: Replace PTR_RET with PTR_ERR_OR_ZERO
    drm/cma: Replace PTR_RET with PTR_ERR_OR_ZERO
    sh_veu: Replace PTR_RET with PTR_ERR_OR_ZERO
    dma-buf: Replace PTR_RET with PTR_ERR_OR_ZERO
    drivers/rtc: Replace PTR_RET with PTR_ERR_OR_ZERO
    mm/oom_kill: remove weird use of ERR_PTR()/PTR_ERR().
    staging/zcache: don't use PTR_RET().
    remoteproc: don't use PTR_RET().
    pinctrl: don't use PTR_RET().
    acpi: Replace weird use of PTR_RET.
    s390: Replace weird use of PTR_RET.
    PTR_RET is now PTR_ERR_OR_ZERO(): Replace most.
    PTR_RET is now PTR_ERR_OR_ZERO

    Linus Torvalds
     
  • Pull timers/nohz changes from Ingo Molnar:
    "It mostly contains fixes and full dynticks off-case optimizations, by
    Frederic Weisbecker"

    * 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
    nohz: Include local CPU in full dynticks global kick
    nohz: Optimize full dynticks's sched hooks with static keys
    nohz: Optimize full dynticks state checks with static keys
    nohz: Rename a few state variables
    vtime: Always debug check snapshot source _before_ updating it
    vtime: Always scale generic vtime accounting results
    vtime: Optimize full dynticks accounting off case with static keys
    vtime: Describe overriden functions in dedicated arch headers
    m68k: hardirq_count() only need preempt_mask.h
    hardirq: Split preempt count mask definitions
    context_tracking: Split low level state headers
    vtime: Fix racy cputime delta update
    vtime: Remove a few unneeded generic vtime state checks
    context_tracking: User/kernel broundary cross trace events
    context_tracking: Optimize context switch off case with static keys
    context_tracking: Optimize guest APIs off case with static key
    context_tracking: Optimize main APIs off case with static key
    context_tracking: Ground setup for static key use
    context_tracking: Remove full dynticks' hacky dependency on wide context tracking
    nohz: Only enable context tracking on full dynticks CPUs
    ...

    Linus Torvalds
     

04 Sep, 2013

1 commit

  • Pull PCI changes from Bjorn Helgaas:

    PCI device hotplug:
    - Use PCIe native hotplug, not ACPI hotplug, when possible (Neil Horman)
    - Assign resources on per-host bridge basis (Yinghai Lu)

    MPS (Max Payload Size):
    - Allow larger MPS settings below hotplug-capable Root Port (Yijing Wang)
    - Add warnings about unsafe MPS settings (Yijing Wang)
    - Simplify interface and messages (Bjorn Helgaas)

    SR-IOV:
    - Return -ENOSYS on non-SR-IOV devices (Stefan Assmann)
    - Update NumVFs register when disabling SR-IOV (Yijing Wang)

    Virtualization:
    - Add bus and slot reset support (Alex Williamson)
    - Fix ACS (Access Control Services) issues (Alex Williamson)

    Miscellaneous:
    - Simplify PCIe Capability accessors (Bjorn Helgaas)
    - Add pcibios_pm_ops for arch-specific hibernate stuff (Sebastian Ott)
    - Disable decoding during BAR sizing only when necessary (Zoltan Kiss)
    - Delay enabling bridges until they're needed (Yinghai Lu)
    - Split Designware support into Synopsys and Exynos parts (Jingoo Han)
    - Convert class code to use dev_groups (Greg Kroah-Hartman)
    - Cleanup Designware and Exynos I/O access wrappers (Seungwon Jeon)
    - Fix bridge I/O window alignment (Bjorn Helgaas)
    - Add pci_wait_for_pending_transaction() (Casey Leedom)
    - Use devm_ioremap_resource() in Marvell driver (Tushar Behera)

    * tag 'pci-v3.12-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (63 commits)
    PCI/ACPI: Fix _OSC ordering to allow PCIe hotplug use when available
    PCI: exynos: Add I/O access wrappers
    PCI: designware: Drop "addr" arg from dw_pcie_readl_rc()/dw_pcie_writel_rc()
    PCI: Remove pcie_cap_has_devctl()
    PCI: Support PCIe Capability Slot registers only for ports with slots
    PCI: Remove PCIe Capability version checks
    PCI: Allow PCIe Capability link-related register access for switches
    PCI: Add offsets of PCIe capability registers
    PCI: Tidy bitmasks and spacing of PCIe capability definitions
    PCI: Remove obsolete comment reference to pci_pcie_cap2()
    PCI: Clarify PCI_EXP_TYPE_PCI_BRIDGE comment
    PCI: Rename PCIe capability definitions to follow convention
    PCI: Warn if unsafe MPS settings detected
    PCI: Fix MPS peer-to-peer DMA comment syntax
    PCI: Disable decoding for BAR sizing only when it was actually enabled
    PCI: Add comment about needing pci_msi_off() even when CONFIG_PCI_MSI=n
    PCI: Add pcibios_pm_ops for optional arch-specific hibernate functionality
    PCI: Don't restrict MPS for slots below Root Ports
    PCI: Simplify MPS test for Downstream Port
    PCI: Remove unnecessary check for pcie_get_mps() failure
    ...

    Linus Torvalds
     

26 Aug, 2013

5 commits

  • The Kconfig entries for 16 boards are unused. Remove these, together
    with the 6 entries that these boards select, but are also unused.

    Signed-off-by: Paul Bolle
    Signed-off-by: Greg Ungerer

    Paul Bolle
     
  • Define 'VM_DATA_DEFAULT_FLAGS' when 'NOMMU' to pass compiling.

    So move it from "include/asm/page_mm.h to "include/asm/page.h"

    The related make:

    make ARCH=m68k randconfig
    make ARCH=m68k menuconfig
    choose cross compiler
    disable MMU support
    make ARCH=m68k V=1 EXTRA_CFLAGS=-W

    The related error:

    security/selinux/hooks.c: In function ‘selinux_init’:
    security/selinux/hooks.c:5821:21: error: ‘VM_DATA_DEFAULT_FLAGS’ undeclared (first use in this function)

    Signed-off-by: Chen Gang
    Signed-off-by: Greg Ungerer

    Greg Ungerer
     
  • There is no reason we cannot use the generic iomap support to give us
    the ioread* and iowrite* family of IO access functions. The m68k arch with
    MMU enabled does, so this makes us consistent for all m68k now.

    Some potentially valid drivers will fail to compile without these,
    for example:

    drivers/i2c/busses/i2c-ocores.c:81:2: error: implicit declaration of
    function ‘iowrite8’ [-Werror=implicit-function-declaration]
    drivers/i2c/busses/i2c-ocores.c:86:2: error: implicit declaration of
    function ‘iowrite16’ [-Werror=implicit-function-declaration]
    drivers/i2c/busses/i2c-ocores.c:91:2: error: implicit declaration of
    function ‘iowrite32’ [-Werror=implicit-function-declaration]
    drivers/i2c/busses/i2c-ocores.c:96:2: error: implicit declaration of
    function ‘ioread8’ [-Werror=implicit-function-declaration]
    drivers/i2c/busses/i2c-ocores.c:101:2: error: implicit declaration of
    function ‘ioread16’ [-Werror=implicit-function-declaration]
    drivers/i2c/busses/i2c-ocores.c:106:2: error: implicit declaration of
    function ‘ioread32’ [-Werror=implicit-function-declaration]

    Signed-off-by: Greg Ungerer

    Greg Ungerer
     
  • When the signal stack frame is created, it must be flushed in order to
    make sure the cache fetches the correct data.
    Without cache flush the icache might pick up old cached data from an older
    signal stack frame if the signal is raised again very fast.
    In case of copyback the data cache muist be pushed first, but is untested.

    Signed-off-by: Alexander Stein
    Signed-off-by: Greg Ungerer

    Alexander Stein
     
  • Some functions that are only called (indirectly) from setup_arch() lack
    __init annotations.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Greg Ungerer

    Geert Uytterhoeven
     

23 Aug, 2013

2 commits

  • Pointers passed to ARAnyM NatFeat calls should be physical addresses,
    not virtual addresses. This worked before because on Atari, physical and
    virtual kernel addresses are the same, as long as normal kernel memory
    is concerned.

    Correct the few remaining places where virtual addresses were used.

    Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     
  • When running a multi-platform kernel on Atari, warning messages like
    the following may be printed:

    WARNING: at /root/linux-3.10.1/init/main.c:698 do_one_initcall+0x12e/0x13a()
    initcall param_sysfs_init+0x0/0x1a4 returned with disabled interrupts

    This is caused by the different definitions of ALLOWINT for Atari and
    other platforms:

    #if defined(MACH_ATARI_ONLY)
    #define ALLOWINT (~0x500)
    #else
    #define ALLOWINT (~0x700)
    #endif

    On Atari, we want to disable the high-frequency HSYNC interrupt:
    - On Atari-only kernels, this is handled completely through ALLOWINT,
    - On multi-platform kernels, this is handled by disabling the HSYNC
    interrupt from the interrupt handler.

    However, as in the latter case arch_irqs_disabled_flags() didn't ignore the
    disabling of the HSYNC interrupt, irqs_disabled() would detect false
    positives.

    Ignore the HSYNC interrupt when running on Atari to fix this.
    For single-platform kernels this test is optimized away by the compiler.

    Reported-by: Thorsten Glaser
    Signed-off-by: Geert Uytterhoeven
    Tested-by: Thorsten Glaser

    Geert Uytterhoeven
     

14 Aug, 2013

3 commits

  • The m68k irqflags implementation needs to check hardirq
    context in some cases.

    As it is a very low level header file, it's better to
    include preempt_mask.h rather than hardirq.h when the
    only purpose is to use irq context APIs. This way we
    can avoid future header circular dependencies when
    vtime.h will expand to use static keys.

    Signed-off-by: Frederic Weisbecker
    Cc: Steven Rostedt
    Cc: Paul E. McKenney
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: Borislav Petkov
    Cc: Li Zhong
    Cc: Mike Galbraith
    Cc: Kevin Hilman
    Cc: Geert Uytterhoeven

    Frederic Weisbecker
     
  • Explicitly truncate the second operand of do_div() to 32 bits to guard
    against bogus code calling it with a 64-bit divisor.

    [Thorsten]

    After upgrading from 3.2 to 3.10, mounting a btrfs volume fails with:

    btrfs: setting nodatacow, compression disabled
    btrfs: enabling auto recovery
    btrfs: disk space caching is enabled
    *** ZERO DIVIDE *** FORMAT=2
    Current process id is 722
    BAD KERNEL TRAP: 00000000
    Modules linked in: evdev mac_hid ext4 crc16 jbd2 mbcache btrfs xor lzo_compress zlib_deflate raid6_pq crc32c libcrc32c
    PC: [] __btrfs_map_block+0x11c/0x119a [btrfs]
    SR: 2000 SP: 30c1fab4 a2: 30f0faf0
    d0: 00000000 d1: 00001000 d2: 00000000 d3: 00000000
    d4: 00010000 d5: 00000000 a0: 3085c72c a1: 3085c72c
    Process mount (pid: 722, task=30f0faf0)
    Frame format=2 instr addr=319535ae
    Stack from 30c1faec:
    00000000 00000020 00000000 00001000 00000000 01401000 30253928 300ffc00
    00a843ac 3026f640 00000000 00010000 0009e250 00d106c0 00011220 00000000
    00001000 301c6830 0009e32a 000000ff 00000009 3085c72c 00000000 00000000
    30c1fd14 00000000 00000020 00000000 30c1fd14 0009e26c 00000020 00000003
    00000000 0009dd8a 300b0b6c 30253928 00a843ac 00001000 00000000 00000000
    0000a008 3194e76a 30253928 00a843ac 00001000 00000000 00000000 00000002
    Call Trace: [] kernel_pg_dir+0x0/0x1000

    [...]

    Code: 222e ff74 2a2e ff5c 2c2e ff60 4c45 1402 ff64 2d41 ff68 2205 4c2e 1800 ff68 4c04 0800 2041 d1c0 2206 4c2e 1400 ff68

    [Geert]

    As diagnosed by Andreas, fs/btrfs/volumes.c:__btrfs_map_block()
    calls

    do_div(stripe_nr, stripe_len);

    with stripe_len u64, while do_div() assumes the divisor is a 32-bit number.

    Due to the lack of truncation in the m68k-specific implementation of
    do_div(), the division is performed using the upper 32-bit word of
    stripe_len, which is zero.

    This was introduced by commit 53b381b3abeb86f12787a6c40fee9b2f71edc23b
    ("Btrfs: RAID5 and RAID6"), which changed the divisor from
    map->stripe_len (struct map_lookup.stripe_len is int) to a 64-bit temporary.

    Reported-by: Thorsten Glaser
    Signed-off-by: Andreas Schwab
    Tested-by: Thorsten Glaser
    Signed-off-by: Geert Uytterhoeven
    Cc: stable@vger.kernel.org

    Andreas Schwab
     
  • As pointed out by Andreas Schwab, pointers passed to ARAnyM NatFeat calls
    should be physical addresses, not virtual addresses.

    Fortunately on Atari, physical and virtual kernel addresses are the same,
    as long as normal kernel memory is concerned, so this usually worked fine
    without conversion.

    But for modules, pointers to literal strings are located in vmalloc()ed
    memory. Depending on the version of ARAnyM, this causes the nf_get_id()
    call to just fail, or worse, crash ARAnyM itself with e.g.

    Gotcha! Illegal memory access. Atari PC = $968c

    This is a big issue for distro kernels, who want to have all drivers as
    loadable modules in an initrd.

    Add a wrapper for nf_get_id() that copies the literal to the stack to
    work around this issue.

    Reported-by: Thorsten Glaser
    Signed-off-by: Geert Uytterhoeven
    Cc: stable@vger.kernel.org

    Geert Uytterhoeven
     

26 Jul, 2013

1 commit

  • We currently enable PCI bridges after scanning a bus and assigning
    resources. This is often done in arch code.

    This patch changes this so we don't enable a bridge until necessary, i.e.,
    until we enable a PCI device behind the bridge. We do this in the generic
    pci_enable_device() path, so this also removes the arch-specific code to
    enable bridges.

    [bhelgaas: changelog]
    Signed-off-by: Yinghai Lu
    Signed-off-by: Bjorn Helgaas

    Yinghai Lu
     

15 Jul, 2013

1 commit


04 Jul, 2013

10 commits

  • Merge first patch-bomb from Andrew Morton:
    - various misc bits
    - I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been
    distracted. There has been quite a bit of activity.
    - About half the MM queue
    - Some backlight bits
    - Various lib/ updates
    - checkpatch updates
    - zillions more little rtc patches
    - ptrace
    - signals
    - exec
    - procfs
    - rapidio
    - nbd
    - aoe
    - pps
    - memstick
    - tools/testing/selftests updates

    * emailed patches from Andrew Morton : (445 commits)
    tools/testing/selftests: don't assume the x bit is set on scripts
    selftests: add .gitignore for kcmp
    selftests: fix clean target in kcmp Makefile
    selftests: add .gitignore for vm
    selftests: add hugetlbfstest
    self-test: fix make clean
    selftests: exit 1 on failure
    kernel/resource.c: remove the unneeded assignment in function __find_resource
    aio: fix wrong comment in aio_complete()
    drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode
    drivers/memstick/host/r592.c: convert to module_pci_driver
    drivers/memstick/host/jmb38x_ms: convert to module_pci_driver
    pps-gpio: add device-tree binding and support
    drivers/pps/clients/pps-gpio.c: convert to module_platform_driver
    drivers/pps/clients/pps-gpio.c: convert to devm_* helpers
    drivers/parport/share.c: use kzalloc
    Documentation/accounting/getdelays.c: avoid strncpy in accounting tool
    aoe: update internal version number to v83
    aoe: update copyright date
    aoe: perform I/O completions in parallel
    ...

    Linus Torvalds
     
  • Pull PCI changes from Bjorn Helgaas:
    "PCI device hotplug
    - Add pci_alloc_dev() interface (Gu Zheng)
    - Add pci_bus_get()/put() for reference counting (Jiang Liu)
    - Fix SR-IOV reference count issues (Jiang Liu)
    - Remove unused acpi_pci_roots list (Jiang Liu)

    MSI
    - Conserve interrupt resources on x86 (Alexander Gordeev)

    AER
    - Force fatal severity when component has been reset (Betty Dall)
    - Reset link below Root Port as well as Downstream Port (Betty Dall)
    - Fix "Firmware first" flag setting (Bjorn Helgaas)
    - Don't parse HEST for non-PCIe devices (Bjorn Helgaas)

    ASPM
    - Warn when we can't disable ASPM as driver requests (Bjorn Helgaas)

    Miscellaneous
    - Add CircuitCo PCI IDs (Darren Hart)
    - Add AMD CZ SATA and SMBus PCI IDs (Shane Huang)
    - Work around Ivytown NTB BAR size issue (Jon Mason)
    - Detect invalid initial BAR values (Kevin Hao)
    - Add pcibios_release_device() (Sebastian Ott)
    - Fix powerpc & sparc PCI_UNKNOWN power state usage (Bjorn Helgaas)"

    * tag 'pci-v3.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (51 commits)
    MAINTAINERS: Add ACPI folks for ACPI-related things under drivers/pci
    PCI: Add CircuitCo vendor ID and subsystem ID
    PCI: Use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)
    PCI: Return early on allocation failures to unindent mainline code
    PCI: Simplify IOV implementation and fix reference count races
    PCI: Drop redundant setting of bus->is_added in virtfn_add_bus()
    unicore32/PCI: Remove redundant call of pci_bus_add_devices()
    m68k/PCI: Remove redundant call of pci_bus_add_devices()
    PCI / ACPI / PM: Use correct power state strings in messages
    PCI: Fix comment typo for pcie_pme_remove()
    PCI: Rename pci_release_bus_bridge_dev() to pci_release_host_bridge_dev()
    PCI: Fix refcount issue in pci_create_root_bus() error recovery path
    ia64/PCI: Clean up pci_scan_root_bus() usage
    PCI/AER: Reset link for devices below Root Port or Downstream Port
    ACPI / APEI: Force fatal AER severity when component has been reset
    PCI/AER: Remove "extern" from function declarations
    PCI/AER: Move AER severity defines to aer.h
    PCI/AER: Set dev->__aer_firmware_first only for matching devices
    PCI/AER: Factor out HEST device type matching
    PCI/AER: Don't parse HEST table for non-PCIe devices
    ...

    Linus Torvalds
     
  • Fix build warning of unused variable:

    arch/m68k/mm/init.c: In function 'mem_init': arch/m68k/mm/init.c:151:6: warning: unused variable 'i' [-Wunused-variable]

    Signed-off-by: Jiang Liu
    Cc: Geert Uytterhoeven
    Cc: Greg Ungerer
    Cc: Thadeu Lima de Souza Cascardo
    Cc: Sergei Shtylyov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     
  • Prepare for killing free_all_bootmem_node() by using free_all_bootmem().

    Signed-off-by: Jiang Liu
    Cc: Geert Uytterhoeven
    Cc: Greg Ungerer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     
  • Prepare for removing num_physpages and simplify mem_init().

    Signed-off-by: Jiang Liu
    Acked-by: Greg Ungerer
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     
  • Concentrate code to modify totalram_pages into the mm core, so the arch
    memory initialized code doesn't need to take care of it. With these
    changes applied, only following functions from mm core modify global
    variable totalram_pages: free_bootmem_late(), free_all_bootmem(),
    free_all_bootmem_node(), adjust_managed_page_count().

    With this patch applied, it will be much more easier for us to keep
    totalram_pages and zone->managed_pages in consistence.

    Signed-off-by: Jiang Liu
    Acked-by: David Howells
    Cc: "H. Peter Anvin"
    Cc: "Michael S. Tsirkin"
    Cc:
    Cc: Arnd Bergmann
    Cc: Catalin Marinas
    Cc: Chris Metcalf
    Cc: Geert Uytterhoeven
    Cc: Ingo Molnar
    Cc: Jeremy Fitzhardinge
    Cc: Jianguo Wu
    Cc: Joonsoo Kim
    Cc: Kamezawa Hiroyuki
    Cc: Konrad Rzeszutek Wilk
    Cc: Marek Szyprowski
    Cc: Mel Gorman
    Cc: Michel Lespinasse
    Cc: Minchan Kim
    Cc: Rik van Riel
    Cc: Rusty Russell
    Cc: Tang Chen
    Cc: Tejun Heo
    Cc: Thomas Gleixner
    Cc: Wen Congyang
    Cc: Will Deacon
    Cc: Yasuaki Ishimatsu
    Cc: Yinghai Lu
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     
  • Address more review comments from last round of code review.
    1) Enhance free_reserved_area() to support poisoning freed memory with
    pattern '0'. This could be used to get rid of poison_init_mem()
    on ARM64.
    2) A previous patch has disabled memory poison for initmem on s390
    by mistake, so restore to the original behavior.
    3) Remove redundant PAGE_ALIGN() when calling free_reserved_area().

    Signed-off-by: Jiang Liu
    Cc: Geert Uytterhoeven
    Cc: "H. Peter Anvin"
    Cc: "Michael S. Tsirkin"
    Cc:
    Cc: Arnd Bergmann
    Cc: Catalin Marinas
    Cc: Chris Metcalf
    Cc: David Howells
    Cc: Ingo Molnar
    Cc: Jeremy Fitzhardinge
    Cc: Jianguo Wu
    Cc: Joonsoo Kim
    Cc: Kamezawa Hiroyuki
    Cc: Konrad Rzeszutek Wilk
    Cc: Marek Szyprowski
    Cc: Mel Gorman
    Cc: Michel Lespinasse
    Cc: Minchan Kim
    Cc: Rik van Riel
    Cc: Rusty Russell
    Cc: Tang Chen
    Cc: Tejun Heo
    Cc: Thomas Gleixner
    Cc: Wen Congyang
    Cc: Will Deacon
    Cc: Yasuaki Ishimatsu
    Cc: Yinghai Lu
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     
  • Change signature of free_reserved_area() according to Russell King's
    suggestion to fix following build warnings:

    arch/arm/mm/init.c: In function 'mem_init':
    arch/arm/mm/init.c:603:2: warning: passing argument 1 of 'free_reserved_area' makes integer from pointer without a cast [enabled by default]
    free_reserved_area(__va(PHYS_PFN_OFFSET), swapper_pg_dir, 0, NULL);
    ^
    In file included from include/linux/mman.h:4:0,
    from arch/arm/mm/init.c:15:
    include/linux/mm.h:1301:22: note: expected 'long unsigned int' but argument is of type 'void *'
    extern unsigned long free_reserved_area(unsigned long start, unsigned long end,

    mm/page_alloc.c: In function 'free_reserved_area':
    >> mm/page_alloc.c:5134:3: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast [enabled by default]
    In file included from arch/mips/include/asm/page.h:49:0,
    from include/linux/mmzone.h:20,
    from include/linux/gfp.h:4,
    from include/linux/mm.h:8,
    from mm/page_alloc.c:18:
    arch/mips/include/asm/io.h:119:29: note: expected 'const volatile void *' but argument is of type 'long unsigned int'
    mm/page_alloc.c: In function 'free_area_init_nodes':
    mm/page_alloc.c:5030:34: warning: array subscript is below array bounds [-Warray-bounds]

    Also address some minor code review comments.

    Signed-off-by: Jiang Liu
    Reported-by: Arnd Bergmann
    Cc: "H. Peter Anvin"
    Cc: "Michael S. Tsirkin"
    Cc:
    Cc: Catalin Marinas
    Cc: Chris Metcalf
    Cc: David Howells
    Cc: Geert Uytterhoeven
    Cc: Ingo Molnar
    Cc: Jeremy Fitzhardinge
    Cc: Jianguo Wu
    Cc: Joonsoo Kim
    Cc: Kamezawa Hiroyuki
    Cc: Konrad Rzeszutek Wilk
    Cc: Marek Szyprowski
    Cc: Mel Gorman
    Cc: Michel Lespinasse
    Cc: Minchan Kim
    Cc: Rik van Riel
    Cc: Rusty Russell
    Cc: Tang Chen
    Cc: Tejun Heo
    Cc: Thomas Gleixner
    Cc: Wen Congyang
    Cc: Will Deacon
    Cc: Yasuaki Ishimatsu
    Cc: Yinghai Lu
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     
  • Pull "exotic" arch fixes from Geert Uytterhoeven:
    "This is a collection of several exotic architecture fixes, and a few
    other fixes for issues that were detected while doing the former"

    * 'exotic-arch-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (35 commits)
    lib: Move fonts from drivers/video/console/ to lib/fonts/
    console/font: Refactor font support code selection logic
    Revert "staging/solo6x10: depend on CONFIG_FONTS"
    input: cros_ec_keyb_clear_keyboard() depends on CONFIG_PM_SLEEP
    score: Wire up asm-generic/xor.h
    score: Remove unneeded
    openrisc: Wire up asm-generic/xor.h
    h8300/boot: Use POSIX "$((..))" instead of bashism "$[...]"
    h8300: Mark H83002 and H83048 CPU support broken
    h8300: Switch h8300 to drivers/Kconfig
    h8300: Limit timer channel ranges in Kconfig
    h8300: Wire up asm-generic/xor.h
    h8300: Fill the system call table using a CALL() macro
    h8300: Fix
    h8300: Hardcode symbol prefixes in asm sources
    h8300: add missing definition for read_barries_depends()
    frv: head.S - Remove commented-out initialization code
    cris: Wire up asm-generic/vga.h
    parport: disable PC-style parallel port support on cris
    console: Disable VGA text console support on cris
    ...

    Linus Torvalds
     
  • Pull m68k updates from Geert Uytterhoeven.

    * 'for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
    m68k/q40: Enable PC parallel port in defconfig
    m68k/q40: Undefine insl/outsl before redefining them
    m68k/uaccess: Fix asm constraints for userspace access
    swim: Release memory region after incorrect return/goto
    m68k/irq: Vector ints need a valid interrupt handler
    m68k/math-emu: unsigned issue, 'unsigned long' will never be less than zero
    m68k: remove CONFIG_EARLY_PRINTK dependency on CONFIG_EMBEDDED, default to n
    m68k/sun3: remove inline marking of EXPORT_SYMBOL functions
    [SCSI] a3000: use module_platform_driver_probe()
    [SCSI] a4000t: use module_platform_driver_probe()
    m68k: Remove inline strcpy() and strcat() implementations

    Linus Torvalds
     

29 Jun, 2013

1 commit


28 Jun, 2013

1 commit

  • Several drivers need font support independent of CONFIG_VT, cfr. commit
    9cbce8d7e1dae0744ca4f68d62aa7de18196b6f4, "console/font: Refactor font
    support code selection logic").
    Hence move the fonts and their support logic from drivers/video/console/ to
    its own library directory lib/fonts/.
    This also allows to limit processing of drivers/video/console/Makefile to
    CONFIG_VT=y again.

    [Kevin Hilman : Update arch/arm/boot/compressed/Makefile]
    Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     

25 Jun, 2013

8 commits

  • Enable the PC parallel port and other related options in the Q40-specific
    and multi-platform defconfigs.

    Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     
  • To use the PC parallel port driver on Q40, we need non-standard versions of
    the insl/outsl accessors. Make sure to undefine them first, to kill this
    compiler warning:

    In file included from drivers/parport/parport_pc.c:67:
    arch/m68k/include/asm/parport.h:14:1: warning: "insl" redefined
    In file included from arch/m68k/include/asm/io.h:4,
    from include/linux/scatterlist.h:10,
    from include/linux/dma-mapping.h:9,
    from drivers/parport/parport_pc.c:54:
    arch/m68k/include/asm/io_mm.h:370:1: warning: this is the location of the previous definition
    In file included from drivers/parport/parport_pc.c:67:
    arch/m68k/include/asm/parport.h:15:1: warning: "outsl" redefined
    In file included from arch/m68k/include/asm/io.h:4,
    from include/linux/scatterlist.h:10,
    from include/linux/dma-mapping.h:9,
    from drivers/parport/parport_pc.c:54:
    arch/m68k/include/asm/io_mm.h:373:1: warning: this is the location of the previous definition

    Reported-by: Thorsten Glaser
    Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     
  • When compiling a MMU kernel with CPU_HAS_ADDRESS_SPACES=n (e.g. "MMU=y
    allnoconfig": "echo CONFIG_MMU=y > allno.config && make KCONFIG_ALLCONFIG=1
    allnoconfig"), we use plain "move" instead of "moves", and I got:

    CC arch/m68k/lib/uaccess.o
    {standard input}: Assembler messages:
    {standard input}:47: Error: operands mismatch -- statement `move.b %a0,(%a1)' ignored

    This happens because plain "move" doesn't support byte transfers between
    memory and address registers, while "moves" does.

    Fix the asm constraints for __generic_copy_from_user(),
    __generic_copy_to_user(), and __clear_user() to only use data registers
    when accessing userspace.

    Also, relax the asm constraints for 16-bit userspace accesses in
    __put_user() and __get_user(), as both "move" and "moves" do support
    such transfers between memory and address registers.

    Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     
  • To get vectored interrupts working we need to switch from the default
    handler handle_bad_irq() to something more sensible. Tested on a MVME177
    board.

    Signed-off-by: Thomas Bogendoerfer
    Signed-off-by: Geert Uytterhoeven

    Thomas Bogendoerfer
     
  • 'oldmant.m32[1]' is 'unsigned long' which can never be '< 0', and the
    original author wanted to check whether the highest bit is set.

    So make the bit test explicit (which is better than casting from 'unsigned
    long' to 'long').

    The related warning: (with EXTRA_CFLAGS=-W ARCH=m68k for allmodconfig)
    arch/m68k/math-emu/fp_arith.c:522:4: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

    Signed-off-by: Chen Gang
    Signed-off-by: Geert Uytterhoeven

    Chen Gang
     
  • Allow CONFIG_EARLY_PRINTK without requiring both CONFIG_EMBEDDED and
    CONFIG_DEBUG. Default to disabled.

    Signed-off-by: Finn Thain
    Signed-off-by: Laurent Vivier
    Signed-off-by: Geert Uytterhoeven

    Finn Thain
     
  • EXPORT_SYMBOL and inline directives are contradictory to each other.
    The patch fixes this inconsistency.

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Denis Efremov
    Signed-off-by: Geert Uytterhoeven

    Denis Efremov
     
  • Gcc may replace calls to standard string functions by open code and/or
    calls to other standard string functions. If the replacement function is
    not available out-of-line, link errors will happen.

    To avoid this, the out-of-line versions were provided by
    arch/m68k/lib/string.c, but they were usually not linked in anymore as
    typically none of its symbols are referenced by built-in code.
    However, if any module would need them, they would not be available.

    Hence remove the inline strcpy() and strcat() implementations, remove
    arch/m68k/lib/string.c, and let the generic string library code handle it.

    Impact on a typical kernel build seems minimal or nonexistent:

    - .text : 0x00001000 - 0x002aac74 (2728 KiB)
    - .data : 0x002ada48 - 0x00392148 ( 914 KiB)
    + .text : 0x00001000 - 0x002aacf4 (2728 KiB)
    + .data : 0x002adac8 - 0x00392148 ( 914 KiB)

    See also commit e00c73ee05dc38ecaccced55d4f5fc58b0b769f7 ("m68k: Remove
    inline strlen() implementation").

    Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     

15 Jun, 2013

1 commit

  • pci_scan_bus() has called pci_bus_add_devices() already, so remove the
    redundant call of pci_bus_add_devices(). subsys_init() callbacks will be
    invoked before device_init() callbacks, so it should be safe to remove the
    redundant calls.

    [bhelgaas: split unicore32 into a separate patch]
    Signed-off-by: Jiang Liu
    Signed-off-by: Bjorn Helgaas
    Acked-by: Greg Ungerer

    Jiang Liu
     

09 Jun, 2013

1 commit