Commit Graph

31046 Commits (0b06e734bff7554c31eac4aad2fc9be4adb7c1c1)

Author SHA1 Message Date
Ingo Molnar 0b06e734bf x86: clean up the APIC_DEST_LOGICAL logic
Impact: cleanup

The bigsmp and es7000 subarchitectures un-defined APIC_DEST_LOGICAL in
a rather nasty way by re-defining it to zero. That is infinitely
fragile and makes it very hard to see what to code really does in
a given context. The very same constant has different meanings and
values - depending on which subarch is enabled.

Untangle this mess by never undefining the constant, but instead
propagating the right values into the genapic driver templates.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:18 +01:00
Ingo Molnar 08125d3eda x86: rename ->ESR_DISABLE to ->disable_esr
the ->ESR_DISABLE shouting variant was used to enable the esr_disable
macro wrappers. Those ugly macros are removed now so we can rename
->ESR_DISABLE to ->disable_esr

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:18 +01:00
Ingo Molnar f6f52baf26 x86: clean up esr_disable() methods
Impact: cleanup

Most subarchitectures want to disable the APIC ESR (Error Status Register),
because they generally have hardware hacks that wrap standard CPUs into
a bigger system and hence the APIC bus is quite non-standard and weirdnesses
(lockups) have been seen with ESR reporting.

Remove the esr_disable macros and put the desired flag into each
subarchitecture's genapic template directly.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:17 +01:00
Ingo Molnar fe402e1f2b x86, apic: clean up / remove TARGET_CPUS
Impact: cleanup

use apic->target_cpus() directly instead of the TARGET_CPUS wrapper.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:17 +01:00
Ingo Molnar 0a9cc20b9c x86, apic: clean up target_cpus methods
Impact: cleanup

Clean up all the target_cpus() namespace overlap that exists
between bigsmp, es7000, mach-default, numaq and summit - by
separating the different functions into different names.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:17 +01:00
Ingo Molnar 7fe732862d x86, apic: remove IRQ_DEST_MODE
Remove leftover definition.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:16 +01:00
Ingo Molnar 38bd77a6c3 x86, apic: remove ES7000_IRQ_DELIVERY_MODE and ES7000_IRQ_DEST_MODE
Impact: cleanup

They were only used in a single place and obscured the apic_es7000
driver template.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:16 +01:00
Ingo Molnar d8a3539e64 x86, apic: remove BIGSMP_IRQ_DELIVERY_MODE and BIGSMP_IRQ_DEST_MODE
Impact: cleanup

They were only used in a single place and obscured the apic_bigsmp
driver template.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:15 +01:00
Ingo Molnar 1b1bcb3ff4 x86, apic: remove NUMAQ_IRQ_DELIVERY_MODE and NUMAQ_IRQ_DEST_MODE
Impact: cleanup

They were only used in a single place and obscured the apic_numaq template.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:15 +01:00
Ingo Molnar 82daea6b08 x86, apic: remove SUMMIT_IRQ_DELIVERY_MODE and SUMMIT_IRQ_DEST_MODE
Impact: cleanup

They were only used in a single place and obscured the apic_summit template.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:14 +01:00
Ingo Molnar dcafa4a8c9 x86, apic: remove DEFAULT_IRQ_DELIVERY_MODE and DEFAULT_IRQ_DEST_MODE
Impact: cleanup

They were only used in a single place and obscured the apic_default template.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:14 +01:00
Ingo Molnar 9b5bc8dc12 x86, apic: remove IRQ_DEST_MODE / IRQ_DELIVERY_MODE
Remove the wrapper macros IRQ_DEST_MODE and IRQ_DELIVERY_MODE.

The typical 32-bit and the 64-bit build all dereference via the genapic,
so it's pointless to hide that indirection via these ugly macros.

Furthermore, it also obscures subarchitecture details.

So replace it with apic->irq_dest_mode / etc. accesses.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:13 +01:00
Ingo Molnar f8987a1093 x86, genapic: rename int_delivery_mode, et. al.
int_delivery_mode is supposed to mean 'interrupt delivery mode', but
it's quite a misnomer as 'int' we usually think of as an integer type ...

The standard naming for such attributes is 'irq' - so rename the following
fields and macros:

 int_delivery_mode => irq_delivery_mode
 INT_DELIVERY_MODE => IRQ_DELIVERY_MODE
 int_dest_mode     => irq_dest_mode
 INT_DEST_MODE     => IRQ_DEST_MODE

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:13 +01:00
Ingo Molnar 7ed248daa5 x86: clean up apic->apic_id_registered() methods
Impact: cleanup

