gmskframesync|debug: only saving frame symbols

--- src/framing/src/gmskframesync.c
+++ src/framing/src/gmskframesync.c
@@ -265,7 +265,14 @@
         unsigned int j;
         for (j=0; j<num_written; j++) {
 #if DEBUG_GMSKFRAMESYNC
-            windowf_push(_q->debug_framesyms, buffer[j]);
+            switch (_q->state) {
+            case GMSKFRAMESYNC_STATE_SEEKPN:
+                break;
+            case GMSKFRAMESYNC_STATE_RXHEADER:
+            case GMSKFRAMESYNC_STATE_RXPAYLOAD:
+                windowf_push(_q->debug_framesyms, buffer[j]);
+                break;
+            }
 #endif
             switch (_q->state) {
             case GMSKFRAMESYNC_STATE_SEEKPN:


Added several comments and correct formatting.

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@5106 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- recognition/include/pcl/recognition/hv/hypotheses_verification.h
+++ recognition/include/pcl/recognition/hv/hypotheses_verification.h
@@ -44,98 +44,145 @@
 namespace pcl
 {

-/**
- * \brief Abstract class for hypotheses verification methods
- * \author Aitor Aldoma, Federico Tombari
- */
-
-template<typename ModelT, typename SceneT>
-class PCL_EXPORTS HypothesesVerification
-{
-
-protected:
-  std::vector<bool> mask_;
-  typename pcl::PointCloud<SceneT>::Ptr scene_cloud_;
-  typename std::vector<typename pcl::PointCloud<ModelT>::Ptr> models_;
-  int zbuffer_scene_resolution_;
-  int zbuffer_self_occlusion_resolution_;
-
-public:
-
-  HypothesesVerification() {
-    zbuffer_scene_resolution_ = 100;
-    zbuffer_self_occlusion_resolution_ = 150;
-  }
-  /*
-   *  \brief Returns a vector of booleans representing which hypotheses have been accepted/rejected (true/false)
-   *  mask vector of booleans
+  /**
+   * \brief Abstract class for hypotheses verification methods
+   * \author Aitor Aldoma, Federico Tombari
    */

-  void
-  getMask (std::vector<bool> & mask)
+  template<typename ModelT, typename SceneT>
+  class PCL_EXPORTS HypothesesVerification
   {
-    mask = mask_;
-  }

-  /*
-   *  \brief Sets the models (recognition hypotheses) - requires the scene_cloud_ to be set first if reasoning about occlusions
-   *  mask models Vector of point clouds representing the models (in same coordinates as the scene_cloud_)
-   */
-  void
-  addModels (std::vector<const typename pcl::PointCloud<ModelT>::Ptr> & models, bool occlusion_reasoning=false)
-  {
-    if(!occlusion_reasoning)
-      models_ = models;
-    else {
-      //we need to reason about occlusions before setting the model
-      if(scene_cloud_ == 0) {
-        PCL_ERROR("setSceneCloud should be called before adding the model if reasoning about occlusions...");
-      }
+  protected:
+    /*
+     * \brief Boolean vector indicating if a hypothesis is accepted/rejected
+     */
+    std::vector<bool> mask_;
+    /*
+     * \brief Scene point cloud
+     */
+    typename pcl::PointCloud<SceneT>::Ptr scene_cloud_;
+    /*
+     * \brief Vector of point clouds representing the 3D models after reasoning about occlusions (in same coordinates as the scene cloud)
+     */
+    typename std::vector<typename pcl::PointCloud<ModelT>::Ptr> visible_models_;
+    /*
+     * \brief Vector of point clouds representing the complete 3D model (in same coordinates as the scene cloud)
+     */
+    typename std::vector<typename pcl::PointCloud<ModelT>::Ptr> complete_models_;
+    /*
+     * \brief Resolutions in pixel for the depth scene buffer
+     */
+    int zbuffer_scene_resolution_;
+    /*
+     * \brief Resolutions in pixel for the depth model self-occlusion buffer
+     */
+    int zbuffer_self_occlusion_resolution_;
+    /*
+     * \brief The resolution of models and scene used to verify hypotheses (in meters)
+     */
+    float resolution_;

-      pcl::ZBuffering<ModelT, SceneT> zbuffer_scene(zbuffer_scene_resolution_,zbuffer_scene_resolution_,1.f);
-      if(!scene_cloud_->isOrganized()) {
-        zbuffer_scene.computeDepthMap(scene_cloud_,true);
-      }
+  public:

-      for(size_t i=0; i < models.size(); i++) {
+    HypothesesVerification ()
+    {
+      zbuffer_scene_resolution_ = 100;
+      zbuffer_self_occlusion_resolution_ = 150;
+      resolution_ = 0.005;
+    }
+    /*
+     *  \brief Returns a vector of booleans representing which hypotheses have been accepted/rejected (true/false)
+     *  mask vector of booleans
+     */

-        //self-occlusions
-        typename pcl::PointCloud<ModelT>::Ptr filtered (new pcl::PointCloud<ModelT> ());
-        typename pcl::ZBuffering<ModelT, SceneT> zbuffer_self_occlusion(150,150,1.f);
-        zbuffer_self_occlusion.computeDepthMap(models[i],true);
-        zbuffer_self_occlusion.filter(models[i],filtered,0.005);
+    void
+    getMask (std::vector<bool> & mask)
+    {
+      mask = mask_;
+    }

-        //scene-occlusions
-        if(scene_cloud_->isOrganized()) {
-          filtered = pcl::occlusion_reasoning::filter (scene_cloud_, filtered, 525.f, 0.01f);
-        } else {
-          zbuffer_scene.filter(filtered,filtered,0.01);
+    /*
+     *  \brief Sets the 3D complete models. NOTE: If addModels is called with occlusion_reasoning=true, then
+     *  there is no need to call this function.
+     *  mask models Vector of point clouds representing the models (in same coordinates as the scene_cloud_)
+     */
+
+    void
+    addCompleteModels (std::vector<const typename pcl::PointCloud<ModelT>::Ptr> & complete_models)
+    {
+      complete_models_ = complete_models;
+    }
+
+    /*
+     *  \brief Sets the models (recognition hypotheses) - requires the scene_cloud_ to be set first if reasoning about occlusions
+     *  mask models Vector of point clouds representing the models (in same coordinates as the scene_cloud_)
+     */
+    void
+    addModels (std::vector<const typename pcl::PointCloud<ModelT>::Ptr> & models, bool occlusion_reasoning = false)
+    {
+      if (!occlusion_reasoning)
+        visible_models_ = models;
+      else
+      {
+        //we need to reason about occlusions before setting the model
+        if (scene_cloud_ == 0)
+        {
+          PCL_ERROR("setSceneCloud should be called before adding the model if reasoning about occlusions...");
         }

-        models_.push_back(filtered);
+        pcl::ZBuffering<ModelT, SceneT> zbuffer_scene (zbuffer_scene_resolution_, zbuffer_scene_resolution_, 1.f);
+        if (!scene_cloud_->isOrganized ())
+        {
+          zbuffer_scene.computeDepthMap (scene_cloud_, true);
+        }
+
+        for (size_t i = 0; i < models.size (); i++)
+        {
+
+          //self-occlusions
+          typename pcl::PointCloud<ModelT>::Ptr filtered (new pcl::PointCloud<ModelT> ());
+          typename pcl::ZBuffering<ModelT, SceneT> zbuffer_self_occlusion (150, 150, 1.f);
+          zbuffer_self_occlusion.computeDepthMap (models[i], true);
+          zbuffer_self_occlusion.filter (models[i], filtered, 0.005);
+
+          //scene-occlusions
+          if (scene_cloud_->isOrganized ())
+          {
+            filtered = pcl::occlusion_reasoning::filter (scene_cloud_, filtered, 525.f, 0.01f);
+          }
+          else
+          {
+            zbuffer_scene.filter (filtered, filtered, 0.01);
+          }
+
+          visible_models_.push_back (filtered);
+        }
+
+        complete_models_ = models;
       }
     }
-  }

-  /*
-   *  \brief Sets the scene cloud
-   *  scene_cloud Point cloud representing the scene
-   */
+    /*
+     *  \brief Sets the scene cloud
+     *  scene_cloud Point cloud representing the scene
+     */

-  void
-  setSceneCloud (const typename pcl::PointCloud<SceneT>::Ptr & scene_cloud)
-  {
-    scene_cloud_ = scene_cloud;
-  }
+    void
+    setSceneCloud (const typename pcl::PointCloud<SceneT>::Ptr & scene_cloud)
+    {
+      scene_cloud_ = scene_cloud;
+    }

-  /*
-   *  \brief Function that performs the hypotheses verification, needs to be implemented in the subclasses
-   *  This function modifies the values of mask_ and needs to be called after both scene and model have been added
-   */
+    /*
+     *  \brief Function that performs the hypotheses verification, needs to be implemented in the subclasses
+     *  This function modifies the values of mask_ and needs to be called after both scene and model have been added
+     */

-  virtual void verify ()=0;
+    virtual void
+    verify ()=0;

-};
+  };

 }


fix gzip quantity: "q=0." and "q=1." are valid values according to RFC

--- src/http/ngx_http_core_module.c
+++ src/http/ngx_http_core_module.c
@@ -2309,7 +2309,7 @@
         return 0;
     }

-    if (q > 100 || n == 0 || n > 3) {
+    if (q > 100 || n > 3) {
         return 0;
     }


fix typo introduced in r3985

fix typo introduced in r3985

--- src/http/ngx_http_core_module.c
+++ src/http/ngx_http_core_module.c
@@ -3482,7 +3482,7 @@
                               prev->keepalive_header, 0);
     ngx_conf_merge_uint_value(conf->keepalive_requests,
                               prev->keepalive_requests, 100);
-    ngx_conf_merge_msec_value(conf->lingering_close,
+    ngx_conf_merge_uint_value(conf->lingering_close,
                               prev->lingering_close, NGX_HTTP_LINGERING_ON);
     ngx_conf_merge_msec_value(conf->lingering_time,
                               prev->lingering_time, 30000);


MotionPlanner: Cosmetic change.

MotionPlanner: Cosmetic change.

--- aprinter/printer/MotionPlanner.h
+++ aprinter/printer/MotionPlanner.h
@@ -575,9 +575,8 @@
                 t1.m_bits.m_int += t2.bitsValue();
             }

-            bool gen1 = true;
-            if (x1.bitsValue() == 0 && (x0.bitsValue() != 0 || x2.bitsValue() != 0)) {
-                gen1 = false;
+            bool skip1 = (x1.bitsValue() == 0 && (x0.bitsValue() != 0 || x2.bitsValue() != 0));
+            if (skip1) {
                 if (x0.bitsValue() != 0) {
                     t0.m_bits.m_int += t1.bitsValue();
                 } else {
@@ -589,7 +588,7 @@
             if (x0.bitsValue() != 0) {
                 TheCommon::gen_stepper_command(c, dir, x0, t0, FixedMin(x0, StepperAccelFixedType::importFpSaturatedRound(entry->axes.half_accel[AxisIndex] * t0_squared)));
             }
-            if (gen1) {
+            if (!skip1) {
                 TheCommon::gen_stepper_command(c, dir, x1, t1, StepperAccelFixedType::importBits(0));
             }
             if (x2.bitsValue() != 0) {


msm: msm_rq_stats: remove is_smp() API

msm: msm_rq_stats: remove is_smp() API

is_smp() API is unavailable on few target codes.
Until this API is defined use CONFIG_SMP to know
whether target supports SPM are not.

CRs-fixed: 579034
Change-Id: I5bd5c208b18aae27d7f36e77e9d5b38639c2c00e
Signed-off-by: Murali Nalajala <6550883a1a6727083a7f532b897352c430bfbacf@codeaurora.org>

--- arch/arm/mach-msm/msm_rq_stats.c
+++ arch/arm/mach-msm/msm_rq_stats.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -355,11 +355,12 @@
 	int ret;
 	int i;
 	struct cpufreq_policy cpu_policy;
+
+#ifndef CONFIG_SMP
 	/* Bail out if this is not an SMP Target */
-	if (!is_smp()) {
-		rq_info.init = 0;
-		return -ENOSYS;
-	}
+	rq_info.init = 0;
+	return -ENOSYS;
+#endif

 	rq_wq = create_singlethread_workqueue("rq_stats");
 	BUG_ON(!rq_wq);
@@ -395,11 +396,11 @@

 static int __init msm_rq_stats_early_init(void)
 {
+#ifndef CONFIG_SMP
 	/* Bail out if this is not an SMP Target */
-	if (!is_smp()) {
-		rq_info.init = 0;
-		return -ENOSYS;
-	}
+	rq_info.init = 0;
+	return -ENOSYS;
+#endif

 	pm_notifier(system_suspend_handler, 0);
 	return 0;


OMAP2+: hwmod: Enable module in shutdown to access sysconfig

When calling the shutdown, the module may be already in idle.
Accessing the sysconfig register will then lead to a crash.
In that case, re-enable the module in order to allow the access
to the sysconfig register.

Signed-off-by: Miguel Vadillo <4855e10423babd24348e90764fb05fdf6eb3acfd@ti.com>
Signed-off-by: Benoit Cousson <1f57ac750b0b4fd69f24c35d4e23093b91dc3e77@ti.com>
Signed-off-by: Paul Walmsley <a027184a55211cd23e3f3094f1fdc728df5e0500@pwsan.com>

--- arch/arm/mach-omap2/omap_hwmod.c
+++ arch/arm/mach-omap2/omap_hwmod.c
@@ -1396,8 +1396,11 @@
 		}
 	}

-	if (oh->class->sysc)
+	if (oh->class->sysc) {
+		if (oh->_state == _HWMOD_STATE_IDLE)
+			_enable(oh);
 		_shutdown_sysc(oh);
+	}

 	/*
 	 * If an IP contains only one HW reset line, then assert it


We only dispatch non empty buffers

We only dispatch non empty buffers

--- src/impls/atrshmlogimpl_flush.c
+++ src/impls/atrshmlogimpl_flush.c
@@ -36,7 +36,7 @@
     {
       atrshmlog_tbuff_t* t = g->atrshmlog_targetbuffer_arr[i];

-      if(t)
+      if(t && t->size > 0)
 	{
 	  t->number_dispatched = g->number_dispatched++;  // we have a new highest here


avr32/uaccess: fix sparse errors

avr32/uaccess: fix sparse errors

virtio wants to read bitwise types from userspace using get_user.  At the
moment this triggers sparse errors, since the value is passed through an
integer.

Fix that up using __force.

Signed-off-by: Michael S. Tsirkin <255103e50249e3d658441816e0597170ebfc16ef@redhat.com>
Acked-by: Hans-Christian Egtvedt <11ce19a6fc3bb47abce595a29a6ea4cfed5efa4c@samfundet.no>

--- arch/avr32/include/asm/uaccess.h
+++ arch/avr32/include/asm/uaccess.h
@@ -191,7 +191,7 @@
 	default: __gu_err = __get_user_bad(); break;			\
 	}								\
 									\
-	x = (typeof(*(ptr)))__gu_val;					\
+	x = (__force typeof(*(ptr)))__gu_val;				\
 	__gu_err;							\
 })

@@ -222,7 +222,7 @@
 	} else {							\
 		__gu_err = -EFAULT;					\
 	}								\
-	x = (typeof(*(ptr)))__gu_val;					\
+	x = (__force typeof(*(ptr)))__gu_val;				\
 	__gu_err;							\
 })


Update comment to reflect commit 1d41739e5a04b0e93304d24d864b6bfa3efc45f2.

Peter Geoghegan

--- src/include/utils/sortsupport.h
+++ src/include/utils/sortsupport.h
@@ -20,8 +20,8 @@
  * multiple acceleration mechanisms to be supported, but no opclass is
  * required to provide all of them.  The BTSORTSUPPORT function should
  * simply not set any function pointers for mechanisms it doesn't support.
- * (However, all opclasses that provide BTSORTSUPPORT are required to provide
- * the comparator function.)
+ * Opclasses that provide BTSORTSUPPORT and don't provide a comparator
+ * function will have a shim set up by sort support automatically.
  *
  * All sort support functions will be passed the address of the
  * SortSupportData struct when called, so they can use it to store


Blackfin: dpmc.h: pull in new pll.h

Blackfin: dpmc.h: pull in new pll.h

Any consumer of dpmc.h expects to use VR_CTL, so also pull in the new
mach/pll.h header for those functions.

Signed-off-by: Mike Frysinger <8f3f75c74bd5184edcfa6534cab3c13a00a2f794@gentoo.org>

--- arch/blackfin/include/asm/dpmc.h
+++ arch/blackfin/include/asm/dpmc.h
@@ -8,6 +8,8 @@

 #ifndef _BLACKFIN_DPMC_H_
 #define _BLACKFIN_DPMC_H_
+
+#include <mach/pll.h>

 /* PLL_CTL Masks */
 #define DF			0x0001	/* 0: PLL = CLKIN, 1: PLL = CLKIN/2 */


indexer: Fixed assert-crash when number of indexed messages was divisible by 100.

--- src/indexer/master-connection.c
+++ src/indexer/master-connection.c
@@ -87,9 +87,7 @@
 		mail_precache(mail);
 		if (++counter % 100 == 0) {
 			percentage = counter*100 / max;
-			if (percentage != percentage_sent) {
-				i_assert(percentage < 100);
-
+			if (percentage != percentage_sent && percentage < 100) {
 				percentage_sent = percentage;
 				i_snprintf(percentage_str,
 					   sizeof(percentage_str), "%u\n",


MIPS: Fix sign-extension bug in 32-bit kernel on 32-bit hardware.

Probably nobody does arithmetic on cp0 register values so this has never
bitten.

Signed-off-by: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org>


powerpc/pci: Reserve legacy regions on PCI

There's a problem on some embedded platforms when we re-assign
everything on PCI, such as 44x. The generic code tries to avoid
assigning devices to addresses overlapping the low legacy
addresses such as VGA hard decoded areas using constants that
are unfortunately no good for us, as they don't take into account
the address translation we do to access PCI busses.

Thus we end up allocating things like IO BARs to 0, which is
technically legal, but will shadow hard decoded ports for use
by things like VGA cards.

This works around it by attempting to reserve legacy regions
before we try to assign addresses.

NOTE: This may have nasty side effects in cases I haven't tested
yet:

 - We try to use FW mappings (ie. powermac) and the FW has allocated
a conflicting address over those legacy regions. This will typically
happen. I would expect the new code to just fail with an informative
message without harm but I haven't had a chance to test that scenario
yet.

 - A device with fixed BARs overlapping those legacy addresses such
as an IDE controller in legacy mode is in the system. I don't know
for sure yet what will happen there, I have to test :-)

Ideally, we should change PCIBIOS_MIN_IO/MIN_MEM accross the board
to take a bus pointer so they can provide appropriate per-bus translated
values to the generic code but that's a more invasive patch. I will
do that in the future, but in the meantime, this fixes the problem
locally

Signed-off-by: Benjamin Herrenschmidt <a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org>

--- arch/powerpc/kernel/pci-common.c
+++ arch/powerpc/kernel/pci-common.c
@@ -16,7 +16,7 @@
  * 2 of the License, or (at your option) any later version.
  */

-#undef DEBUG
+#define DEBUG

 #include <linux/kernel.h>
 #include <linux/pci.h>
@@ -1356,6 +1356,63 @@
 	}
 }

+static void __init pcibios_reserve_legacy_regions(struct pci_bus *bus)
+{
+	struct pci_controller *hose = pci_bus_to_host(bus);
+	resource_size_t	offset;
+	struct resource *res, *pres;
+	int i;
+
+	pr_debug("Reserving legacy ranges for domain %04x\n", pci_domain_nr(bus));
+
+	/* Check for IO */
+	if (!(hose->io_resource.flags & IORESOURCE_IO))
+		goto no_io;
+	offset = (unsigned long)hose->io_base_virt - _IO_BASE;
+	res = kzalloc(sizeof(struct resource), GFP_KERNEL);
+	BUG_ON(res == NULL);
+	res->name = "Legacy IO";
+	res->flags = IORESOURCE_IO;
+	res->start = offset;
+	res->end = (offset + 0xfff) & 0xfffffffful;
+	pr_debug("Candidate legacy IO: %pR\n", res);
+	if (request_resource(&hose->io_resource, res)) {
+		printk(KERN_DEBUG
+		       "PCI %04x:%02x Cannot reserve Legacy IO %pR\n",
+		       pci_domain_nr(bus), bus->number, res);
+		kfree(res);
+	}
+
+ no_io:
+	/* Check for memory */
+	offset = hose->pci_mem_offset;
+	pr_debug("hose mem offset: %016llx\n", (unsigned long long)offset);
+	for (i = 0; i < 3; i++) {
+		pres = &hose->mem_resources[i];
+		if (!(pres->flags & IORESOURCE_MEM))
+			continue;
+		pr_debug("hose mem res: %pR\n", pres);
+		if ((pres->start - offset) <= 0xa0000 &&
+		    (pres->end - offset) >= 0xbffff)
+			break;
+	}
+	if (i >= 3)
+		return;
+	res = kzalloc(sizeof(struct resource), GFP_KERNEL);
+	BUG_ON(res == NULL);
+	res->name = "Legacy VGA memory";
+	res->flags = IORESOURCE_MEM;
+	res->start = 0xa0000 + offset;
+	res->end = 0xbffff + offset;
+	pr_debug("Candidate VGA memory: %pR\n", res);
+	if (request_resource(pres, res)) {
+		printk(KERN_DEBUG
+		       "PCI %04x:%02x Cannot reserve VGA memory %pR\n",
+		       pci_domain_nr(bus), bus->number, res);
+		kfree(res);
+	}
+}
+
 void __init pcibios_resource_survey(void)
 {
 	struct pci_bus *b;
@@ -1371,6 +1428,18 @@
 		pcibios_allocate_resources(1);
 	}

+	/* Before we start assigning unassigned resource, we try to reserve
+	 * the low IO area and the VGA memory area if they intersect the
+	 * bus available resources to avoid allocating things on top of them
+	 */
+	if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) {
+		list_for_each_entry(b, &pci_root_buses, node)
+			pcibios_reserve_legacy_regions(b);
+	}
+
+	/* Now, if the platform didn't decide to blindly trust the firmware,
+	 * we proceed to assigning things that were left unassigned
+	 */
 	if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) {
 		pr_debug("PCI: Assigning unassigned resouces...\n");
 		pci_assign_unassigned_resources();


Fix for multibyte support. Since some function declarations moved to miscadmin.h, we have to include it now.

--- src/interfaces/libpq/fe-print.c
+++ src/interfaces/libpq/fe-print.c
@@ -9,7 +9,7 @@
  * didn't really belong there.
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.30 2000/01/18 19:05:31 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.31 2000/01/19 01:33:16 ishii Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -36,6 +36,7 @@
 #endif

 #ifdef MULTIBYTE
+#include "miscadmin.h"
 #include "mb/pg_wchar.h"
 #endif


Revert "[POWERPC] Disable PCI IO/Mem on a device when resources can't be allocated"

This reverts commit 553aa7659bc0e188348f64e978343ed984eb6e56 at Ben H's
request, because it confused IORESOURCE_* flags with command register
bits.

Requested-by: Benjamin Herrenschmidt <a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org>
Signed-off-by: Paul Mackerras <19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org>

--- arch/powerpc/kernel/pci-common.c
+++ arch/powerpc/kernel/pci-common.c
@@ -1035,7 +1035,7 @@
 	}
 }

-static inline int __devinit alloc_resource(struct pci_dev *dev, int idx)
+static inline void __devinit alloc_resource(struct pci_dev *dev, int idx)
 {
 	struct resource *pr, *r = &dev->resource[idx];

@@ -1059,10 +1059,7 @@
 		r->flags |= IORESOURCE_UNSET;
 		r->end -= r->start;
 		r->start = 0;
-
-		return -EBUSY;
-	}
-	return 0;
+	}
 }

 static void __init pcibios_allocate_resources(int pass)
@@ -1084,12 +1081,8 @@
 				disabled = !(command & PCI_COMMAND_IO);
 			else
 				disabled = !(command & PCI_COMMAND_MEMORY);
-			if (pass == disabled && alloc_resource(dev, idx)) {
-				command &= ~(r->flags & (IORESOURCE_IO |
-							 IORESOURCE_MEM));
-				pci_write_config_word(dev,
-						      PCI_COMMAND, command);
-			}
+			if (pass == disabled)
+				alloc_resource(dev, idx);
 		}
 		if (pass)
 			continue;


KVM: s390: fix assumption for KVM_MAX_VCPUS

This patch fixes definition of the idle_mask and the local_int array
in kvm_s390_float_interrupt. Previous definition had 64 cpus max
hardcoded instead of using KVM_MAX_VCPUS.

Signed-off-by: Carsten Otte <96dcea9914a669842a96acf1583a968a0d4d443b@de.ibm.com>
Signed-off-by: Marcelo Tosatti <958bcd1f4a7a8c36dca09fe3fa9cb5f1483adf51@redhat.com>
Signed-off-by: Avi Kivity <8f920f22884d6fea9df883843c4a8095a2e5ac6f@redhat.com>

--- arch/s390/include/asm/kvm_host.h
+++ arch/s390/include/asm/kvm_host.h
@@ -220,8 +220,9 @@
 	struct list_head list;
 	atomic_t active;
 	int next_rr_cpu;
-	unsigned long idle_mask [(64 + sizeof(long) - 1) / sizeof(long)];
-	struct kvm_s390_local_interrupt *local_int[64];
+	unsigned long idle_mask[(KVM_MAX_VCPUS + sizeof(long) - 1)
+				/ sizeof(long)];
+	struct kvm_s390_local_interrupt *local_int[KVM_MAX_VCPUS];
 };


Cordova 3.6.3 - 'CB-7187 Delete CDVShared.m & remove dependency on CoreLocation

--- src/ios/YoikScreenOrientation.h
+++ src/ios/YoikScreenOrientation.h
@@ -23,7 +23,6 @@
  */

 #import <Cordova/CDVPlugin.h>
-#import <Cordova/CDVShared.h>

 @interface YoikScreenOrientation : CDVPlugin


MadOS v2.46 Debugging...

MadOS v2.46 Debugging...

20190117

--- arch/stm32f10x/Arch/ArchMemCpy.c
+++ arch/stm32f10x/Arch/ArchMemCpy.c
@@ -3,6 +3,8 @@
 #include "MadISR.h"

 #ifdef MAD_CPY_MEM_BY_DMA
+
+#define WAITER_TIMEOUT (size + 100)

 static MadSemCB_t *mad_archm_locker;
 static MadSemCB_t *mad_archm_waiter;
@@ -35,7 +37,7 @@
     nvic.NVIC_IRQChannelCmd                = ENABLE;
     NVIC_Init(&nvic);
     madInstallExIrq(madArchMem_IRQ_Handler, ARCHM_DMA_TX_IRQn);
-
+
 	mad_archm_locker = madSemCreate(1);
     mad_archm_waiter = madSemCreateCarefully(0, 1);
     if((MNULL == mad_archm_locker) || (MNULL == mad_archm_waiter)) {
@@ -67,7 +69,7 @@
     ARCHM_DMA_TX->CMAR  = (MadU32)src;
     ARCHM_DMA_TX->CNDTR = size;
     ARCHM_DMA_TX->CCR  |= 0x81;
-    res = madSemWait(&mad_archm_waiter, size);
+    res = madSemWait(&mad_archm_waiter, WAITER_TIMEOUT);
     madSemRelease(&mad_archm_locker);
     if(res == MAD_ERR_OK) {
         return dst;
@@ -86,7 +88,7 @@
     ARCHM_DMA_TX->CNDTR = size;
     ARCHM_DMA_TX->CCR  &= ~0x80;
     ARCHM_DMA_TX->CCR  |= 0x01;
-    res = madSemWait(&mad_archm_waiter, size);
+    res = madSemWait(&mad_archm_waiter, WAITER_TIMEOUT);
     madSemRelease(&mad_archm_locker);
     if(res == MAD_ERR_OK) {
         return dst;


x86, efi: remove attribute check from setup_efi_pci

It looks like the original commit that copied the rom contents from
efi always copied the rom, and the fixup in setup_efi_pci from commit
886d751a2ea99a160 ("x86, efi: correct precedence of operators in
setup_efi_pci") broke that.

This resulted in macbook pro's no longer finding the rom images, and
thus not being able to use the radeon card any more.

The solution is to just remove the check for now, and always copy the
rom if available.

Reported-by: Vitaly Budovski <39297ff38d9659f4e590e4e332cb1f805f09b3a8@gmail.com>
Cc: Dan Carpenter <ff341aa343d564f9e53e9dcb6996be8c04859a66@oracle.com>
Cc: Seth Forshee <ead5052bef9b6b56b51f87cdc5b831be775ee6fb@canonical.com>
Acked-by: Matthew Garrett <10ea1ff373631291cadf45b163e9fbaf27d1200e@srcf.ucam.org>
Cc: Bjorn Helgaas <f10ec01be0c6b54271af5c550cd257810bdf3268@google.com>
Cc: Sasha Levin <e642b69ed2fc111e09ffdc37feb733a52253340d@oracle.com>
Signed-off-by: Maarten Lankhorst <743c2818a341d71b99ed2b566f9f80c2fc288f93@canonical.com>
Signed-off-by: Matt Fleming <b02f0790d66a0f0a6b369873bf6df37420fbe5dd@intel.com>

--- arch/x86/boot/compressed/eboot.c
+++ arch/x86/boot/compressed/eboot.c
@@ -300,9 +300,6 @@
 					&attributes);

 		if (status != EFI_SUCCESS)
-			continue;
-
-		if (!(attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM))
 			continue;

 		if (!pci->romimage || !pci->romsize)


A bit more optimal sampling pattern.

A bit more optimal sampling pattern.

--- assets/shaders/lights/lighting.h
+++ assets/shaders/lights/lighting.h
@@ -46,20 +46,30 @@

 mediump float get_shadow_term(LightInfo light)
 {
-    // Sample shadowmap.
+	// Sample shadowmap.
 #ifdef SHADOW_CASCADES
 	vec3 shadow_near = light.clip_shadow_near.xyz / light.clip_shadow_near.w;
 	vec3 shadow_far = light.clip_shadow_far.xyz / light.clip_shadow_far.w;

-	vec2 moments_near = textureLod(uShadowmapNear, shadow_near.xy, 0.0).xy;
-	vec2 moments_far = textureLod(uShadowmap, shadow_far.xy, 0.0).xy;
-
-	float shadow_term_near = vsm(shadow_near.z, moments_near);
-	float shadow_term_far = vsm(shadow_far.z, moments_far);
-
-    float view_z = dot(light.camera_front, (light.pos - light.camera_pos));
-    mediump float shadow_lerp = clamp(4.0 * (view_z * light.inv_cutoff_distance - 0.75), 0.0, 1.0);
-    mediump float shadow_term = mix(shadow_term_near, shadow_term_far, shadow_lerp);
+	float view_z = dot(light.camera_front, (light.pos - light.camera_pos));
+	float shadow_cascade = view_z * light.inv_cutoff_distance;
+	mediump float shadow_term_near = 0.0;
+	mediump float shadow_term_far = 0.0;
+
+	if (shadow_cascade < 1.0)
+	{
+		vec2 moments_near = textureLod(uShadowmapNear, shadow_near.xy, 0.0).xy;
+		shadow_term_near = vsm(shadow_near.z, moments_near);
+	}
+
+	if (shadow_cascade > 0.75)
+	{
+		vec2 moments_far = textureLod(uShadowmap, shadow_far.xy, 0.0).xy;
+		shadow_term_far = vsm(shadow_far.z, moments_far);
+	}
+
+	mediump float shadow_lerp = clamp(4.0 * (shadow_cascade - 0.75), 0.0, 1.0);
+	mediump float shadow_term = mix(shadow_term_near, shadow_term_far, shadow_lerp);
 	return shadow_term;
 #else
 	vec3 shadow_far = light.clip_shadow_far.xyz / light.clip_shadow_far.w;
@@ -79,13 +89,20 @@
 mediump float get_shadow_term(LightInfo light)
 {
 #ifdef SHADOW_CASCADES
-	mediump float shadow_term_near;
-	mediump float shadow_term_far;
-	SAMPLE_PCF_KERNEL(shadow_term_near, uShadowmapNear, light.clip_shadow_near);
-	SAMPLE_PCF_KERNEL(shadow_term_far, uShadowmap, light.clip_shadow_far);
-    float view_z = dot(light.camera_front, (light.pos - light.camera_pos));
-    mediump float shadow_lerp = clamp(4.0 * (view_z * light.inv_cutoff_distance - 0.75), 0.0, 1.0);
-    mediump float shadow_term = mix(shadow_term_near, shadow_term_far, shadow_lerp);
+	mediump float shadow_term_near = 0.0;
+	mediump float shadow_term_far = 0.0;
+	float view_z = dot(light.camera_front, (light.pos - light.camera_pos));
+	float shadow_cascade = view_z * light.inv_cutoff_distance;
+	if (shadow_cascade < 1.0)
+	{
+		SAMPLE_PCF_KERNEL(shadow_term_near, uShadowmapNear, light.clip_shadow_near);
+	}
+	if (shadow_cascade > 0.75)
+	{
+		SAMPLE_PCF_KERNEL(shadow_term_far, uShadowmap, light.clip_shadow_far);
+	}
+	mediump float shadow_lerp = clamp(4.0 * (shadow_cascade - 0.75), 0.0, 1.0);
+	mediump float shadow_term = mix(shadow_term_near, shadow_term_far, shadow_lerp);
 	return shadow_term;
 #else
 	mediump float shadow_term_far;


Update RedstoneWireHandler style

Update RedstoneWireHandler style

--- src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h
+++ src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h
@@ -14,25 +14,23 @@

 public:

-	inline static bool IsDirectlyConnectingMechanism(BLOCKTYPE a_Block, NIBBLETYPE a_BlockMeta, Vector3i a_Offset)
+	inline static bool IsDirectlyConnectingMechanism(BLOCKTYPE a_Block, NIBBLETYPE a_BlockMeta, const Vector3i a_Offset)
 	{
 		switch (a_Block)
 		{
 			case E_BLOCK_REDSTONE_REPEATER_ON:
 			case E_BLOCK_REDSTONE_REPEATER_OFF:
-				/** Check when repeater is in x direction  */
+			{
 				a_BlockMeta &= E_META_REDSTONE_REPEATER_FACING_MASK;
 				if ((a_BlockMeta == E_META_REDSTONE_REPEATER_FACING_XP) || (a_BlockMeta == E_META_REDSTONE_REPEATER_FACING_XM))
 				{
-					/** Check if Block is not aligned in in x direction */
-					return (a_Offset.x != 0);
+					// Wire connects to repeater if repeater is aligned along X
+					// and wire is in front or behind it (#4639)
+					return a_Offset.x != 0;
 				}
-				/** when repeater is in z direction */
-				else
-				{
-					/** Check if block is not aligned in z direction */
-					return (a_Offset.z != 0);
-				}
+
+				return a_Offset.z != 0;
+			}
 			case E_BLOCK_ACTIVE_COMPARATOR:
 			case E_BLOCK_INACTIVE_COMPARATOR:
 			case E_BLOCK_REDSTONE_TORCH_OFF:
@@ -42,7 +40,7 @@
 		}
 	}

-	cVector3iArray GetTerracingConnectionOffsets(cWorld & a_World, Vector3i a_Position) const
+	cVector3iArray GetTerracingConnectionOffsets(cWorld & a_World, const Vector3i a_Position) const
 	{
 		cVector3iArray RelativePositions;
 		auto YPTerraceBlock = a_World.GetBlock(a_Position + OffsetYP());


Remove some comments

Remove some comments

--- src/appleseed.shaders/include/appleseed/color/as_color_helpers.h
+++ src/appleseed.shaders/include/appleseed/color/as_color_helpers.h
@@ -539,7 +539,7 @@
 }

 // Chromatically adapted transformation matrix for XYZ<>RGB, using the
-// Bradford CAT will follow shortly. TODO.
+// Bradford CAT will follow shortly.

 color transform_RGB2XYZ(color C, string space)
 {
@@ -570,8 +570,6 @@
     }
 }

-// TODO: Same as above, remaining spaces to be added, chromatically adapted
-// with the Bradford CAT where appropriate.
 color transform_XYZ2RGB(color C, string space)
 {
     if (space == "Rec.709" || space == "sRGB")


CELIX-150
clean up exportRegistrations when RSA is removed

git-svn-id: 2595ac559ac7dd568b108f33b264eba7ab70070c@1623440 13f79535-47bb-0310-9956-ffa450edef68

--- remote_services/topology_manager/private/src/topology_manager.c
+++ remote_services/topology_manager/private/src/topology_manager.c
@@ -158,18 +158,46 @@
 }

 celix_status_t topologyManager_rsaRemoved(void * handle, service_reference_pt reference, void * service) {
-	celix_status_t status = CELIX_SUCCESS;
-	topology_manager_pt manager = handle;
-
-	fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "TOPOLOGY_MANAGER: Removed RSA");
-
-	status = celixThreadMutex_lock(&manager->rsaListLock);
-	arrayList_removeElement(manager->rsaList, service);
-	status = celixThreadMutex_unlock(&manager->rsaListLock);
-
-	// TODO remove the imported/exported services from the given RSA...
-
-	return status;
+    celix_status_t status = CELIX_SUCCESS;
+    topology_manager_pt manager = handle;
+
+    fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "TOPOLOGY_MANAGER: Removed RSA");
+
+    remote_service_admin_service_pt rsa = (remote_service_admin_service_pt) service;
+
+    status = celixThreadMutex_lock(&manager->exportedServicesLock);
+
+    hash_map_iterator_pt iter = hashMapIterator_create(manager->exportedServices);
+
+    while (hashMapIterator_hasNext(iter)) {
+        int exportsIter = 0;
+
+        hash_map_pt exports = hashMapIterator_nextValue(iter);
+        array_list_pt exports_list = hashMap_get(exports, rsa);
+
+        if (exports_list != NULL) {
+            for (exportsIter = 0; exportsIter < arrayList_size(exports_list); exportsIter++) {
+                export_registration_pt export = arrayList_get(exports_list, exportsIter);
+                rsa->exportRegistration_close(export);
+                topologyManager_notifyListenersEndpointRemoved(manager, rsa, export);
+            }
+
+            arrayList_destroy(exports_list);
+            exports_list = NULL;
+        }
+
+        hashMap_remove(exports, rsa);
+        rsa = NULL;
+    }
+    status = celixThreadMutex_unlock(&manager->exportedServicesLock);
+
+    fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "TOPOLOGY_MANAGER: Removed RSA");
+
+    status = celixThreadMutex_lock(&manager->rsaListLock);
+    arrayList_removeElement(manager->rsaList, rsa);
+    status = celixThreadMutex_unlock(&manager->rsaListLock);
+
+    return status;
 }

 celix_status_t topologyManager_getRSAs(topology_manager_pt manager, array_list_pt *rsaList) {
@@ -341,6 +369,8 @@

 				topologyManager_notifyListenersEndpointRemoved(manager, rsa, export);
 			}
+			arrayList_destroy(exports);
+			exports = NULL;
 		}
 		hashMapIterator_destroy(iter);
 	}