x86 subarchitectures each defined a "apic_id_registered()" method,
which could be an inline function depending on which subarch we build
for, and which was also the name of a genapic field.

Untangle this namespace spaghetti by giving each of the instances
a separate name.

Also remove wrapper macro obfuscation.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:12 +01:00
Ingo Molnar 306db03b0d x86: clean up apic->acpi_madt_oem_check methods
Impact: refactor code

x86 subarchitectures each defined a "acpi_madt_oem_check()" method,
which could be an inline function, or an extern, or a static function,
and which was also the name of a genapic field.

Untangle this namespace spaghetti by setting ->acpi_madt_oem_check()
to NULL on those subarchitectures that have no detection quirks,
and rename the other ones (summit, es7000) that do.

Also change default_acpi_madt_oem_check() to handle NULL entries,
and clean its control flow up as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:12 +01:00
Ingo Molnar 9a6801da55 x86: remove APIC_INIT / APICFUNC / IPIFUNC
The APIC_INIT() / APICFUNC / IPIFUNC macros were ugly and obfuscated
the true identity of various APIC driver methods.

Now that they are not used anymore, remove them.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:11 +01:00
Ingo Molnar 491a50c4fb x86, genapic: cleanup 32-bit apic_summit template
Clean up the APIC driver template:

 - order fields properly
 - use the macro names explicitly (so that they can be renamed later)
 - fill in NULL entries as well

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:11 +01:00
Ingo Molnar fed53ebf3c x86, genapic: cleanup 32-bit apic_es7000 template
Clean up the APIC driver template:

 - order fields properly
 - use the macro names explicitly (so that they can be renamed later)
 - fill in NULL entries as well

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:11 +01:00
Ingo Molnar fea3437adf x86, genapic: cleanup 32-bit apic_numaq template
Clean up the APIC driver template:

 - order fields properly
 - use the macro names explicitly (so that they can be renamed later)
 - fill in NULL entries as well

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:10 +01:00
Ingo Molnar d26b6d6660 x86, genapic: cleanup 32-bit apic_bigsmp template
Clean up the APIC driver template:

 - order fields properly
 - use the macro names explicitly (so that they can be renamed later)
 - fill in NULL entries as well

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:10 +01:00
Ingo Molnar 0a7e8c6414 x86, genapic: cleanup 32-bit apic_default template
Clean up the APIC driver template:

 - order fields properly
 - use the macro names explicitly (so that they can be renamed later)
 - fill in NULL entries as well

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:09 +01:00
Ingo Molnar 504a3c3ad4 x86: clean up apic_x2apic_cluster
- reorder fields so that they appear in struct genapic field ordering

- add zero-initialized fields too so that it's apparent which functionality
  is default / missing.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:09 +01:00
Ingo Molnar 05c155c235 x86: clean up apic_x2apic_phys
- reorder fields so that they appear in struct genapic field ordering

- add zero-initialized fields too so that it's apparent which functionality
  is default / missing.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:08 +01:00
Ingo Molnar c796732991 x86: clean up apic_x2apic_uv_x
- reorder fields so that they appear in struct genapic field ordering

- add zero-initialized fields too so that it's apparent which functionality
  is default / missing.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:08 +01:00
Ingo Molnar 4c3e51e05a x86: clean up genapic_phys_flat
- reorder fields so that they appear in struct genapic field ordering

- add zero-initialized fields too so that it's apparent which functionality
  is default / missing.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:07 +01:00
Ingo Molnar f2f05ee8b8 x86: clean up genapic_flat
- reorder fields so that they appear in struct genapic field ordering

- add zero-initialized fields too so that it's apparent which functionality
  is default / missing.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:07 +01:00
Ingo Molnar c8d46cf06d x86: rename 'genapic' to 'apic'
Rename genapic-> to apic-> references because in a future chagne we'll
open-code all the indirect calls (instead of obscuring them via macros),
so we want this reference to be as short as possible.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:06 +01:00
Ingo Molnar 6781d948cc x86, genapic: provide IPI callbacks unconditionally
64-bit x86 uses the IPI callbacks even on UP - so provide them
generally.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:06 +01:00
Ingo Molnar 505deeb1a2 x86, genapic: cleanups
Unify genapic.h some more.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:05 +01:00
Ingo Molnar ced733ec0b x86, genapic: finish unification
Unify remaining bits of genapic_32/64.h.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:05 +01:00
Ingo Molnar ef7471b13f x86, genapic: unify struct genapic
Move over the (now identical) struct genapic definitions from
genapic_32/64.h to genapic.h.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:04 +01:00
Ingo Molnar 943d0f74d4 x86, genapic: refactor genapic_32.h
Impact: pre unification cleanup

Make genapic_32.h similar to genapic_64.h: reorder fields, unify types
and bring in new entries.

No existing functionality is affected.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:04 +01:00
Ingo Molnar 6e7a59944a x86, genapic: refactor genapic_64.h
Impact: pre unification cleanup

Make genapic_64.h similar to genapic_32.h: reorder fields, unify types
and bring in new entries.

No existing functionality is affected.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28 23:20:03 +01:00
Ingo Molnar 74b6eb6b93 Merge branches 'x86/asm', 'x86/cleanups', 'x86/cpudetect', 'x86/debug', 'x86/doc', 'x86/header-fixes', 'x86/mm', 'x86/paravirt', 'x86/pat', 'x86/setup-v2', 'x86/subarch', 'x86/uaccess' and 'x86/urgent' into x86/core 2009-01-28 23:13:53 +01:00
Ingo Molnar 6a385db5ce Merge branch 'core/percpu' into x86/core
Conflicts:
	kernel/irq/handle.c
2009-01-28 23:12:55 +01:00
Linus Torvalds c4568d6c7e Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/mm: Fix handling of _PAGE_COHERENT in BAT setup code
  powerpc/pseries: Correct VIO bus accounting problem in CMO env.
  powerpc: More printing warning fixes for the l64 to ll64 conversion
  powerpc: Remove arch/ppc cruft from Kconfig
  powerpc: Printing fix for l64 to ll64 conversion: phyp_dump.c
  powerpc/embedded6xx: Update defconfigs
  powerpc/8xx: Update defconfigs
  powerpc/86xx: Update defconfigs
  powerpc/83xx: Update defconfigs
  powerpc/85xx: Update defconfigs
  powerpc/mpc8313erdb: fix kernel panic because mdio device is not probed
  powerpc/4xx: Update multi-board PowerPC 4xx defconfigs
  powerpc/44x: Update PowerPC 44x defconfigs
  powerpc/40x: Update PowerPC 40x defconfigs
  powerpc/85xx: Fix typo in mpc8572ds dts
  powerpc/44x: Warp patches for the new NDFC driver
  powerpc/4xx: DTS: Add Add'l SDRAM0 Compatible and Interrupt Info
2009-01-28 09:01:42 -08:00
Linus Torvalds 78a768b6ca Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68knommu: fix 5329 ColdFire periphal addressing
  uclinux: add process name to allocation error message
  m68knommu: correct the mii calculations for 532x ColdFire FEC
  m68knommu: add ColdFire M532x to the FEC configuration options
  m68knommu: fix syscall restarting
  m68knommu: remove the obsolete and long unused comempci chip support
  m68knommu: remove the no longer used PCI support option
  m68knommu: remove obsolete and unused eLIA board
  m68knommu: set NO_DMA
  m68knommu: fix cache flushing for the 527x ColdFire processors
  m68knommu: fix ColdFire 5272 serial baud rates in mcf.c
  m68knommu: use one exist from execption
2009-01-28 08:41:57 -08:00
Gerhard Pircher 4c456a67f5 powerpc/mm: Fix handling of _PAGE_COHERENT in BAT setup code
_PAGE_COHERENT is now always set in _PAGE_RAM resp. PAGE_KERNEL.
Thus it has to be masked out, if the BAT mapping should be non
cacheable or CPU_FTR_NEED_COHERENT is not set.

This will work on normal SMP setups because we force-set
CPU_FTR_NEED_COHERENT as part of CPU_FTR_COMMON on SMP.

Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-01-28 17:15:52 +11:00
Robert Jennings 69b052e828 powerpc/pseries: Correct VIO bus accounting problem in CMO env.
In the VIO bus code the wrappers for dma alloc_coherent and free_coherent
calls are rounding to IOMMU_PAGE_SIZE.  Taking a look at the underlying
calls, the actual mapping is promoted to PAGE_SIZE.  Changing the
rounding in these two functions fixes under-reporting the entitlement
used by the system.  Without this change, the system could run out of
entitlement before it believes it has and incur mapping failures at the
firmware level.