Cleanup

Cleanup

--- src/lib-charset/charset-iconv.c
+++ src/lib-charset/charset-iconv.c
@@ -11,7 +11,6 @@

 struct charset_translation {
 	iconv_t cd;
-	bool ascii;
 };

 struct charset_translation *charset_to_utf8_begin(const char *charset,
@@ -19,21 +18,13 @@
 {
 	struct charset_translation *t;
 	iconv_t cd;
-	bool ascii;

 	if (unknown_charset != NULL)
 		*unknown_charset = FALSE;

-	if (strcasecmp(charset, "us-ascii") == 0 ||
-	    strcasecmp(charset, "ascii") == 0) {
+	if (charset_is_utf8(charset))
 		cd = (iconv_t)-1;
-		ascii = TRUE;
-	} else if (strcasecmp(charset, "UTF-8") == 0 ||
-		   strcasecmp(charset, "UTF8") == 0) {
-		cd = (iconv_t)-1;
-		ascii = FALSE;
-	} else {
-		ascii = FALSE;
+	else {
 		cd = iconv_open("UTF-8", charset);
 		if (cd == (iconv_t)-1) {
 			if (unknown_charset != NULL)
@@ -44,7 +35,6 @@

 	t = i_new(struct charset_translation, 1);
 	t->cd = cd;
-	t->ascii = ascii;
 	return t;
 }


Another lookup_uid_range() seq2 bugfix/crashfix.

--- src/lib-index/mail-index-view.c
+++ src/lib-index/mail-index-view.c
@@ -378,7 +378,7 @@
 	else {
 		/* optimization - binary lookup only from right side: */
 		*last_seq_r = mail_index_bsearch_uid(view, last_uid,
-						     *first_seq_r, -1);
+						     *first_seq_r - 1, -1);
 	}
 	i_assert(*last_seq_r >= *first_seq_r);
 	return 0;


lib-master: Code cleanup - split master_status_update() to two functions. No functional changes.

--- src/lib-master/master-service.c
+++ src/lib-master/master-service.c
@@ -991,45 +991,10 @@
 	return FALSE;
 }

-void master_status_update(struct master_service *service)
+static void
+master_status_send(struct master_service *service, bool important_update)
 {
 	ssize_t ret;
-	bool important_update;
-
-	if ((service->flags & MASTER_SERVICE_FLAG_UPDATE_PROCTITLE) != 0 &&
-	    service->set != NULL && service->set->verbose_proctitle) T_BEGIN {
-		unsigned int used_count = service->total_available_count -
-			service->master_status.available_count;
-
-		process_title_set(t_strdup_printf("[%u connections]",
-						  used_count));
-	} T_END;
-
-	important_update = master_status_update_is_important(service);
-	if (service->master_status.pid == 0 ||
-	    service->master_status.available_count ==
-	    service->last_sent_status_avail_count) {
-		/* a) closed, b) updating to same state */
-		if (service->to_status != NULL)
-			timeout_remove(&service->to_status);
-		if (service->io_status_write != NULL)
-			io_remove(&service->io_status_write);
-		return;
-	}
-	if (ioloop_time == service->last_sent_status_time &&
-	    !important_update) {
-		/* don't spam master */
-		if (service->to_status != NULL)
-			timeout_reset(service->to_status);
-		else {
-			service->to_status =
-				timeout_add(1000, master_status_update,
-					    service);
-		}
-		if (service->io_status_write != NULL)
-			io_remove(&service->io_status_write);
-		return;
-	}

 	if (service->to_status != NULL)
 		timeout_remove(&service->to_status);
@@ -1066,6 +1031,47 @@
 	}
 }

+void master_status_update(struct master_service *service)
+{
+	bool important_update;
+
+	if ((service->flags & MASTER_SERVICE_FLAG_UPDATE_PROCTITLE) != 0 &&
+	    service->set != NULL && service->set->verbose_proctitle) T_BEGIN {
+		unsigned int used_count = service->total_available_count -
+			service->master_status.available_count;
+
+		process_title_set(t_strdup_printf("[%u connections]",
+						  used_count));
+	} T_END;
+
+	important_update = master_status_update_is_important(service);
+	if (service->master_status.pid == 0 ||
+	    service->master_status.available_count ==
+	    service->last_sent_status_avail_count) {
+		/* a) closed, b) updating to same state */
+		if (service->to_status != NULL)
+			timeout_remove(&service->to_status);
+		if (service->io_status_write != NULL)
+			io_remove(&service->io_status_write);
+		return;
+	}
+	if (ioloop_time == service->last_sent_status_time &&
+	    !important_update) {
+		/* don't spam master */
+		if (service->to_status != NULL)
+			timeout_reset(service->to_status);
+		else {
+			service->to_status =
+				timeout_add(1000, master_status_update,
+					    service);
+		}
+		if (service->io_status_write != NULL)
+			io_remove(&service->io_status_write);
+		return;
+	}
+	master_status_send(service, important_update);
+}
+
 bool version_string_verify(const char *line, const char *service_name,
 			   unsigned major_version)
 {


Fix numeric types for IDs.

Fix numeric types for IDs.

--- src/lib/bus/listener_internal.h
+++ src/lib/bus/listener_internal.h
@@ -52,7 +52,7 @@

 /* Record in table for partially processed messages. */
 typedef struct rx_info_t {
-    const uint8_t id;
+    const uint16_t id;
     struct rx_info_t *next;
     bool active;
     time_t timeout_sec;
@@ -88,7 +88,7 @@

     size_t upstream_backpressure;

-    uint8_t tracked_fds;
+    uint16_t tracked_fds;
     struct pollfd fds[MAX_FDS];
     connection_info *fd_info[MAX_FDS];


remove unused variables

remove unused variables

git-svn-id: 24a995eca3b83137dd7eab3408044d7832e202f7@35611 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

--- src/lib/canvas/evas_rectangle.c
+++ src/lib/canvas/evas_rectangle.c
@@ -4,8 +4,6 @@
 void
 evas_rects_return_difference_rects(Evas_Rectangles *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh)
 {
-   unsigned int available = 0;
-
    if (!RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh))
      {
 	evas_add_rect(rects, x, y, w, h);
@@ -14,7 +12,6 @@
    else
      {
 	int x1[4], y1[4], i, j;
-	Evas_Rectangles tmp = { 0, 0, NULL };

 	if (x < xx)
 	  {


Move ecore_file_ls from an O(n^2) insertion sort to an O(n log n) heap sort,
since we already have it available. Worked fine on OS X and had dj2 check on
Linux to ensure filesystem ordering wasn't skewing the results. He ran a
couple quick benchmarks on a 10k file directory.

Insertion sort results
23:38 <@dj2> real    0m2.134s
23:38 <@dj2> user    0m1.880s
23:38 <@dj2> sys     0m0.120s

Heap sort results
23:35 <@dj2> real    0m0.223s
23:35 <@dj2> user    0m0.072s
23:35 <@dj2> sys     0m0.052s

23:38 <@dj2> and thats on a 3ghz box, heh

git-svn-id: 70cf712206e5b8426a8d7451e052914a94f8fa22@18410 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

--- src/lib/ecore_file/ecore_file.c
+++ src/lib/ecore_file/ecore_file.c
@@ -261,9 +261,11 @@
 Ecore_List *
 ecore_file_ls(const char *dir)
 {
+   char               *f;
    DIR                *dirp;
    struct dirent      *dp;
-   Ecore_List        *list;
+   Ecore_List         *list;
+   Ecore_Sheap        *heap;

    dirp = opendir(dir);
    if (!dirp) return NULL;
@@ -275,29 +277,28 @@
      {
 	if ((strcmp(dp->d_name, ".")) && (strcmp(dp->d_name, "..")))
 	  {
-	     char *file, *f;
-
-	     /* insertion sort */
-	     ecore_list_goto_first(list);
-	     while ((file = ecore_list_current(list)))
-	       {
-		  if (strcasecmp(file, dp->d_name) > 0)
-		    {
-		       f = strdup(dp->d_name);
-		       ecore_list_insert(list, f);
-		       break;
-		    }
-		  ecore_list_next(list);
-	       }
-	     /* nowhwre to go? just append it */
-	     if (!file)
-	       {
-		  f = strdup(dp->d_name);
-		  ecore_list_insert(list, f);
-	       }
+	       f = strdup(dp->d_name);
+	       ecore_list_append(list, f);
 	  }
      }
    closedir(dirp);
+
+   /*
+    * Push the data into a heap.
+    */
+   heap = ecore_sheap_new(ECORE_COMPARE_CB(strcasecmp), ecore_list_nodes(list));
+   while ((f = ecore_list_remove_first(list)))
+     {
+	ecore_sheap_insert(heap, f);
+     }
+
+   /*
+    * Extract in sorted order.
+    */
+   while ((f = ecore_sheap_extract(heap)))
+     {
+	ecore_list_append(list, f);
+     }

    ecore_list_goto_first(list);
    return list;


Fix ecore_file initialization

Fix ecore_file initialization

We must init ecore, otherwise we will not have an eina ref.

SVN revision: 59916

--- src/lib/ecore_file/ecore_file.c
+++ src/lib/ecore_file/ecore_file.c
@@ -47,6 +47,10 @@
 {
    if (++_ecore_file_init_count != 1)
      return _ecore_file_init_count;
+
+   if (!ecore_init())
+     return --_ecore_file_init_count;
+
    _ecore_file_log_dom = eina_log_domain_register
      ("ecore_file", ECORE_FILE_DEFAULT_LOG_COLOR);
    if(_ecore_file_log_dom < 0)
@@ -99,8 +103,12 @@
    ecore_file_download_shutdown();
    ecore_file_monitor_shutdown();
    ecore_file_path_shutdown();
+
    eina_log_domain_unregister(_ecore_file_log_dom);
    _ecore_file_log_dom = -1;
+
+   ecore_shutdown();
+
    return _ecore_file_init_count;
 }


Error if \0 inside quotes.

Error if \0 inside quotes.

git-svn-id: 70cf712206e5b8426a8d7451e052914a94f8fa22@17163 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

--- src/lib/ecore_x/ecore_x_netwm.c
+++ src/lib/ecore_x/ecore_x_netwm.c
@@ -1584,6 +1584,7 @@
 	       }
 	     p++;
 	  }
+	if ((in_quot_dbl) || (in_quot_sing)) return 0;
 	data = p;
 	*pp = 0;


Listen for IN_DELETE_SELF too. Ignore EINVAL for inotify_rm_watch().

--- src/lib/ioloop-notify-inotify.c
+++ src/lib/ioloop-notify-inotify.c
@@ -98,8 +98,8 @@
 		return IO_NOTIFY_DISABLED;

 	wd = inotify_add_watch(ctx->inotify_fd, path,
-			       IN_CREATE | IN_DELETE | IN_MOVE |
-			       IN_CLOSE | IN_MODIFY);
+			       IN_CREATE | IN_DELETE | IN_DELETE_SELF |
+			       IN_MOVE | IN_CLOSE | IN_MODIFY);
 	if (wd < 0) {
 		if (errno == ENOENT)
 			return IO_NOTIFY_NOTFOUND;
@@ -128,7 +128,10 @@
 	struct io_notify *io = (struct io_notify *)_io;

 	if (io->fd != -1) {
-		if (inotify_rm_watch(ctx->inotify_fd, io->fd) < 0)
+		/* ernro=EINVAL happens if the file itself is deleted and
+		   kernel has sent IN_IGNORED event which we haven't read. */
+		if (inotify_rm_watch(ctx->inotify_fd, io->fd) < 0 &&
+		    errno != EINVAL)
 			i_error("inotify_rm_watch() failed: %m");
 	}


Add class documentation for AbstractColorGradient class

--- source/gloperate/include/gloperate/base/AbstractColorGradient.h
+++ source/gloperate/include/gloperate/base/AbstractColorGradient.h
@@ -22,11 +22,26 @@

 class ColorGradientList;

+/**
+ * @brief
+ *    The base class for color gradients (i.e., a mapping of float values in the range of [0..1] to a reflectionzeug::Color).
+ *
+ *    This class provides convenience methods for accessing the binary image data of the gradient with specific widths (pixelData)
+ *    and for using this color gradient in an OpenGL texture (generateTexture).
+ *
+ *    A color gradient is identified through its name and this name is mainly used by the ColorGradientList class.
+ *
+ *    \see ColorGradientList
+ *    \see ExplicitEquidistantColorGradient
+ */
 class GLOPERATE_API AbstractColorGradient
 {
 public:
     explicit AbstractColorGradient(const std::string & name);

+    /**
+     * @brief Virtual destructor for subclasses.
+     */
     virtual ~AbstractColorGradient();

     const std::string & name() const;
@@ -49,4 +64,5 @@

 } // namespace reflectionzeug

+
 #include <gloperate/base/AbstractColorGradient.hpp>


Take OSB feature multiplier into account.

--- src/libstat/classifiers/bayes.c
+++ src/libstat/classifiers/bayes.c
@@ -79,6 +79,9 @@
 	return MIN (1.0, sum);
 }

+static const double feature_weight[] = { 0, 3125, 256, 27, 4, 1 };
+
+#define PROB_COMBINE(prob, cnt, weight, assumed) (((weight) * (assumed) + (cnt) * (prob)) / ((weight) + (cnt)))
 /*
  * In this callback we calculate local probabilities for tokens
  */
@@ -90,7 +93,8 @@
 	guint i;
 	struct rspamd_token_result *res;
 	guint64 spam_count = 0, ham_count = 0, total_count = 0;
-	double spam_prob, spam_freq, ham_freq, bayes_spam_prob;
+	double spam_prob, spam_freq, ham_freq, bayes_spam_prob, bayes_ham_prob,
+		ham_prob, fw, w;

 	for (i = rt->start_pos; i < rt->end_pos; i++) {
 		res = &g_array_index (node->results, struct rspamd_token_result, i);
@@ -112,9 +116,13 @@
 		spam_freq = ((double)spam_count / MAX (1., (double)rt->total_spam));
 		ham_freq = ((double)ham_count / MAX (1., (double)rt->total_ham));
 		spam_prob = spam_freq / (spam_freq + ham_freq);
-		bayes_spam_prob = (0.5 + spam_prob * total_count) / (1. + total_count);
+		ham_prob = ham_freq / (spam_freq + ham_freq);
+		fw = feature_weight[node->window_idx % G_N_ELEMENTS (feature_weight)];
+		w = (fw * total_count) / (4.0 * (1.0 + fw * total_count));
+		bayes_spam_prob = PROB_COMBINE (spam_prob, total_count, w, 0.5);
+		bayes_ham_prob = PROB_COMBINE (ham_prob, total_count, w, 0.5);
 		rt->spam_prob += log (bayes_spam_prob);
-		rt->ham_prob += log (1. - bayes_spam_prob);
+		rt->ham_prob += log (bayes_ham_prob);
 		res->cl_runtime->processed_tokens ++;
 	}


Formatting doc

Formatting doc

--- src/BabylonCpp/include/babylon/meshes/builders/ribbon_builder.h
+++ src/BabylonCpp/include/babylon/meshes/builders/ribbon_builder.h
@@ -18,41 +18,23 @@
  */
 struct BABYLON_SHARED_EXPORT RibbonBuilder {

+  // clang-format off
   /**
-   * @brief Creates a ribbon mesh. The ribbon is a parametric shape.  It has no predefined shape.
-   * Its final shape will depend on the input parameters
-   * * The parameter `pathArray` is a required array of paths, what are each an array of successive
-   * Vector3. The pathArray parameter depicts the ribbon geometry
-   * * The parameter `closeArray` (boolean, default false) creates a seam between the first and the
-   * last paths of the path array
-   * * The parameter `closePath` (boolean, default false) creates a seam between the first and the
-   * last points of each path of the path array
-   * * The parameter `offset` (positive integer, default : rounded half size of the pathArray
-   * length), is taken in account only if the `pathArray` is containing a single path
-   * * It's the offset to join the points from the same path. Ex : offset = 10 means the point 1 is
-   * joined to the point 11
-   * * The optional parameter `instance` is an instance of an existing Ribbon object to be updated
-   * with the passed `pathArray` parameter :
-   * https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#ribbon
-   * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE
-   * (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
-   * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and
-   * stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs`
-   * (Vector4). Detail here :
-   * https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
-   * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V
-   * coordinates to apply a texture
-   * * The parameter `uvs` is an optional flat array of `Vector2` to update/set each ribbon vertex
-   * with its own custom UV values instead of the computed ones
-   * * The parameters `colors` is an optional flat array of `Color4` to set/update each ribbon
-   * vertex with its own custom color values
-   * * Note that if you use the parameters `uvs` or `colors`, the passed arrays must be populated
-   * with the right number of elements, it is to say the number of ribbon vertices. Remember that if
-   * you set `closePath` to `true`, there's one extra vertex per path in the geometry
-   * * Moreover, you can use the parameter `color` with `instance` (to update the ribbon), only if
-   * you previously used it at creation time
-   * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if
-   * its internal geometry is supposed to change once created
+   * @brief Creates a ribbon mesh. The ribbon is a parametric shape.  It has no predefined shape. Its final shape will depend on the input parameters
+   * * The parameter `pathArray` is a required array of paths, what are each an array of successive Vector3. The pathArray parameter depicts the ribbon geometry
+   * * The parameter `closeArray` (boolean, default false) creates a seam between the first and the last paths of the path array
+   * * The parameter `closePath` (boolean, default false) creates a seam between the first and the last points of each path of the path array
+   * * The parameter `offset` (positive integer, default : rounded half size of the pathArray length), is taken in account only if the `pathArray` is containing a single path
+   * * It's the offset to join the points from the same path. Ex : offset = 10 means the point 1 is joined to the point 11
+   * * The optional parameter `instance` is an instance of an existing Ribbon object to be updated with the passed `pathArray` parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#ribbon
+   * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
+   * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
+   * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
+   * * The parameter `uvs` is an optional flat array of `Vector2` to update/set each ribbon vertex with its own custom UV values instead of the computed ones
+   * * The parameters `colors` is an optional flat array of `Color4` to set/update each ribbon vertex with its own custom color values
+   * * Note that if you use the parameters `uvs` or `colors`, the passed arrays must be populated with the right number of elements, it is to say the number of ribbon vertices. Remember that if you set `closePath` to `true`, there's one extra vertex per path in the geometry
+   * * Moreover, you can use the parameter `color` with `instance` (to update the ribbon), only if you previously used it at creation time
+   * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
    * @param name defines the name of the mesh
    * @param options defines the options used to create the mesh
    * @param scene defines the hosting scene
@@ -60,6 +42,7 @@
    * @see https://doc.babylonjs.com/how_to/ribbon_tutorial
    * @see https://doc.babylonjs.com/how_to/parametric_shapes
    */
+  // clang-format on
   static MeshPtr CreateRibbon(const std::string& name, RibbonOptions& options,
                               Scene* scene = nullptr);


* src/maemo/modest-address-book.c:
        * (add_to_address_book): now it supports receiving a full
          address (form User <email@address>). If it gets it, it
          searches in contacts for only email@address. If it's not
          found, then it stores a contact with full name User and
          email address email@address. Fixes NB#79467.

pmo-trunk-r4102

--- src/maemo/modest-address-book.c
+++ src/maemo/modest-address-book.c
@@ -586,6 +586,7 @@
 	EBookQuery *query;
 	GList *contacts = NULL;
 	GError *err = NULL;
+	gchar *email;

 	g_return_val_if_fail (address, FALSE);

@@ -593,8 +594,10 @@
 		open_addressbook ();

 	g_return_val_if_fail (book, FALSE);
-
-	query = e_book_query_field_test (E_CONTACT_EMAIL, E_BOOK_QUERY_IS, address);
+
+	email = modest_text_utils_get_email_address (address);
+
+	query = e_book_query_field_test (E_CONTACT_EMAIL, E_BOOK_QUERY_IS, email);
 	if (!e_book_get_contacts (book, query, &contacts, &err)) {
 		g_printerr ("modest: failed to get contacts: %s",
 			    err ? err->message : "<unknown>");
@@ -616,11 +619,21 @@
 	} else {
 		/* it's not yet in the addressbook, add it now! */
 		EContact *new_contact = e_contact_new ();
-		e_contact_set (new_contact, E_CONTACT_EMAIL_1, (const gpointer)address);
+		gchar *display_address;
+		display_address = g_strdup (address);
+		if (display_address) {
+			modest_text_utils_get_display_address (display_address);
+			if ((display_address[0] != '\0') && (strlen (display_address) != strlen (address)))
+				e_contact_set (new_contact, E_CONTACT_FULL_NAME, (const gpointer)display_address);
+		}
+		e_contact_set (new_contact, E_CONTACT_EMAIL_1, (const gpointer)email);
+		g_free (display_address);
 		commit_contact (new_contact, TRUE);
 		g_debug ("%s added to address book", address);
 		g_object_unref (new_contact);
 	}
+
+	g_free (email);

 	return TRUE;
 }


Revert "Update masternodemeta.h"

Revert "Update masternodemeta.h"

This reverts commit 0657b76e5752e3179e9117b96c9b8619b186d28c.

--- src/masternode/masternodemeta.h
+++ src/masternode/masternodemeta.h
@@ -89,9 +89,12 @@
             tmpMetaInfo.emplace_back(*p.second);
         }
         s << tmpMetaInfo;
-        s << MIN_MASTERNODE_PROTO_VERSION;
-        s << nCurrentVersionStarted;
-
+        if (nCurrentVersion == 0 && nCurrentVersionStarted == 0) {
+            // first time serialization
+            s << MIN_MASTERNODE_PROTO_VERSION;
+        } else {
+            s << nCurrentVersionStarted;
+        }
     }
     template<typename Stream>
     void Unserialize(Stream& s)
@@ -109,13 +112,7 @@
         for (auto& mm : tmpMetaInfo) {
             metaInfos.try_emplace(mm.GetProTxHash(), std::make_shared<CMasternodeMetaInfo>(std::move(mm)));
         }
-        int nCurrentVersion;
-        s >> nCurrentVersion;
         s >> nCurrentVersionStarted;
-        if (nCurrentVersion != MIN_MASTERNODE_PROTO_VERSION) {
-            // serialized by some another version
-            nCurrentVersionStarted = GetTime();
-        }
     }

 public:


monoclock: fixed English in comments

monoclock: fixed English in comments

git-svn-id: d3d46767b8f15aa15dc28b4413db96165ce057f7@37737 140774ce-b5e7-0310-ab8b-a85725594a96

--- src/microhttpd/mhd_mono_clock.c
+++ src/microhttpd/mhd_mono_clock.c
@@ -36,11 +36,11 @@

 #ifdef HAVE_GETHRTIME
 #ifdef HAVE_SYS_TIME_H
-/* Solaris define gethrtime() in sys/time.h */
+/* Solaris defines gethrtime() in sys/time.h */
 #include <sys/time.h>
 #endif /* HAVE_SYS_TIME_H */
 #ifdef HAVE_TIME_H
-/* HP-UX define gethrtime() in time.h */
+/* HP-UX defines gethrtime() in time.h */
 #include <time.h>
 #endif /* HAVE_TIME_H */
 #endif /* HAVE_GETHRTIME */


not having any text here weirds me out

not having any text here weirds me out

SVN revision: 66918

--- src/modules/comp/e_mod_config.c
+++ src/modules/comp/e_mod_config.c
@@ -1319,16 +1319,16 @@
    of = e_widget_frametable_add(evas, _("Corner"), 0);
    e_widget_frametable_content_align_set(of, 0.5, 0.5);
    rg = e_widget_radio_group_new(&(cfdata->fps_corner));
-   ob = e_widget_radio_icon_add(evas, NULL, "preferences-position-top-left",
+   ob = e_widget_radio_icon_add(evas, "Top Left", "preferences-position-top-left",
                                 24, 24, 0, rg);
    e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 1);
-   ob = e_widget_radio_icon_add(evas, NULL, "preferences-position-top-right",
+   ob = e_widget_radio_icon_add(evas, "Top Right", "preferences-position-top-right",
                                 24, 24, 1, rg);
    e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 1, 1);
-   ob = e_widget_radio_icon_add(evas, NULL, "preferences-position-bottom-left",
+   ob = e_widget_radio_icon_add(evas, "Bottom Left", "preferences-position-bottom-left",
                                 24, 24, 2, rg);
    e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 1);
-   ob = e_widget_radio_icon_add(evas, NULL, "preferences-position-bottom-right",
+   ob = e_widget_radio_icon_add(evas, "Bottom Right", "preferences-position-bottom-right",
                                 24, 24, 3, rg);
    e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 1, 1);
    e_widget_list_object_append(ol, of, 1, 1, 0.5);


bug fix: the fcgi_group wasn't setup properly.  I don't know that this broke anything (until the introduction of the 'don't use suexec when User/Group are the same' change

--- fcgi_config.c
+++ fcgi_config.c
@@ -1,5 +1,5 @@
 /*
- * $Id: fcgi_config.c,v 1.23 2000/09/19 16:26:51 robs Exp $
+ * $Id: fcgi_config.c,v 1.24 2000/10/23 20:20:49 robs Exp $
  */

 #include "fcgi.h"
@@ -193,7 +193,7 @@
     }

     uid = uid ? uid : ap_user_id;
-    gid = uid ? gid : ap_group_id;
+    gid = gid ? gid : ap_group_id;

     if (isSet && (uid != fcgi_user_id || gid != fcgi_group_id)) {
         return "User/Group commands must preceed FastCGI server definitions";


http2-client.c: remove superfluous #include


No need to be virtual

No need to be virtual

--- include/CppUTest/Utest.h
+++ include/CppUTest/Utest.h
@@ -103,7 +103,7 @@
     int getLineNumber() const;
     virtual bool willRun() const;
     virtual bool hasFailed() const;
-    virtual void countCheck();
+    void countCheck();

     virtual void assertTrue(bool condition, const char *checkString, const char *conditionString, const char *fileName, int lineNumber, const TestTerminator& testTerminator = NormalTestTerminator());
     virtual void assertTrueText(bool condition, const char *checkString, const char *conditionString, const char* text, const char *fileName, int lineNumber, const TestTerminator& testTerminator = NormalTestTerminator());


rename UNKNOWN_FORMAT to NO_FORMAT

rename UNKNOWN_FORMAT to NO_FORMAT

--- include/InternalFormat.h
+++ include/InternalFormat.h
@@ -3,7 +3,7 @@

 namespace canvas {
   enum InternalFormat {
-    UNKNOWN_FORMAT = 0,
+    NO_FORMAT = 0,
     R8,
     RG8,
     RGB565,


allow disabling security without having to edit the file

svn path=/trunk/kdesupport/qca/; revision=650053

--- include/QtCrypto/qpipe.h
+++ include/QtCrypto/qpipe.h
@@ -32,7 +32,9 @@

 #include <QtCore>

-#define QPIPE_SECURE
+#ifndef QPIPE_NO_SECURE
+# define QPIPE_SECURE
+#endif

 #ifdef QPIPE_SECURE
 # include <QtCrypto>


Spelling fix

Spelling fix

--- include/Utility/Random.h
+++ include/Utility/Random.h
@@ -47,7 +47,7 @@

     //! Shuffles the order of a list.

-    //! \param[out] list An sequential collection of items whose order will be shuffled after the call.
+    //! \param[out] list A sequential collection of items whose order will be shuffled after the call.
     template<class List>
     void shuffle(List& list)
     {


pm suspend methodology and ipc update

pm suspend methodology and ipc update

Change-Id: I63b84285b4ee99623f8e7b7c8498226aa25da2e4
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41942
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Tested-by: Hostboot CI <52521565bd8ea18a2b112942dce4f4220a97c2c8@us.ibm.com>
Reviewed-by: Gregory S. Still <4249770c9038596e9483266bcd48707ac69ee60b@us.ibm.com>
Reviewed-by: Brian T. Vanderpool <80bf54c65fef5142bcd6ac0d0b8f1646681d56b8@us.ibm.com>
Reviewed-by: Prachi Gupta <25a72946fc4ec2539bba3cff1fbb2916af6a7649@us.ibm.com>

--- src/import/chips/p9/procedures/hwp/lib/p9_pm_hcd_flags.h
+++ src/import/chips/p9/procedures/hwp/lib/p9_pm_hcd_flags.h
@@ -205,7 +205,8 @@
     SPGE_DEBUG_TRAP_ENABLE                      = 8,
     CME_DEBUG_TRAP_ENABLE                       = 9,
     PGPE_DEBUG_TRAP_ENABLE                      = 10,
-    L3_CONTAINED_MODE                           = 11
+    L3_CONTAINED_MODE                           = 11,
+    PGPE_SAFE_MODE_ERROR                        = 12
 };

 //


Tidy up

Tidy up

--- include/any_shared_ptr.h
+++ include/any_shared_ptr.h
@@ -187,8 +187,7 @@

     inline any_shared_ptr& any_shared_ptr::operator=(any_shared_ptr const& other) noexcept
     {
-      if (this != &other)
-      {
+      if (this != &other) {
         this->~any_shared_ptr();
         my_type_info = other.my_type_info;
         other.holder()->clone(&my_inplace_storage);
@@ -199,8 +198,7 @@

     inline any_shared_ptr& any_shared_ptr::operator=(any_shared_ptr && other) noexcept
     {
-      if (this != &other)
-      {
+      if (this != &other) {
         this->~any_shared_ptr();
         my_type_info = other.my_type_info;
         my_inplace_storage = other.my_inplace_storage;


asm-generic/io.h: allow people to override individual funcs

For the Blackfin port, we can use much of the asm-generic/io.h header,
but we still need to declare some of our own versions of functions.
Like the __raw_read* and in/out "string" helpers.  So let people do
this easily for many of these funcs.

Signed-off-by: Mike Frysinger <8f3f75c74bd5184edcfa6534cab3c13a00a2f794@gentoo.org>
Signed-off-by: Arnd Bergmann <f2c659f01951776204a6c5b902787d9019fbeebd@arndb.de>


sh: hd64461.h cleanup and added comments.

Now that we dont have PIO mapping anymore we need to make sure we
got the correct value in our headers. Some well needed comments
have also been added.

Signed-off-by: Kristoffer Ericson <aa612af59a96f3eb9dbe4c12cd763177da6414ff@gmail.com>
Signed-off-by: Paul Mundt <38b52dbb5f0b63d149982b6c5de788ec93a89032@linux-sh.org>

--- include/asm-sh/hd64461.h
+++ include/asm-sh/hd64461.h
@@ -1,200 +1,241 @@
 #ifndef __ASM_SH_HD64461
 #define __ASM_SH_HD64461
 /*
- *	$Id: hd64461.h,v 1.5 2004/03/16 00:07:51 lethal Exp $
+ *	Copyright (C) 2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
+ *	Copyright (C) 2004 Paul Mundt
  *	Copyright (C) 2000 YAEGASHI Takeshi
- *	Hitachi HD64461 companion chip support
+ *
+ *		Hitachi HD64461 companion chip support
+ *	(please note manual reference 0x10000000 = 0xb0000000)
  */

 /* Constants for PCMCIA mappings */
-#define HD64461_PCC_WINDOW	0x01000000
-
-#define HD64461_PCC0_BASE	0xb8000000	/* area 6 */
-#define HD64461_PCC0_ATTR	(HD64461_PCC0_BASE)
-#define HD64461_PCC0_COMM	(HD64461_PCC0_BASE+HD64461_PCC_WINDOW)
-#define HD64461_PCC0_IO		(HD64461_PCC0_BASE+2*HD64461_PCC_WINDOW)
-
-#define HD64461_PCC1_BASE	0xb4000000	/* area 5 */
-#define HD64461_PCC1_ATTR	(HD64461_PCC1_BASE)
-#define HD64461_PCC1_COMM	(HD64461_PCC1_BASE+HD64461_PCC_WINDOW)
-
-#define HD64461_STBCR	0x10000
-#define HD64461_STBCR_CKIO_STBY			0x2000
-#define HD64461_STBCR_SAFECKE_IST		0x1000
-#define HD64461_STBCR_SLCKE_IST			0x0800
-#define HD64461_STBCR_SAFECKE_OST		0x0400
-#define HD64461_STBCR_SLCKE_OST			0x0200
-#define HD64461_STBCR_SMIAST			0x0100
-#define HD64461_STBCR_SLCDST			0x0080
-#define HD64461_STBCR_SPC0ST			0x0040
-#define HD64461_STBCR_SPC1ST			0x0020
-#define HD64461_STBCR_SAFEST			0x0010
-#define HD64461_STBCR_STM0ST			0x0008
-#define HD64461_STBCR_STM1ST			0x0004
-#define HD64461_STBCR_SIRST				0x0002
-#define HD64461_STBCR_SURTST			0x0001
-
-#define HD64461_SYSCR	0x10002
-#define HD64461_SCPUCR	0x10004
-
-#define HD64461_LCDCBAR		0x11000
-#define HD64461_LCDCLOR		0x11002
-#define HD64461_LCDCCR		0x11004
-#define HD64461_LCDCCR_STBACK	0x0400
-#define HD64461_LCDCCR_STREQ	0x0100
-#define HD64461_LCDCCR_MOFF	0x0080
-#define HD64461_LCDCCR_REFSEL	0x0040
-#define HD64461_LCDCCR_EPON	0x0020
-#define HD64461_LCDCCR_SPON	0x0010
-
-#define	HD64461_LDR1		0x11010
-#define	HD64461_LDR1_DON	0x01
-#define	HD64461_LDR1_DINV	0x80
-
-#define	HD64461_LDR2		0x11012
-#define	HD64461_LDHNCR		0x11014
-#define	HD64461_LDHNSR		0x11016
-#define HD64461_LDVNTR		0x11018
-#define HD64461_LDVNDR		0x1101a
-#define HD64461_LDVSPR		0x1101c
-#define HD64461_LDR3		0x1101e
-
-#define HD64461_CPTWAR		0x11030
-#define HD64461_CPTWDR		0x11032
-#define HD64461_CPTRAR		0x11034
-#define HD64461_CPTRDR		0x11036
-
-#define HD64461_GRDOR		0x11040
-#define HD64461_GRSCR		0x11042
-#define HD64461_GRCFGR		0x11044
-#define HD64461_GRCFGR_ACCSTATUS		0x10
-#define HD64461_GRCFGR_ACCRESET			0x08
-#define HD64461_GRCFGR_ACCSTART_BITBLT	0x06
-#define HD64461_GRCFGR_ACCSTART_LINE	0x04
-#define HD64461_GRCFGR_COLORDEPTH16		0x01
-
-#define HD64461_LNSARH		0x11046
-#define HD64461_LNSARL		0x11048
-#define HD64461_LNAXLR		0x1104a
-#define HD64461_LNDGR		0x1104c
-#define HD64461_LNAXR		0x1104e
-#define HD64461_LNERTR		0x11050
-#define HD64461_LNMDR		0x11052
-#define HD64461_BBTSSARH	0x11054
-#define HD64461_BBTSSARL	0x11056
-#define HD64461_BBTDSARH	0x11058
-#define HD64461_BBTDSARL	0x1105a
-#define HD64461_BBTDWR		0x1105c
-#define HD64461_BBTDHR		0x1105e
-#define HD64461_BBTPARH		0x11060
-#define HD64461_BBTPARL		0x11062
-#define HD64461_BBTMARH		0x11064
-#define HD64461_BBTMARL		0x11066
-#define HD64461_BBTROPR		0x11068
-#define HD64461_BBTMDR		0x1106a
+#define	HD64461_PCC_WINDOW	0x01000000
+
+/* Area 6 - Slot 0 - memory and/or IO card */
+#define	HD64461_PCC0_BASE	(CONFIG_HD64461_IOBASE + 0x8000000)
+#define	HD64461_PCC0_ATTR	(HD64461_PCC0_BASE)				/* 0xb80000000 */
+#define	HD64461_PCC0_COMM	(HD64461_PCC0_BASE+HD64461_PCC_WINDOW)		/* 0xb90000000 */
+#define	HD64461_PCC0_IO		(HD64461_PCC0_BASE+2*HD64461_PCC_WINDOW)	/* 0xba0000000 */
+
+/* Area 5 - Slot 1 - memory card only */
+#define	HD64461_PCC1_BASE	(CONFIG_HD64461_IOBASE + 0x4000000)
+#define	HD64461_PCC1_ATTR	(HD64461_PCC1_BASE)				/* 0xb4000000 */
+#define	HD64461_PCC1_COMM	(HD64461_PCC1_BASE+HD64461_PCC_WINDOW)		/* 0xb5000000 */
+
+/* Standby Control Register for HD64461 */
+#define	HD64461_STBCR			CONFIG_HD64461_IOBASE
+#define	HD64461_STBCR_CKIO_STBY		0x2000
+#define	HD64461_STBCR_SAFECKE_IST	0x1000
+#define	HD64461_STBCR_SLCKE_IST		0x0800
+#define	HD64461_STBCR_SAFECKE_OST	0x0400
+#define	HD64461_STBCR_SLCKE_OST		0x0200
+#define	HD64461_STBCR_SMIAST		0x0100
+#define	HD64461_STBCR_SLCDST		0x0080
+#define	HD64461_STBCR_SPC0ST		0x0040
+#define	HD64461_STBCR_SPC1ST		0x0020
+#define	HD64461_STBCR_SAFEST		0x0010
+#define	HD64461_STBCR_STM0ST		0x0008
+#define	HD64461_STBCR_STM1ST		0x0004
+#define	HD64461_STBCR_SIRST		0x0002
+#define	HD64461_STBCR_SURTST		0x0001
+
+/* System Configuration Register */
+#define	HD64461_SYSCR		(CONFIG_HD64461_IOBASE + 0x02)
+
+/* CPU Data Bus Control Register */
+#define	HD64461_SCPUCR		(CONFIG_HD64461_IOBASE + 0x04)
+
+/* Base Adress Register */
+#define	HD64461_LCDCBAR		(CONFIG_HD64461_IOBASE + 0x1000)
+
+/* Line increment adress */
+#define	HD64461_LCDCLOR		(CONFIG_HD64461_IOBASE + 0x1002)
+
+/* Controls LCD controller */
+#define	HD64461_LCDCCR		(CONFIG_HD64461_IOBASE + 0x1004)
+
+/* LCCDR control bits */
+#define	HD64461_LCDCCR_STBACK	0x0400	/* Standby Back */
+#define	HD64461_LCDCCR_STREQ	0x0100	/* Standby Request */
+#define	HD64461_LCDCCR_MOFF	0x0080	/* Memory Off */
+#define	HD64461_LCDCCR_REFSEL	0x0040	/* Refresh Select */
+#define	HD64461_LCDCCR_EPON	0x0020	/* End Power On */
+#define	HD64461_LCDCCR_SPON	0x0010	/* Start Power On */
+
+/* Controls LCD (1) */
+#define	HD64461_LDR1		(CONFIG_HD64461_IOBASE + 0x1010)
+#define	HD64461_LDR1_DON	0x01	/* Display On */
+#define	HD64461_LDR1_DINV	0x80	/* Display Invert */
+
+/* Controls LCD (2) */
+#define	HD64461_LDR2		(CONFIG_HD64461_IOBASE + 0x1012)
+#define	HD64461_LDHNCR		(CONFIG_HD64461_IOBASE + 0x1014)	/* Number of horizontal characters */
+#define	HD64461_LDHNSR		(CONFIG_HD64461_IOBASE + 0x1016)	/* Specify output start position + width of CL1 */
+#define	HD64461_LDVNTR		(CONFIG_HD64461_IOBASE + 0x1018)	/* Specify total vertical lines */
+#define	HD64461_LDVNDR		(CONFIG_HD64461_IOBASE + 0x101a)	/* specify number of display vertical lines */
+#define	HD64461_LDVSPR		(CONFIG_HD64461_IOBASE + 0x101c)	/* specify vertical synchronization pos and AC nr */
+
+/* Controls LCD (3) */
+#define	HD64461_LDR3		(CONFIG_HD64461_IOBASE + 0x101e)
+
+/* Palette Registers */
+#define	HD64461_CPTWAR		(CONFIG_HD64461_IOBASE + 0x1030)	/* Color Palette Write Adress Register */
+#define	HD64461_CPTWDR		(CONFIG_HD64461_IOBASE + 0x1032)	/* Color Palette Write Data Register */
+#define	HD64461_CPTRAR		(CONFIG_HD64461_IOBASE + 0x1034)	/* Color Palette Read Adress Register */
+#define	HD64461_CPTRDR		(CONFIG_HD64461_IOBASE + 0x1036)	/* Color Palette Read Data Register */
+
+#define	HD64461_GRDOR		(CONFIG_HD64461_IOBASE + 0x1040)	/* Display Resolution Offset Register */
+#define	HD64461_GRSCR		(CONFIG_HD64461_IOBASE + 0x1042)	/* Solid Color Register */
+#define	HD64461_GRCFGR		(CONFIG_HD64461_IOBASE + 0x1044)	/* Accelerator Configuration Register */
+
+#define	HD64461_GRCFGR_ACCSTATUS	0x10	/* Accelerator Status */
+#define	HD64461_GRCFGR_ACCRESET		0x08	/* Accelerator Reset */
+#define	HD64461_GRCFGR_ACCSTART_BITBLT	0x06	/* Accelerator Start BITBLT */
+#define	HD64461_GRCFGR_ACCSTART_LINE	0x04	/* Accelerator Start Line Drawing */
+#define	HD64461_GRCFGR_COLORDEPTH16	0x01	/* Sets Colordepth 16 for Accelerator */
+#define	HD64461_GRCFGR_COLORDEPTH8	0x01	/* Sets Colordepth 8 for Accelerator */
+
+/* Line Drawing Registers */
+#define	HD64461_LNSARH		(CONFIG_HD64461_IOBASE + 0x1046)	/* Line Start Adress Register (H) */
+#define	HD64461_LNSARL		(CONFIG_HD64461_IOBASE + 0x1048)	/* Line Start Adress Register (L) */
+#define	HD64461_LNAXLR		(CONFIG_HD64461_IOBASE + 0x104a)	/* Axis Pixel Length Register */
+#define	HD64461_LNDGR		(CONFIG_HD64461_IOBASE + 0x104c)	/* Diagonal Register */
+#define	HD64461_LNAXR		(CONFIG_HD64461_IOBASE + 0x104e)	/* Axial Register */
+#define	HD64461_LNERTR		(CONFIG_HD64461_IOBASE + 0x1050)	/* Start Error Term Register */
+#define	HD64461_LNMDR		(CONFIG_HD64461_IOBASE + 0x1052)	/* Line Mode Register */
+
+/* BitBLT Registers */
+#define	HD64461_BBTSSARH	(CONFIG_HD64461_IOBASE + 0x1054)	/* Source Start Adress Register (H) */
+#define	HD64461_BBTSSARL	(CONFIG_HD64461_IOBASE + 0x1056)	/* Source Start Adress Register (L) */
+#define	HD64461_BBTDSARH	(CONFIG_HD64461_IOBASE + 0x1058)	/* Destination Start Adress Register (H) */
+#define	HD64461_BBTDSARL	(CONFIG_HD64461_IOBASE + 0x105a)	/* Destination Start Adress Register (L) */
+#define	HD64461_BBTDWR		(CONFIG_HD64461_IOBASE + 0x105c)	/* Destination Block Width Register */
+#define	HD64461_BBTDHR		(CONFIG_HD64461_IOBASE + 0x105e)	/* Destination Block Height Register */
+#define	HD64461_BBTPARH		(CONFIG_HD64461_IOBASE + 0x1060)	/* Pattern Start Adress Register (H) */
+#define	HD64461_BBTPARL		(CONFIG_HD64461_IOBASE + 0x1062)	/* Pattern Start Adress Register (L) */
+#define	HD64461_BBTMARH		(CONFIG_HD64461_IOBASE + 0x1064)	/* Mask Start Adress Register (H) */
+#define	HD64461_BBTMARL		(CONFIG_HD64461_IOBASE + 0x1066)	/* Mask Start Adress Register (L) */
+#define	HD64461_BBTROPR		(CONFIG_HD64461_IOBASE + 0x1068)	/* ROP Register */
+#define	HD64461_BBTMDR		(CONFIG_HD64461_IOBASE + 0x106a)	/* BitBLT Mode Register */

 /* PC Card Controller Registers */
-#define HD64461_PCC0ISR         0x12000 /* socket 0 interface status */
-#define HD64461_PCC0GCR         0x12002 /* socket 0 general control */
-#define HD64461_PCC0CSCR        0x12004 /* socket 0 card status change */
-#define HD64461_PCC0CSCIER      0x12006 /* socket 0 card status change interrupt enable */
-#define HD64461_PCC0SCR         0x12008 /* socket 0 software control */
-#define HD64461_PCC1ISR         0x12010 /* socket 1 interface status */
-#define HD64461_PCC1GCR         0x12012 /* socket 1 general control */
-#define HD64461_PCC1CSCR        0x12014 /* socket 1 card status change */
-#define HD64461_PCC1CSCIER      0x12016 /* socket 1 card status change interrupt enable */
-#define HD64461_PCC1SCR         0x12018 /* socket 1 software control */
+/* Maps to Physical Area 6 */
+#define	HD64461_PCC0ISR		(CONFIG_HD64461_IOBASE + 0x2000)	/* socket 0 interface status */
+#define	HD64461_PCC0GCR		(CONFIG_HD64461_IOBASE + 0x2002)	/* socket 0 general control */
+#define	HD64461_PCC0CSCR	(CONFIG_HD64461_IOBASE + 0x2004)	/* socket 0 card status change */
+#define	HD64461_PCC0CSCIER	(CONFIG_HD64461_IOBASE + 0x2006)	/* socket 0 card status change interrupt enable */
+#define	HD64461_PCC0SCR		(CONFIG_HD64461_IOBASE + 0x2008)	/* socket 0 software control */
+/* Maps to Physical Area 5 */
+#define	HD64461_PCC1ISR		(CONFIG_HD64461_IOBASE + 0x2010)	/* socket 1 interface status */
+#define	HD64461_PCC1GCR		(CONFIG_HD64461_IOBASE + 0x2012)	/* socket 1 general control */
+#define	HD64461_PCC1CSCR	(CONFIG_HD64461_IOBASE + 0x2014)	/* socket 1 card status change */
+#define	HD64461_PCC1CSCIER	(CONFIG_HD64461_IOBASE + 0x2016)	/* socket 1 card status change interrupt enable */
+#define	HD64461_PCC1SCR		(CONFIG_HD64461_IOBASE + 0x2018)	/* socket 1 software control */

 /* PCC Interface Status Register */
-#define HD64461_PCCISR_READY		0x80	/* card ready */
-#define HD64461_PCCISR_MWP		0x40	/* card write-protected */
-#define HD64461_PCCISR_VS2		0x20	/* voltage select pin 2 */
-#define HD64461_PCCISR_VS1		0x10	/* voltage select pin 1 */
-#define HD64461_PCCISR_CD2		0x08	/* card detect 2 */
-#define HD64461_PCCISR_CD1		0x04	/* card detect 1 */
-#define HD64461_PCCISR_BVD2		0x02	/* battery 1 */
-#define HD64461_PCCISR_BVD1		0x01	/* battery 1 */
-
-#define HD64461_PCCISR_PCD_MASK		0x0c    /* card detect */
-#define HD64461_PCCISR_BVD_MASK		0x03    /* battery voltage */
-#define HD64461_PCCISR_BVD_BATGOOD	0x03    /* battery good */
-#define HD64461_PCCISR_BVD_BATWARN	0x01    /* battery low warning */
-#define HD64461_PCCISR_BVD_BATDEAD1	0x02    /* battery dead */
-#define HD64461_PCCISR_BVD_BATDEAD2	0x00    /* battery dead */
+#define	HD64461_PCCISR_READY		0x80	/* card ready */
+#define	HD64461_PCCISR_MWP		0x40	/* card write-protected */
+#define	HD64461_PCCISR_VS2		0x20	/* voltage select pin 2 */
+#define	HD64461_PCCISR_VS1		0x10	/* voltage select pin 1 */
+#define	HD64461_PCCISR_CD2		0x08	/* card detect 2 */
+#define	HD64461_PCCISR_CD1		0x04	/* card detect 1 */
+#define	HD64461_PCCISR_BVD2		0x02	/* battery 1 */
+#define	HD64461_PCCISR_BVD1		0x01	/* battery 1 */
+
+#define	HD64461_PCCISR_PCD_MASK		0x0c	/* card detect */
+#define	HD64461_PCCISR_BVD_MASK		0x03	/* battery voltage */
+#define	HD64461_PCCISR_BVD_BATGOOD	0x03	/* battery good */
+#define	HD64461_PCCISR_BVD_BATWARN	0x01	/* battery low warning */
+#define	HD64461_PCCISR_BVD_BATDEAD1	0x02	/* battery dead */
+#define	HD64461_PCCISR_BVD_BATDEAD2	0x00	/* battery dead */

 /* PCC General Control Register */
-#define HD64461_PCCGCR_DRVE		0x80    /* output drive */
-#define HD64461_PCCGCR_PCCR		0x40    /* PC card reset */
-#define HD64461_PCCGCR_PCCT		0x20    /* PC card type, 1=IO&mem, 0=mem */
-#define HD64461_PCCGCR_VCC0		0x10    /* voltage control pin VCC0SEL0 */
-#define HD64461_PCCGCR_PMMOD		0x08    /* memory mode */
-#define HD64461_PCCGCR_PA25		0x04    /* pin A25 */
-#define HD64461_PCCGCR_PA24		0x02    /* pin A24 */
-#define HD64461_PCCGCR_REG		0x01    /* pin PCC0REG# */
+#define	HD64461_PCCGCR_DRVE		0x80	/* output drive */
+#define	HD64461_PCCGCR_PCCR		0x40	/* PC card reset */
+#define	HD64461_PCCGCR_PCCT		0x20	/* PC card type, 1=IO&mem, 0=mem */
+#define	HD64461_PCCGCR_VCC0		0x10	/* voltage control pin VCC0SEL0 */
+#define	HD64461_PCCGCR_PMMOD		0x08	/* memory mode */
+#define	HD64461_PCCGCR_PA25		0x04	/* pin A25 */
+#define	HD64461_PCCGCR_PA24		0x02	/* pin A24 */
+#define	HD64461_PCCGCR_REG		0x01	/* pin PCC0REG# */

 /* PCC Card Status Change Register */
-#define HD64461_PCCCSCR_SCDI		0x80    /* sw card detect intr */
-#define HD64461_PCCCSCR_SRV1		0x40    /* reserved */
-#define HD64461_PCCCSCR_IREQ		0x20    /* IREQ intr req */
-#define HD64461_PCCCSCR_SC		0x10    /* STSCHG (status change) pin */
-#define HD64461_PCCCSCR_CDC		0x08    /* CD (card detect) change */
-#define HD64461_PCCCSCR_RC		0x04    /* READY change */
-#define HD64461_PCCCSCR_BW		0x02    /* battery warning change */
-#define HD64461_PCCCSCR_BD		0x01    /* battery dead change */
+#define	HD64461_PCCCSCR_SCDI		0x80	/* sw card detect intr */
+#define	HD64461_PCCCSCR_SRV1		0x40	/* reserved */
+#define	HD64461_PCCCSCR_IREQ		0x20	/* IREQ intr req */
+#define	HD64461_PCCCSCR_SC		0x10	/* STSCHG (status change) pin */
+#define	HD64461_PCCCSCR_CDC		0x08	/* CD (card detect) change */
+#define	HD64461_PCCCSCR_RC		0x04	/* READY change */
+#define	HD64461_PCCCSCR_BW		0x02	/* battery warning change */
+#define	HD64461_PCCCSCR_BD		0x01	/* battery dead change */

 /* PCC Card Status Change Interrupt Enable Register */
-#define HD64461_PCCCSCIER_CRE		0x80    /* change reset enable */
-#define HD64461_PCCCSCIER_IREQE_MASK	0x60   /* IREQ enable */
-#define HD64461_PCCCSCIER_IREQE_DISABLED	0x00   /* IREQ disabled */
-#define HD64461_PCCCSCIER_IREQE_LEVEL	0x20   /* IREQ level-triggered */
-#define HD64461_PCCCSCIER_IREQE_FALLING	0x40   /* IREQ falling-edge-trig */
-#define HD64461_PCCCSCIER_IREQE_RISING	0x60   /* IREQ rising-edge-trig */
-
-#define HD64461_PCCCSCIER_SCE		0x10    /* status change enable */
-#define HD64461_PCCCSCIER_CDE		0x08    /* card detect change enable */
-#define HD64461_PCCCSCIER_RE		0x04    /* ready change enable */
-#define HD64461_PCCCSCIER_BWE		0x02    /* battery warn change enable */
-#define HD64461_PCCCSCIER_BDE		0x01    /* battery dead change enable*/
+#define	HD64461_PCCCSCIER_CRE		0x80	/* change reset enable */
+#define	HD64461_PCCCSCIER_IREQE_MASK	0x60	/* IREQ enable */
+#define	HD64461_PCCCSCIER_IREQE_DISABLED 0x00	/* IREQ disabled */
+#define	HD64461_PCCCSCIER_IREQE_LEVEL	0x20	/* IREQ level-triggered */
+#define	HD64461_PCCCSCIER_IREQE_FALLING	0x40	/* IREQ falling-edge-trig */
+#define	HD64461_PCCCSCIER_IREQE_RISING	0x60	/* IREQ rising-edge-trig */
+
+#define	HD64461_PCCCSCIER_SCE		0x10	/* status change enable */
+#define	HD64461_PCCCSCIER_CDE		0x08	/* card detect change enable */
+#define	HD64461_PCCCSCIER_RE		0x04	/* ready change enable */
+#define	HD64461_PCCCSCIER_BWE		0x02	/* battery warn change enable */
+#define	HD64461_PCCCSCIER_BDE		0x01	/* battery dead change enable*/

 /* PCC Software Control Register */
-#define HD64461_PCCSCR_VCC1		0x02	/* voltage control pin 1 */
-#define HD64461_PCCSCR_SWP		0x01    /* write protect */
-
-#define HD64461_P0OCR           0x1202a
-#define HD64461_P1OCR           0x1202c
-#define HD64461_PGCR            0x1202e
-
-#define HD64461_GPACR		0x14000
-#define HD64461_GPBCR		0x14002
-#define HD64461_GPCCR		0x14004
-#define HD64461_GPDCR		0x14006
-#define HD64461_GPADR		0x14010
-#define HD64461_GPBDR		0x14012
-#define HD64461_GPCDR		0x14014
-#define HD64461_GPDDR		0x14016
-#define HD64461_GPAICR		0x14020
-#define HD64461_GPBICR		0x14022
-#define HD64461_GPCICR		0x14024
-#define HD64461_GPDICR		0x14026
-#define HD64461_GPAISR		0x14040
-#define HD64461_GPBISR		0x14042
-#define HD64461_GPCISR		0x14044
-#define HD64461_GPDISR		0x14046
-
-#define HD64461_NIRR		0x15000
-#define HD64461_NIMR		0x15002
-
-#define HD64461_IRQBASE		64
-#define HD64461_IRQ_NUM		16
-
-#define HD64461_IRQ_UART	(HD64461_IRQBASE+5)
-#define HD64461_IRQ_IRDA	(HD64461_IRQBASE+6)
-#define HD64461_IRQ_TMU1	(HD64461_IRQBASE+9)
-#define HD64461_IRQ_TMU0	(HD64461_IRQBASE+10)
-#define HD64461_IRQ_GPIO	(HD64461_IRQBASE+11)
-#define HD64461_IRQ_AFE		(HD64461_IRQBASE+12)
-#define HD64461_IRQ_PCC1	(HD64461_IRQBASE+13)
-#define HD64461_IRQ_PCC0	(HD64461_IRQBASE+14)
+#define	HD64461_PCCSCR_VCC1		0x02	/* voltage control pin 1 */
+#define	HD64461_PCCSCR_SWP		0x01	/* write protect */
+
+/* PCC0 Output Pins Control Register */
+#define	HD64461_P0OCR		(CONFIG_HD64461_IOBASE + 0x202a)
+
+/* PCC1 Output Pins Control Register */
+#define	HD64461_P1OCR		(CONFIG_HD64461_IOBASE + 0x202c)
+
+/* PC Card General Control Register */
+#define	HD64461_PGCR		(CONFIG_HD64461_IOBASE + 0x202e)
+
+/* Port Control Registers */
+#define	HD64461_GPACR		(CONFIG_HD64461_IOBASE + 0x4000)	/* Port A - Handles IRDA/TIMER */
+#define	HD64461_GPBCR		(CONFIG_HD64461_IOBASE + 0x4002)	/* Port B - Handles UART */
+#define	HD64461_GPCCR		(CONFIG_HD64461_IOBASE + 0x4004)	/* Port C - Handles PCMCIA 1 */
+#define	HD64461_GPDCR		(CONFIG_HD64461_IOBASE + 0x4006)	/* Port D - Handles PCMCIA 1 */
+
+/* Port Control Data Registers */
+#define	HD64461_GPADR		(CONFIG_HD64461_IOBASE + 0x4010)	/* A */
+#define	HD64461_GPBDR		(CONFIG_HD64461_IOBASE + 0x4012)	/* B */
+#define	HD64461_GPCDR		(CONFIG_HD64461_IOBASE + 0x4014)	/* C */
+#define	HD64461_GPDDR		(CONFIG_HD64461_IOBASE + 0x4016)	/* D */
+
+/* Interrupt Control Registers */
+#define	HD64461_GPAICR		(CONFIG_HD64461_IOBASE + 0x4020)	/* A */
+#define	HD64461_GPBICR		(CONFIG_HD64461_IOBASE + 0x4022)	/* B */
+#define	HD64461_GPCICR		(CONFIG_HD64461_IOBASE + 0x4024)	/* C */
+#define	HD64461_GPDICR		(CONFIG_HD64461_IOBASE + 0x4026)	/* D */
+
+/* Interrupt Status Registers */
+#define	HD64461_GPAISR		(CONFIG_HD64461_IOBASE + 0x4040)	/* A */
+#define	HD64461_GPBISR		(CONFIG_HD64461_IOBASE + 0x4042)	/* B */
+#define	HD64461_GPCISR		(CONFIG_HD64461_IOBASE + 0x4044)	/* C */
+#define	HD64461_GPDISR		(CONFIG_HD64461_IOBASE + 0x4046)	/* D */
+
+/* Interrupt Request Register & Interrupt Mask Register */
+#define	HD64461_NIRR		(CONFIG_HD64461_IOBASE + 0x5000)
+#define	HD64461_NIMR		(CONFIG_HD64461_IOBASE + 0x5002)
+
+#define	HD64461_IRQBASE		OFFCHIP_IRQ_BASE
+#define	HD64461_IRQ_NUM		16
+
+#define	HD64461_IRQ_UART	(HD64461_IRQBASE+5)
+#define	HD64461_IRQ_IRDA	(HD64461_IRQBASE+6)
+#define	HD64461_IRQ_TMU1	(HD64461_IRQBASE+9)
+#define	HD64461_IRQ_TMU0	(HD64461_IRQBASE+10)
+#define	HD64461_IRQ_GPIO	(HD64461_IRQBASE+11)
+#define	HD64461_IRQ_AFE		(HD64461_IRQBASE+12)
+#define	HD64461_IRQ_PCC1	(HD64461_IRQBASE+13)
+#define	HD64461_IRQ_PCC0	(HD64461_IRQBASE+14)

 #define __IO_PREFIX	hd64461
 #include <asm/io_generic.h>


x86: Rename "ignore" macro in <asm/dwarf2.h> to avoid collision

Commit 70f1bba4 ("x86: use ignore macro instead of hash comment") breaks
the 64-bit x86 build on toolchains that have CONFIG_AS_CFI undefined with:

    arch/x86/lib/csum-copy_64.S:48: Error: Macro `ignore' was already defined

because <asm/dwarf2.h> now uses the ignore macro name itself.  Fix this
by changing to __cfi_ignore in dwarf2.h.

Signed-off-by: Roland Dreier <91e9b5f7ca0bb6300133ed378670d64af90dde66@cisco.com>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

--- include/asm-x86/dwarf2.h
+++ include/asm-x86/dwarf2.h
@@ -38,23 +38,23 @@

 /* Due to the structure of pre-exisiting code, don't use assembler line
    comment character # to ignore the arguments. Instead, use a dummy macro. */
-.macro ignore a=0, b=0, c=0, d=0
+.macro __cfi_ignore a=0, b=0, c=0, d=0
 .endm

-#define CFI_STARTPROC	ignore
-#define CFI_ENDPROC	ignore
-#define CFI_DEF_CFA	ignore
-#define CFI_DEF_CFA_REGISTER	ignore
-#define CFI_DEF_CFA_OFFSET	ignore
-#define CFI_ADJUST_CFA_OFFSET	ignore
-#define CFI_OFFSET	ignore
-#define CFI_REL_OFFSET	ignore
-#define CFI_REGISTER	ignore
-#define CFI_RESTORE	ignore
-#define CFI_REMEMBER_STATE ignore
-#define CFI_RESTORE_STATE ignore
-#define CFI_UNDEFINED ignore
-#define CFI_SIGNAL_FRAME ignore
+#define CFI_STARTPROC	__cfi_ignore
+#define CFI_ENDPROC	__cfi_ignore
+#define CFI_DEF_CFA	__cfi_ignore
+#define CFI_DEF_CFA_REGISTER	__cfi_ignore
+#define CFI_DEF_CFA_OFFSET	__cfi_ignore
+#define CFI_ADJUST_CFA_OFFSET	__cfi_ignore
+#define CFI_OFFSET	__cfi_ignore
+#define CFI_REL_OFFSET	__cfi_ignore
+#define CFI_REGISTER	__cfi_ignore
+#define CFI_RESTORE	__cfi_ignore
+#define CFI_REMEMBER_STATE __cfi_ignore
+#define CFI_RESTORE_STATE __cfi_ignore
+#define CFI_UNDEFINED __cfi_ignore
+#define CFI_SIGNAL_FRAME __cfi_ignore

 #endif


Fix comment on REFSCOPE {R} flag

Fix comment on REFSCOPE {R} flag

--- include/chpeg/bytecode.h
+++ include/chpeg/bytecode.h
@@ -58,8 +58,8 @@
     CHPEG_FLAG_STOP     = 1<<0,  // {C|S} stop automatic unwrapping, forcing this node to be a container
     CHPEG_FLAG_IGNORE   = 1<<1,  // {I} deletes nodes matching this identifier
     CHPEG_FLAG_LEAF     = 1<<2,  // {L|T} collects this node and anything underneath as a final leaf (text) node
-    CHPEG_FLAG_PACKRAT  = 1<<3,  // {P} add node to packrat cache
-    CHPEG_FLAG_REFSCOPE = 1<<4,  // {R} add node to packrat cache
+    CHPEG_FLAG_PACKRAT  = 1<<3,  // {P} add resulting node to packrat cache
+    CHPEG_FLAG_REFSCOPE = 1<<4,  // {R} make resulting node a reference scope

 #ifdef CHPEG_EXTENSION_TRIM
     // These flags are used internally


Placed setWindowPos and getWindowPos outside of the app class but inside of the ::app namespace in order for them to be exposed within a Cinder app.

--- include/cinder/app/App.h
+++ include/cinder/app/App.h
@@ -445,6 +445,9 @@
 //@{
 //! Returns the width of the active App's window measured in pixels, or the screen when in full-screen mode.
 inline int	getWindowWidth() { return App::get()->getWindowWidth(); }
+//! Sets the position of the active App's window measured in pixels. Ignored in full-screen mode.
+inline void		setWindowPos( const Vec2i &windowPos ) { App::get()->setWindowPos( windowPos);  }
+inline void		setWindowPos( int x, int y ) { setWindowPos( Vec2i( x, y ) );  }
 //! Sets the width of the active App's window measured in pixels. Ignored in full-screen mode.
 inline void	setWindowWidth( int windowWidth ) { App::get()->setWindowWidth( windowWidth ); }
 //! Returns the height of the active App's window measured in pixels, or the screen when in full-screen mode.
@@ -458,6 +461,8 @@
 inline Vec2f	getWindowCenter() { return App::get()->getWindowCenter(); }
 //! Returns the size of the active App's window or the screen in full-screen mode
 inline Vec2i	getWindowSize() { return App::get()->getWindowSize(); }
+//! Returns the position of the active App's window measured in pixels.
+inline Vec2i	getWindowPos() { return App::get()->getWindowPos(); }
 //! Returns the aspect ratio of the active App's window or the screen in full-screen mode
 inline float	getWindowAspectRatio() { return App::get()->getWindowAspectRatio(); }
 //! Returns the bounding area of the active App's window or the screen in full-screen mode.


--- include/cinder/app/App.h
+++ include/cinder/app/App.h
@@ -458,6 +458,9 @@
 //@{
 //! Returns the width of the active App's window measured in pixels, or the screen when in full-screen mode.
 inline int	getWindowWidth() { return App::get()->getWindowWidth(); }
+//! Sets the position of the active App's window measured in pixels. Ignored in full-screen mode.
+inline void		setWindowPos( const Vec2i &windowPos ) { App::get()->setWindowPos( windowPos);  }
+inline void		setWindowPos( int x, int y ) { setWindowPos( Vec2i( x, y ) );  }
 //! Sets the width of the active App's window measured in pixels. Ignored in full-screen mode.
 inline void	setWindowWidth( int windowWidth ) { App::get()->setWindowWidth( windowWidth ); }
 //! Returns the height of the active App's window measured in pixels, or the screen when in full-screen mode.
@@ -471,6 +474,8 @@
 inline Vec2f	getWindowCenter() { return App::get()->getWindowCenter(); }
 //! Returns the size of the active App's window or the screen in full-screen mode
 inline Vec2i	getWindowSize() { return App::get()->getWindowSize(); }
+//! Returns the position of the active App's window measured in pixels.
+inline Vec2i	getWindowPos() { return App::get()->getWindowPos(); }
 //! Returns the aspect ratio of the active App's window or the screen in full-screen mode
 inline float	getWindowAspectRatio() { return App::get()->getWindowAspectRatio(); }
 //! Returns the bounding area of the active App's window or the screen in full-screen mode.


Add load reserve state to riscv_processor

--- src/asm/riscv-processor.h
+++ src/asm/riscv-processor.h
@@ -134,6 +134,10 @@

 		UX pc;

+		struct {
+			UX lr;
+		} state;
+
 		IREG ireg[ireg_count];
 		FREG freg[freg_count];
 		UX   csr[csr_count];


Change GNUInlineAttr definition to just use DEF_SIMPLE_ATTR.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@96517 91177308-0d34-0410-b5e6-96231b3b80d8

--- include/clang/AST/Attr.h
+++ include/clang/AST/Attr.h
@@ -301,19 +301,6 @@
   static bool classof(const DestructorAttr *A) { return true; }
 };

-class GNUInlineAttr : public Attr {
-public:
-  GNUInlineAttr() : Attr(GNUInline) {}
-
-  virtual Attr *clone(ASTContext &C) const;
-
-  // Implement isa/cast/dyncast/etc.
-  static bool classof(const Attr *A) {
-    return A->getKind() == GNUInline;
-  }
-  static bool classof(const GNUInlineAttr *A) { return true; }
-};
-
 class IBOutletAttr : public Attr {
 public:
   IBOutletAttr() : Attr(IBOutletKind) {}
@@ -340,11 +327,12 @@
   static bool classof(const IBActionAttr *A) { return true; }
 };

-DEF_SIMPLE_ATTR(Malloc);
-DEF_SIMPLE_ATTR(NoReturn);
 DEF_SIMPLE_ATTR(AnalyzerNoReturn);
 DEF_SIMPLE_ATTR(Deprecated);
 DEF_SIMPLE_ATTR(Final);
+DEF_SIMPLE_ATTR(GNUInline);
+DEF_SIMPLE_ATTR(Malloc);
+DEF_SIMPLE_ATTR(NoReturn);

 class SectionAttr : public AttrWithString {
 public:


Add FIXME calling for rename of NamedDecl::getNameAsString.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@84454 91177308-0d34-0410-b5e6-96231b3b80d8

--- include/clang/AST/Decl.h
+++ include/clang/AST/Decl.h
@@ -119,6 +119,9 @@
   /// selector, etc).  Creating this name requires expensive string
   /// manipulation, so it should be called only when performance doesn't matter.
   /// For simple declarations, getNameAsCString() should suffice.
+  //
+  // FIXME: This function should be renamed to indicate that it is not just an
+  // alternate form of getName(), and clients should move as appropriate.
   //
   // FIXME: Deprecated, move clients to getName().
   std::string getNameAsString() const { return Name.getAsString(); }


Added "arg_iterators" to ObjCMessageExpr (for iterating over the arguments of a message expression)

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@48756 91177308-0d34-0410-b5e6-96231b3b80d8

--- include/clang/AST/Expr.h
+++ include/clang/AST/Expr.h
@@ -1551,6 +1551,14 @@
   // Iterators
   virtual child_iterator child_begin();
   virtual child_iterator child_end();
+
+  typedef Expr** arg_iterator;
+  typedef const Expr* const* const_arg_iterator;
+
+  arg_iterator arg_begin() { return &SubExprs[ARGS_START]; }
+  arg_iterator arg_end()   { return arg_begin() + NumArgs; }
+  const_arg_iterator arg_begin() const { return &SubExprs[ARGS_START]; }
+  const_arg_iterator arg_end() const { return arg_begin() + NumArgs; }
 };

 }  // end namespace clang


Refactored "getSubStmt" and "SubStmt" from the CaseStmt and DefaultStmt
class to their common parent class SwitchCase.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@41329 91177308-0d34-0410-b5e6-96231b3b80d8

--- include/clang/AST/Stmt.h
+++ include/clang/AST/Stmt.h
@@ -145,8 +145,10 @@
   // A pointer to the following CaseStmt or DefaultStmt class,
   // used by SwitchStmt.
   SwitchCase *NextSwitchCase;
+  Stmt *SubStmt;
 protected:
-  SwitchCase(StmtClass SC) : Stmt(SC), NextSwitchCase(0) {}
+  SwitchCase(StmtClass SC, Stmt* substmt) : Stmt(SC), NextSwitchCase(0),
+                                            SubStmt(substmt) {}

 public:
   const SwitchCase *getNextSwitchCase() const { return NextSwitchCase; }
@@ -154,6 +156,8 @@
   SwitchCase *getNextSwitchCase() { return NextSwitchCase; }

   void setNextSwitchCase(SwitchCase *SC) { NextSwitchCase = SC; }
+
+  Stmt *getSubStmt() { return SubStmt; }

   static bool classof(const Stmt *T) {
     return T->getStmtClass() == CaseStmtClass ||
@@ -165,14 +169,12 @@
 class CaseStmt : public SwitchCase {
   Expr *LHSVal;
   Expr *RHSVal;  // Non-null for GNU "case 1 ... 4" extension
-  Stmt *SubStmt;
 public:
   CaseStmt(Expr *lhs, Expr *rhs, Stmt *substmt)
-    : SwitchCase(CaseStmtClass), LHSVal(lhs), RHSVal(rhs), SubStmt(substmt) {}
+    : SwitchCase(CaseStmtClass,substmt), LHSVal(lhs), RHSVal(rhs) {}

   Expr *getLHS() { return LHSVal; }
   Expr *getRHS() { return RHSVal; }
-  Stmt *getSubStmt() { return SubStmt; }

   static bool classof(const Stmt *T) {
     return T->getStmtClass() == CaseStmtClass;
@@ -182,13 +184,11 @@

 class DefaultStmt : public SwitchCase {
   SourceLocation DefaultLoc;
-  Stmt *SubStmt;
-public:
-  DefaultStmt(SourceLocation DL, Stmt *substmt) : SwitchCase(DefaultStmtClass),
-    DefaultLoc(DL), SubStmt(substmt) {}
+public:
+  DefaultStmt(SourceLocation DL, Stmt *substmt) :
+    SwitchCase(DefaultStmtClass,substmt), DefaultLoc(DL) {}

   SourceLocation getDefaultLoc() const { return DefaultLoc; }
-  Stmt *getSubStmt() { return SubStmt; }

   static bool classof(const Stmt *T) {
     return T->getStmtClass() == DefaultStmtClass;


commit

commit


Update code

Update code

--- apps/linux/gpio/gpio-drv.c
+++ apps/linux/gpio/gpio-drv.c
@@ -8,13 +8,9 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/kdev_t.h>
-#include <linux/fs.h>
 #include <linux/cdev.h>
-#include <linux/ioport.h>
 #include <linux/interrupt.h>
 #include <linux/irqreturn.h>
-#include <linux/delay.h>
-#include <linux/wait.h>
 #include <linux/poll.h>
 #include <linux/sched.h>
 #include <linux/gpio.h>
@@ -26,12 +22,9 @@
 #include <linux/kernel.h>
 #include <linux/device.h>

-#include <asm/io.h>
-#include <asm/uaccess.h>
-
 #include "gpio.h"
 /************************** Constant Definitions *****************************/
-#define GPIO_BASE_REG	(0x3F200000)
+#define GPIO_BASE_REG	(0x7E200000)
 #define GPIO_MEM_LEN	(0xB0)
 #define GPIO_DRV_NAME	"gpio_drv"
 // GPIO setup macros. Always use INP_GPIO(x) before using OUT_GPIO(x) or SET_GPIO_ALT(x,y)
@@ -170,7 +163,7 @@
 	puc = (unsigned char *)buff;
 	if(count < 0) count = 0;
 	while(count --){
-		if(copy_to_user((void __user *)puc, (const void*)&ucval, 1) == 0) break;
+		if(copy_to_user((void __user *)puc, (const void*)&ucval, 1) != 0) break;
 		puc++;
 	}
     return count;
@@ -181,12 +174,10 @@
 	int minor = iminor(file_inode(filp));

 	if(count > 0){
-		copy_from_user((void*)&ucval, (const void __user *)buff, 1);
-			gpio_pin_write(minor, ucval);
-			return count;
-
-	}
-
+		if(copy_from_user((void*)&ucval, (const void __user *)buff, 1)) return 0;
+		gpio_pin_write(minor, ucval);
+		return count;
+	}
     return -EINVAL;
 }
 static long gpio_x_ioctl(struct file *filp, unsigned int cmd, unsigned long arg){
@@ -212,8 +203,8 @@
 					if(ptr->pin == pin){
 						exist = 1;
 						break;
-					 }
-					 ptr = ptr->next;
+					}
+					ptr = ptr->next;
 				}
 			}
 			if(exist){


now contains disrcete cosine trafo of autocorrelation

--- include/crosscorrelate.h
+++ include/crosscorrelate.h
@@ -44,6 +44,9 @@
         // Calculates Fourier trafo and then auto correlation
         void AutoFourier(vector <double>& ivec);

+        // Calculates Discrete Cosine trafo and then auto correlation
+        void AutoCosine(vector <double>& ivec);
+
         // Calculates auto correlation via two Fourier trafos
         void AutoCorr(vector <double>& ivec);


remove file version

remove file version

--- include/graphassembler.h
+++ include/graphassembler.h
@@ -6,7 +6,6 @@
  *    Description:  Declarations of public functions and variables for
  *                  multimodal graph assembler
  *
- *        Version:  2.0
  *        Created:  2009/03/23 10时36分39秒
  *       Revision:  none
  *       Compiler:  gcc


fix the struct name too (amends #2539)

fix the struct name too (amends #2539)

--- include/h2o/httpclient.h
+++ include/h2o/httpclient.h
@@ -166,7 +166,7 @@
 /**
  * Properties of a HTTP client connection.
  */
-typedef struct st_h2o_httpclient_ssl_properties_t {
+typedef struct st_h2o_httpclient_conn_properties_t {
     /**
      * TLS properties. Definitions match that returned by corresponding h2o_socket function: `h2o_socket_ssl_*`.
      */


cleaning

cleaning

--- include/kernel/modules.h
+++ include/kernel/modules.h
@@ -8,8 +8,6 @@
 #define MODULES_BUS_MAX    8
 #define MODULES_DEVICE_MAX 64
 #define MODULES_DRIVER_MAX 64
-
-struct vfs_node;

 struct modules_module
 {


KVM: Introduce KVM_VIRTIO_CCW_NOTIFY_BUS.

Add a new bus type for virtio-ccw devices on s390.

Signed-off-by: Cornelia Huck <94980dd689360e06f79e918bf71ea5fed7a2bc63@de.ibm.com>
Signed-off-by: Marcelo Tosatti <958bcd1f4a7a8c36dca09fe3fa9cb5f1483adf51@redhat.com>


[MTD] Add platform support for NAND

[MTD] Add platform support for NAND

Add the data structures necessary to provide platform device support
for NAND

Signed-off-by: Thomas Gleixner <00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de>

--- include/linux/mtd/nand.h
+++ include/linux/mtd/nand.h
@@ -510,4 +510,51 @@
 #define NAND_SMALL_BADBLOCK_POS		5
 #define NAND_LARGE_BADBLOCK_POS		0

+/**
+ * struct platform_nand_chip - chip level device structure
+ *
+ * @nr_chips:		max. number of chips to scan for
+ * @chip_offs:		chip number offset
+ * @nr_partitions:	number of partitions pointed to be partitoons (or zero)
+ * @partitions:		mtd partition list
+ * @chip_delay:		R/B delay value in us
+ * @options:		Option flags, e.g. 16bit buswidth
+ * @priv:		hardware controller specific settings
+ */
+struct platform_nand_chip {
+	int			nr_chips;
+	int			chip_offset;
+	int			nr_partitions;
+	struct mtd_partition	*partitions;
+	int 			chip_delay;
+	unsigned int		options;
+	void			*priv;
+};
+
+/**
+ * struct platform_nand_ctrl - controller level device structure
+ *
+ * @hwcontrol:		platform specific hardware control structure
+ * @dev_ready:		platform specific function to read ready/busy pin
+ * @select_chip:	platform specific chip select function
+ * @priv_data:		private data to transport driver specific settings
+ *
+ * All fields are optional and depend on the hardware driver requirements
+ */
+struct platform_nand_ctrl {
+	void 		(*hwcontrol)(struct mtd_info *mtd, int cmd);
+	int  		(*dev_ready)(struct mtd_info *mtd);
+	void		(*select_chip)(struct mtd_info *mtd, int chip);
+	void		*priv;
+};
+
+/* Some helpers to access the data structures */
+static inline
+struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd)
+{
+	struct nand_chip *chip = mtd->priv;
+
+	return chip->priv;
+}
+
 #endif /* __LINUX_MTD_NAND_H */