Also in the VIO bus code, the wrapper for dma map_sg is not exiting in
an error path where it should.  Rather than fall through to code for the
success case, this patch adds the return that is needed in the error path.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-01-28 17:15:52 +11:00
Josh Boyer 52c275fe70 powerpc: Remove arch/ppc cruft from Kconfig
Remove some leftover cruft from the arch/ppc days

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-01-28 17:15:51 +11:00
Stephen Rothwell 802bdea875 powerpc: Printing fix for l64 to ll64 conversion: phyp_dump.c
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-01-28 17:15:51 +11:00
Benjamin Herrenschmidt 6469c92e0a Merge commit 'jwb/jwb-merge' into merge
Manual merge of:
	arch/powerpc/configs/44x/warp_defconfig
2009-01-28 17:15:34 +11:00
Benjamin Herrenschmidt 0411648e44 Merge commit 'kumar/kumar-merge' into merge 2009-01-28 17:14:54 +11:00
Linus Torvalds e4a7ca2903 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (36 commits)
  USB: Driver for Freescale QUICC Engine USB Host Controller
  USB: option: add QUANTA HSDPA Data Card device ids
  USB: storage: Add another unusual_dev for off-by-one bug
  USB: unusual_dev: usb-storage needs to ignore a device
  USB: GADGET: fix !x & y
  USB: new id for ti_usb_3410_5052 driver
  USB: cdc-acm: Add another conexant modem to the quirks
  USB: 'option' driver - onda device MT503HS has wrong id
  USB: Remove ZTE modem from unusual_devices
  USB: storage: support of Dane-Elec MediaTouch USB device
  USB: usbmon: Implement compat_ioctl
  USB: add kernel-doc for wusb_dev in struct usb_device
  USB: ftdi_sio driver support of bar code scanner from Diebold
  USB: ftdi_sio: added Alti-2 VID and Neptune 3 PID
  USB: cp2101 device
  USB: usblp.c: add USBLP_QUIRK_BIDIR to Brother HL-1440
  USB: remove vernier labpro from ldusb
  USB: CDC-ACM quirk for MTK GPS
  USB: cdc-acm: support some gps data loggers
  USB: composite: Fix bug: low byte of w_index is the usb interface number not the whole 2 bytes of w_index
  ...
2009-01-27 16:08:04 -08:00
David Brownell 37daa925cf USB: musb_hdrc: another davinci buildfix (otg related)
The DaVinci code had an implementation of the OTG transceiver glue
too; make it use the new-standard one.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:32 -08:00
Peter Zijlstra 8f6d86dc41 x86: cpu_init(): remove ugly #ifdef construct around debug register clear
Impact: Cleanup

While I was looking through the new and improved bootstrap code - great
work that, thanks! I found the below a slight improvement.

Remove unnecessary ugly #ifdef construct around debug register clear.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2009-01-27 14:54:44 -08:00
Andreas Schwab 042cbaf88a x86 setup: fix asm constraints in vesa_store_edid
Impact: fix potential miscompile (currently believed non-manifest)

As the comment explains, the VBE DDC call can clobber any register.
Tell the compiler about that fact.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2009-01-27 14:48:46 -08:00
Linus Torvalds 8c022fdd5f Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  pata-rb532-cf: remove set_irq_type from finish_io
  [libata] pata_via: support VX855, future chips whose IDE controller use 0x0571
  sata_mv: no longer experimental (v2)
  sata_mv: msi masking fix (v2)
  sata_mv: Properly initialize main irq mask
  sata_mv: remove bogus nsect restriction
  sata_mv: don't read hc_irq_cause
  sata_mv: fix 8-port timeouts on 508x/6081 chips
  sata_nv: fix MCP5x reset
  sata_nv: rename nv_nf2_hardreset()
  libata: set NODEV_HINT for 0x7f status
  libata-sff: fix incorrect EH message
2009-01-27 07:47:22 -08:00
Ingo Molnar 4369f1fb7c Merge branch 'tj-percpu' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into core/percpu
Conflicts:
	arch/x86/kernel/setup_percpu.c

Semantic conflict:

	arch/x86/kernel/cpu/common.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-27 12:03:24 +01:00
Ingo Molnar 3ddeb51d9c Merge branch 'linus' into core/percpu
Conflicts:
	arch/x86/kernel/setup_percpu.c
2009-01-27 12:01:51 +01:00